Jump to content

code for wpi 5 to run in runonce on nlite


Recommended Posts


Take this one ( runonceex.cmd ):

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%\996 /V 1 /D "%wpipath%\WPI.hta" /f

Link to comment
Share on other sites

  • 1 month later...

nLite by far is not a "do all" for everyone. You need to tweak the iso a little.

Once you are finished with the nLite process you can extract the iso & make necessary chanees to the run_once file. Simply recompile with any good iso creating software & you are all done. You can extract the boot sector using something like bbie or the iso software itself.

Link to comment
Share on other sites

  • 3 weeks later...
Take this one ( runonceex.cmd ):

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%\996 /V 1 /D "%wpipath%\WPI.hta" /f

hi there, I quick question. once you save this code you´ve posted as "runonceex.cmd" in the $OEM$ folder of the installation you created with nLite, what exatly do you type in the runonce box of nLite? just "runonceex.cmd", or "$OEM$/runonceex.cmd"

I searched the whole forum trying to find an answer to this question and didn´t find it... :wacko: can you please tell me? thanks

Edited by gbmolina
Link to comment
Share on other sites

You cannot write it ino the runoncebox of nlite, cause the CDROM path is not defined. This line say the OS which drive the installing drive is.

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

set wpipath=%drive%\wpi

If you know the path, and it everytime the same, you could print maybe
d:\wpi\wpi.hta

But installpath could change if you have more than one HDD or 2 CD drives.

The .cmd searches for the path and set an entry in the registry to start wpi before the first logon.

So the best is to do everything else with nlite if you want so, and write the wpi settings by hand. Its easyer as you think!!

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...