Jump to content

Progress Bars for Installs via kTools and WPI


Recommended Posts

Changelog: 7 Feb 06, 5:00am CST

Modified to include new wpi.au3, wpi.exe, and generate.js...thanks mritter for help with a few bugs in code.

Writing kTool.ini to Temp directory (Read/Write Path) now...thanks Lost Soul

If used, wpi.exe now provides:

Global variable %wpipath%

Can use from relative paths - mapping to first available drive letter

Closure of mshta.exe after detection of start of installation via kTool or RunOnceEx - Keying on rundll32.exe or kTool.exe process existence.

Admin Check...not like we needed it, but...

Command line support with profile and timer (i.e. wpi.exe Home 30)

Added lines in wpi.au3/wpi.exe:

Launch fontinstaller and ResChange Executables (remarked out for now, just remove ; in front of Run line)

Launch Shutdown and cleanup (both remarked out for now)

Otherwise, you can still launch with wpi.cmd

For those interested, I've been playing around with kTools progress bars..included copies of the pertinent

files. Thanks again to Kel for a great product and thanks to kenedy, kTools developer.

1. Replace the files of your original WPI...I'm using version 4.3.8. Make sure to have backups!

(under Common folder)

a. optionswizardtemplate.htm

b. main.js

(under Wpiscripts folder)

c. generate.js

d. optionswizard.js

2. Download kTool v1.1a and add the kTool.exe under the WPI>Tools folder (This drives the progress bars)

Details and screenshots can be found here:

http://www.msfn.org/board/index.php?s=&sho...ndpost&p=194610

I've used WPI as the front-end, modified generate.js to write all the checked Applications to kTool.ini in

the WPI>Tools Directory instead of to the RunOnceEx registry key. Then we launch kTool.exe with kTool.ini

as the source of installs.

3. Add wpi.exe under the WPI root (if you want to use it), see post below...same wpi.exe but different generate.js files:

http://www.msfn.org/board/index.php?s=&sho...ndpost&p=459322

4. Launch WPI (preferably from the new wpi.exe as it will install global variable %wpipath% to be used in

your config.js file and will also take care of any relative path problems, but will still work from wpi.hta

or wpi.cmd)

5. Click "Options" Button and check 'yes' to "kTool RunOnceEx Progress Bars", then save...Launch Begin

Install and you should see your RunOnceEx dialog "look-a-like" on a form with progress bars.

Not a lot of testing went into this mod but seems to work o.k. for me. Maybe some tweaking on the way it

imports registry info and copy/delete commands.

Only throwing it out to the forum to stimulate ideas and discussion.

pbWPI_a1.zip

Edited by lawrenca
Link to comment
Share on other sites


How works progress bar ? For example I have many apps into SFX, so there is a first progress bar to decompress and second there is batch file to execute some commands and real isntall begin. kTool works with that case ?

Link to comment
Share on other sites

Man that is fookin SWEET!!! I am Definatly adding this to WPI!

One issue = WPI.EXE does not like to close itself.

How works progress bar ? For example I have many apps into SFX, so there is a first progress bar to decompress and second there is batch file to execute some commands and real isntall begin. kTool works with that case ?

As far as I can see it brings up a sub progress bar that waits for the installation to finis and the continues on its merry way.

Edited by kelsenellenelvian
Link to comment
Share on other sites

Kel,

Can be found here, just download the wpi.au3, Doc Symbiosis' wpi.cmd works well too, didn't find it until I finished my work under that thread "Ideas needed to get rid of cd check".

http://www.msfn.org/board/index.php?s=&sho...ndpost&p=459322

Code removed and updated at the location below:

http://www.msfn.org/board/index.php?s=&sho...ndpost&p=459723

Sonic,

These progress bars have no real relation to actual thread/process useage in code. It is only displaying the application count progress...the progress bars are only counting up as the number of apps being installed decrease. BTW, with 3 or more commands under any application will also trigger a secondary progress bar under the app being installed, while the one displayed at the bottom is for the total app count.

Edited by lawrenca
Link to comment
Share on other sites

Kel,

I believe the exit problem is fixed...

Also, closing mshta.exe from within the wpi.exe, couldn't find a better way to do it outside the startup .exe, not a java programmer.

Still working on passing in command-line parameters to wpi.hta, don't want to lose that capability.

I'll also try to take down/update the previous files with the newer fixed versions.

New wpi.exe can be found at start of the thread:

http://www.msfn.org/board/index.php?s=&sho...ndpost&p=459446

Source code attached here: wpi.au3

wpi.au3

Edited by lawrenca
Link to comment
Share on other sites

You can add other executables that can be called from within wpi.exe...add the code to the wpi.au3 from post above. Comment out if you don't want to run these by adding semi-colon ";" without quotes in front of what you don't wish to run and then compile to .exe using autoit. AutoIT is free and can be found here:

AutoIT v3

Once installed, you should be able to right-click the .au3 file then click "Compile Script". You now have a new wpi.exe.

;*****Can add other executables using this syntax*****
;Run ( "filename" [, "workingdir" [, flag]] )
;Where:
;filename = The full name of the executable (EXE, BAT, COM, or PIF) to run.
;workingdir [optional] The working directory.
;flag [optional] The "show" flag of the executed program:
; @SW_HIDE = Hidden window
; @SW_MINIMIZE = Minimized window
; @SW_MAXIMIZE = Maximized window


;Force resolution to needed size for wpi interface.
Run(@ScriptDir & "\Tools\ResChange.exe -width=1280 -height=1024 -depth=max -refresh=max", "", @SW_MAXIMIZE)

;Font installation - the smooth and customizable way.
Run(@ScriptDir & "\Tools\fonts\fontinstaller.exe", "", @SW_MAXIMIZE)

I've added the contents to the wpi.au3 from post:

http://www.msfn.org/board/index.php?s=&sho...ndpost&p=459723

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...