November 23, 200520 yr Hi,I am totally anal about not having anything copied over to the harddrive, even if it is later deleted.I've managed to get all of my programs to install from CD, and my drivers to install from CD.The only stupid thing that gets copied is one batch file, which I need to run from [GuiRunOnce] in winnt.sif.Right now, its:[GuiRunOnce] %systemdrive%\Install\Install.cmdIs there any way to get this batch file to run from CD within winnt.sif?(Under DetachedProgram I know I can via:DetachedProgram=".\system32\cmd.exe" Arguments="/Q /C FOR /F %I IN (%SystemRoot%\SYSTEM32\$WINNT$.INF) DO (FOR %J IN (%I$OEM$) DO (IF EXIST %J (start /min /D%J Drivers.cmd)))"I cannot run my install.cmd file from anywhere else besided GuiRunOnce (so please don't answer about using cmdlines.txt). I am trying to find a method to run a batch file that is located on my CD at the GuiRunOnce stage.Thanks!
November 24, 200520 yr what's wrong w/ detached program?basically, at that stage of the install, the system doesn't know where your cd-rom is yet, so it can't call a file if it doesn't know where it is.you could always hide it in your system32 directory, or you could call a cleanup file that sleeps for 5 seconds, then deletes the install.cmd file (sleeping gives the install.cmd file a chance to unload from memory, allowing it to be deleted).
November 24, 200520 yr Author detached program is too early. this batch starts my software selector installer program. i need it to load on first boot...
November 24, 200520 yr Can you not use RunOnce or RunOnceEx[GuiUnattended] DetachedProgram = CMD.EXE Arguments = "/Q /C FOR /F %? IN ('%SYSTEMROOT%\SYSTEM32\MOUNTVOL.EXE^|FINDSTR :\') DO IF EXIST %?WIN51 CALL %?ROOT_DIR\DIR\MyBatch.cmd"Where you place MyBatch.cmd in a folder called DIR which in turn is placed inside a directory in the root of the CD named ROOT_DIR. MyBatch.cmd can then contain or call, the drivers stuff already mentioned plus your RunOnce or RunOnceEx stuff using .\ or %~d0 references for your CD-ROM drive letter. Edited November 24, 200520 yr by Yzöwl
November 27, 200520 yr if GuiRunOnce accepts program/arguments, this should work. only tried in command prompt in working system, never tried on CD.[GuiRunOnce]%SystemRoot%\system32\cmd.exe /Q /C FOR /F %I IN ('%SystemRoot%\system32\findstr.exe dospath= %SystemRoot%\system32\$WINNT$.INF') DO (FOR %J IN (%I$OEM$) DO (IF EXIST %J (%~dJ\Install\Install.cmd)))IMHO, GuiRunOnce == RunOnceEx injeted from CMDLINES.txt, dunno why you don't do that there. Edited November 27, 200520 yr by idle.newbie
November 27, 200520 yr Author IMHO, GuiRunOnce == RunOnceEx injeted from CMDLINES.txt, dunno why you don't do that there.let me explain further.i use W.A.I.T. to install programs. to run correctly, WAIT needs to be called like so:start /wait %CDROM%\$OEM$\WAIT\WAIT.exethe key is the "start /wait" - without it, the program gets messed up.I do this currently by calling install.cmd (which contains the above code) from GuiRunOnce.cmdow @ /HID@ECHO OFFfor %%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:start /wait %CDROM%\$OEM$\WAIT\WAIT.exeEXITIf this can be called in some other way from CD, let me know!
November 27, 200520 yr according to DeployTools.cab\ref.chm\Unattend.txt\[GuiRunOnce]Commands called in the [GuiRunOnce]section process synchronously. Each application runs in the order listed in this section, and each command must finish before you run the next command.it waits until program finished.got Word/Excel Viewer 2003 etc. in my disc, RunOnceEx injected @T-12, they always install one by one.maybe that's caused by your wrapping program WAIT.exe, which forks another process to do app install. e.g. when i do "nircmd.exe exec hide app.exe", nircmd.exe forks a new process to run app.exe, the app.exe still running, but nircmd.exe's task is over so it terminate itself.anyway, tho your script works, just don't care the 1k less script copied to hd, or kill itself after WAIT.exe terminated(DEL /F /Q %~f0).
December 27, 200520 yr EDIT: seems that RunOnceEx can do the trick Edited December 28, 200520 yr by zzzz
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now