Jump to content

Need testers for 4.4rc1

Recommended Posts

wpi.exe not starting, bug found by mritter.

wpi.exe is looking for kTool.exe to launch in order to close out mshta.exe. I have seen problems with kTool.exe closing, so when wpi.exe gets relaunched, it closes immediately.

Added code to wpi.exe to close kTool.exe before WPI.hta gets launched. Appears to be working for me, will pass on for other testers.

Potential changes to generate.js:

1. Write kTool.ini to different location based on Yurek3 observations (currently writes to user\TEMP)-line 34

2. Will add debug support to not launch kTool.exe - line 303


3. When installing over 3 apps, I get the sub-progress bars but the label displays 'test' underneath. Will try to add Description of what is being installed (for our case, probably only 'Adding Registry Entries', and 'Installing Applications').

4. Food for thought, though the "RunWait" is used about 90% of the time for kTool.exe and covers almost all options with the way WPI currently works, could potentially leave this up to the user to fill in, opening the other kTool options (I think the "REBOOT" and "WaitProcess" may be useful ones), the others are already covered by WPI.

Instead of

if ((programs[i].cmd1 != null)&&(path(programs[i].cmd1) != '')) WriteToFile("RunWait = "+substituteCommand(programs[i].cmd1));

We would have:

if ((programs[i].cmd1 != null)&&(path(programs[i].cmd1) != '')) WriteToFile(substituteCommand(programs[i].cmd1));

Where the user would be responsible for adding in the "RunWait=", "REG=", "DOS=", "REBOOT".

Will post modified code to ftp or another thread this evening.

Edited by lawrenca
Link to comment
Share on other sites

@lawrenca: Sure I'm willing to help, allthough my time is a little short the following weeks. But I just have one little question: What is the kTools.exe for?

Anyway, I'm just working on a way to inplement the indepedence of the path directly into the generate.js, so that one don't have to use any entries in the registry.

Edited by Doc Symbiosis
Link to comment
Share on other sites

Doc Symbiosis,

Would love to see that work.

The new generate.js with WPI 4.4rc1 doesn't write the registry either, it writes a kTool.ini file and is used when kTool.exe starts.

For a later version of WPI...I could see moving files/apps (like Antivirus Updates, data files, etc.) that don't require admin privileges being "installed" by non-admin users with WPI as the front-end. Maybe some hook into the condition to only show those updates they have privileges for? I currently push about 20 of these type updates a month to machines that are just bundled in self-extracting executables.

Link to comment
Share on other sites

After a while of work, I now came to the for my purposes modified WPI.cmd, which I would declare as usable. I definitely wanted to avoid problems with UNC paths, cause I ran into problems with some installers ( even with firefox ).

So the cmd detects, if it is called with UNC path, then connects the last free drive letter and sets the environment variables %wpipath% and %installdir% appropriate. There is no check implemented, if a drive letter is free, cause in real life, I nearly never saw a system with no drive letter free ( I saw tthis for the first time in my life, when I tested the batch, cause the drive is disconnected, after next restart ).

To use the %installdir% in the config.js, one would have to modify the generate.js in an adequate way. So hers's the cmd

REM Set wpipath to the path where this batch is located
SET "wpipath=%~dp0"

REM If wpipath is a UNC path, connect the share to the last free drive letter and set wpipath appropriate
IF "%~d0" EQU "\\" (
REM Get the name of the share, assuming that it is not longer than 50 characters
FOR /F "tokens=1,2* delims=\" %%i IN ('ECHO %~dp0') DO (
IF NOT %%k!==! (
call :setnewpath \\%%i\%%j "%%k"
) ELSE (
call :setnewpath \\%%i\%%j

REM Hide the current window
REM %wpipath%\Tools\cmdow.exe @ /hid

REM Force resolution to needed size for wpi interface.
REM %wpipath%\Tools\ResChange.exe -width=1280 -height=1024 -depth=max -refresh=max

REM Font installation - the smooth and customizable way.
REM start /wait %wpipath%\Tools\Fonts\FontInstaller.exe

REM Special registry tweak needed.
regedit /s %wpipath%\Common\WPI.reg

REM Set the environment variable for the directory of the setup files
SET installdir=%wpipath%Install\

REM Start WPI and wait for it to end.

REM Undo registry tweak.
regedit /s %wpipath%\Common\Undo.reg

REM Clean up script.
REM %drive%\$OEM$\CleanUp.cmd

REM Remove the environment variable
SET wpipath=

REM Rebooting the sytem to finalize the installation process.
REM shutdown.exe -r -f -t 60 -c "To finish installations WPI will now reboot in 60 sec..."


FOR /F "TOKENS=2" %%i IN ('NET USE * %1 /PERSISTENT:NO ^|FIND "Drive"') DO (SET wpipath=%%i\%2)

EDIT: Added the "set wpipath=" line to cleanup


Edited by Doc Symbiosis
Link to comment
Share on other sites


ktool works fine, but I cannot install from CD anymore. I options menu the install from CD function isnt included anymore. maybe it works with the new wpi.exe, but I have written my own wpi.cmd which i want to use. Keep the Install from CD Function. Or is there any other solution?

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.

  • Create New...