Kurt, since you make a lot of use of the %SOURCE% variable in your scripts, I'd like to ask you this;
Something's off with the %SOURCE% variable using my install image (from a XP x64 SP2 source). It doesn't seem to yield the right path during cmdlines.
Here's my cmdlines content:
"rundll32 advpack.dll,LaunchINFSection nLite.inf,U"
(I have no nlite.cmd since I don't use/have anything under GuiRunOnce in WINNT.SIF)
The "runonce.cmd" is in $OEM$, alongside cmdlines.txt, and I copied the way nuhi obtains his CD/DVD-drive letter, so my runonce.cmd looks like this:
cmdow @ /hid
for /f "tokens=3" %%i IN ('reg query HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup /v "SourcePath" ^| findstr "REG_SZ"') do set SOURCE=%%i
REG IMPORT %SOURCE%$OEM$\$$\2009.REG
REG ADD %RDR% /V TITLE /D "Installing Software" /f
REG ADD %RDR%\001 /VE /D "Last Minutes.." /f
REG ADD %RDR%\001 /V 1 /D "%SOURCE%$OEM$\msxml6-KB954459-enu-amd64.exe /passive /qn /norestart" /f
REG ADD %RDR%\005 /VE /D "Installing ERUNT" /f
REG ADD %RDR%\005 /V 1 /D "%SOURCE%$OEM$\erunt-setup.exe /verysilent" /f
REG ADD %RDR%\010 /VE /D "Inserting PSPad" /f
REG ADD %RDR%\010 /V 1 /D "%SOURCE%$OEM$\pspad453inst_en.exe /VERYSILENT /SUPPRESSMSGBOXES /TASK=\"multiuser,txt\"" /f
REG ADD %RDR%\030 /VE /D "Cleaning Up" /f
REG ADD %RDR%\030 /V 1 /D "%WinDir%\ending.cmd" /f
REG ADD %RDR%\035 /V 1 /D "COPY %SOURCE%$OEM$\PSPad.INI \"%ProgramFiles(x86)%\PSPad editor\\" /Y /Z" /f
REG ADD %RDR%\036 /V 1 /D "COPY %SOURCE%$OEM$\PSPad_MU.ini \"%ProgramFiles(x86)%\PSPad editor\\" /Y /Z" /f
This is just some example code. It ends up adding nothing in the place of %SOURCE% in the RunOnceEx reg-key, and this is really weird.
The strange thing is that running ending.cmd (as it then is one of the RunOnceEx entries in reg) *does* yield the correct source of the install, using;
FOR %%I IN (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:\WIN51AP.SP2 (SET SOURCE=%%I:& GOTO DONECD)
which is in the top of ending.cmd...
So when I move all the installers etc. from runonce.cmd to ending.cmd as a simple batch-file, they will work just fine!
Any idea what I'm missing here?
I haven't tried using
in runonce.cmd yet, maybe that'll work..