Doc Symbiosis Posted May 18, 2005 Posted May 18, 2005 Hi there,yesterday I came across the problem, that I wanted to run WPI from everywhere, not only from a CD and always came across the error "..windows cannot find....", especially when I tried to run a windows command (e.g. "net use.."). Took me some time to come to a solution and so I thought, I might interest someone else. So here it is. I changed the following to the files:--------------------------------------------------------------------------------------------------my WPI.cmd ( basically added the REG ADD and REG DELETE line )--------------------------------------------@ECHO OFFREM Determine the WPI startup path. set wpipath=%~dp0REM Font installation - the smooth and customizable way.start /wait %wpipath%\common\fonts\fontinstaller.exeREM Special registry tweak needed.regedit /s "%wpipath%\common\wpi.reg"REM Make WPI directory the current directory.for /f "delims=: tokens=1" %%i in ("%wpipath%") do %%i:cd "%wpipath%"REM Write the actual path to the registryREG ADD HKCU\Software\WPI /v SWPath /t REG_EXPAND_SZ /d %wpipath% /fREM Start WPI and wait for its endstart /wait WPI.htaREM Delete the Key from the registryREG DELETE HKCU\Software\WPIexit:end---------------------------------------------------------------------------------------------Then in generate.js I added the following function:-----------------------------------------------------------function FindSWPath(){ position = "generate.js" swpath = WshShell.regRead("HKCU\Software\WPI\SWPath"); return swpath;}----------------------------------------------------------------------------------------I also added in generate.js the following lines to the function replpath------------------------------------------------ softwarepathwpath = FindSWPath(); rs = rs.replace(/%swpath%/gi, softwarepath);---------------------------------------------------------------------------------------------Now I can use in config.js for examplecmd1[pn]=['%swpath%\\Install\\Mozilla\\setup.exe -ma -ira']Now there's nothing else for it, but to say:WPI is really a REALLY GREAT TOOL!Keep at it!!!
Kelsenellenelvian Posted May 18, 2005 Posted May 18, 2005 Nice might be usefull I carry two versions regularly. Kinda nice to only have one.
Doc Symbiosis Posted May 18, 2005 Author Posted May 18, 2005 ****, windows commands doesn't really run with these changes when I start WPI.cmd with a doubleclick and I can't figure out why. When I call WPI.cmd from commandline, everything works fine.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now