Jump to content

Runonceex.cmd not working in win2000?


Recommended Posts

When I run the Runonceex.cmd that comes with the latest WPI in win2000 no entry are applied in Runonceex....in XP it shows up alright...

Code looks like this:

cmdow @ /HID
@ECHO OFF

for /f "delims=: tokens=1" %%i in ("%~dp0") do set drive=%%i:
set wpipath=%drive%\wpi

SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx

REG ADD %KEY%\999 /V 1 /D "%wpipath%\WPI.hta" /f

EXIT

I've run it on a W2K SP4, and still nothing happens...no entry..nothing.

...do the SET KEY and REG ADD commands not work now suddenly??

..am I still sleeping? :blink:

Edited by Clint
Link to comment
Share on other sites


I use WPI_Lite 1.2

I dropped WPI.CMD in I386: (add entry in txtsetup.inf)

WPI.CMD:

@ECHO OFF

REM Example, how to look for CDROM-drive. Must have a file to identify in its root (like CDROM_NT.5 or WPI.ico).
for %%i in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) do if exist %%i:\CDROM_NT.5 set CDROM=%%i:
echo Found CD-Rom as drive %CDROM%

REM Determine the WPI startup path.
REM if wpi should run off the cd the replace %~dp0 with %cdrom%.
set wpipath=%CDROM%\WPI\

REM Hide this command window.
"%wpipath%common\cmdow.exe" @ /hid

REM 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 Start WPI and wait for its end
start /wait %windir%\system32\mshta.exe "%wpipath%\wpi.hta"

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

exit

:end

IE has been ripped out so I called it with "%wpipath%\wpi.hta" from mshta.exe and it worked fine.

I set up wpi.cmd to run @ runonceex from WPII.INF during T13 stage (for me only add the line to already existing .INF that I run there)

WPII.INF:

[version]
signature="$WINDOWS NT$"
;Calls wpi.cmd from systemroot

[DefaultInstall]
AddReg=add.reg

[add.reg]
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\ZZZ",111,,"%11%\wpi.cmd"

thats it..

now if someone could give me a hint on this I would be a happy camper ;) :

http://www.msfn.org/board/index.php?showtopic=78753&hl=

Thanks!

Edited by Clint
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...