tequeterequeteque Posted April 16, 2006 Posted April 16, 2006 Hi, I am creating my windows xp cd, I dont need it to be unnattended, Im using WPI to install soma applications like office, I have copied all the programs to a folder in the compilation, the file WPI.cmd is in the $OEM$\$$\system32 of the CD, and is modified and looks like these:@ECHO OFFREM Example, how to look for CDROM-drive. Must have WPI.ico at the root of the CD.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:\WPI.hta 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%REM Hide this command window.%wpipath%Common\cmdow.exe @ /hidREM Special registry tweak needed.regedit /s %wpipath%common\wpi.regREM Make WPI directory the current directory.cd /d "%wpipath%"REM Start WPI and wait for its endwpi.htaREM Undo registry tweak.regedit /s %wpipath%common\undo.regexitMy WPI folder is in the root of the CD.Is the WPI.cmd in the right place, and is the script correct??And then, what should be written in the winnt.sif file and where in the compliation shoul it be???Thank any help shoul be nice.
wixfigura Posted April 19, 2006 Posted April 19, 2006 (edited) Hellothera are 3 possibilities to call wpi during install. I prefer after reboot, cause some programs need the reboot first.So do it this way:-place wpi.cmd in this folder on your windows CD - if you do not have it, create it: $OEM$\$$\system32-add to your winnt.sif following line: [GuiRunOnce]command5="%systemroot%\system32\wpi.cmd"-and check that you have also this entry:[unattended]OemPreinstall = "Yes"This works!The background of this uncommon way is, that CD drives can have various drive letters and have no systemvariables. So wpi.cmd searches for a file that is ONLY on your cd.In your case it is WPI.hta in the line "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:\WPI.hta set CDROM=%%i:"If you want to integrate WPI into a Windows-CD ( not standalone ) replace WPI.hta by WIN51 , cause it is only in the root of windows CDs.Also your WPI- Path is incorrect if it is included into a Windows CD, it should be %CDROM%\WPIBest you replace items 1, 2 and 5 in your script through this ones:REM Example, how to look for CDROM-drive. Must have WIN51 at the root of the CD.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:\WIN51 set CDROM=%%i:REM Determine the WPI startup path. REM if wpi should run off the cd the replace %~dp0 with %cdrom%.set wpipath=%CDROM%\WPIREM Make WPI directory the current directory.for /f "delims=: tokens=1" %%i in ("%wpipath%") do %%i:cd "%wpipath%"Or take this one: Download WPI.cmd - it calls wpi.hta with reg. changes and has no cmd. blackscreensGood luck !! Edited April 19, 2006 by wixfigura
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