a06lp Posted September 15, 2004 Share Posted September 15, 2004 1) Every time i try to edit my winnt.sif, it says "what program would you like to use" - can i select always use notepad? or will that interfere with the functioning of the winnt.sif file during install?2) I'm having a problem with my [GuiRunOnce]. I need two things to run, but i need the second to not run until the first finishes.[GuiRunOnce] %systemdrive%\install\WPI20b\wpi.cmd %systemdrive%\install\cleanup.cmdWPI is intalling tons of programs, and takes a while. ONCE THAT FINISHES, I want to run cleanup (delete the temp install files - some of which are used for WPI).How do I do this correctly? Now the code deletes the files just as WPI starts... Link to comment Share on other sites More sharing options...
laurens Posted September 15, 2004 Share Posted September 15, 2004 co to properties of your winnt.sif and and look for chance somewere under the name of the file click on it and select notepad.and your second problem:put the *.cmd togeter so you have not two files but one file this is the easy way that there is Link to comment Share on other sites More sharing options...
a06lp Posted September 15, 2004 Author Share Posted September 15, 2004 laurens - 1) i know that, but can i select "always use..." for notepad? or will that interfere in some way with the unattended cd?2) i dont see how that will help - both files are running, its just that the second file runs too early. i need it to wait until WPI finishes... Link to comment Share on other sites More sharing options...
laurens Posted September 15, 2004 Share Posted September 15, 2004 1= yes there no chance for the file2= can you post your cmd? Link to comment Share on other sites More sharing options...
a06lp Posted September 15, 2004 Author Share Posted September 15, 2004 WPI.CMD@echo offstart /wait %systemdrive%\install\WPI20b\WPI.HTACLEANUP.CMDCLS@echo offTITLE Windows XP SP2 - CleanupECHO.shutdown.exe -r -f -t 60 -c "Windows XP will now restart in 1 minute..."ECHO Deleting Default Users of XP (Remote User, Help User, .NET User)... start /wait net user helpassistant /delete start /wait net user SUPPORT_388945a0 /delete start /wait net user ASPNET /deleteECHO Deleting Installation Shortcuts... //Standard Crap RD /S /Q "%AllUsersProfile%\Start Menu\Programs\PrintMe Internet Printing" RD /S /Q "%AllUsersProfile%\Start Menu\Programs\Java Web Start" DEL "%AllUsersProfile%\Start Menu\Programs\Windows Movie Maker.lnk" DEL "%UserProfile%\Start Menu\Programs\Remote Assistance.lnk" //Adobe Reader 6.0 DEL "%AllUsersProfile%\Desktop\Adobe Reader 6.0.lnk" //AIM DEL "%AllUsersProfile%\Desktop\Free AOL & Unlimited Internet.lnk" DEL "%AllUsersProfile%\Start Menu\Free AOL & Unlimited Internet.lnk" DEL "%AllUsersProfile%\Desktop\AOL Instant Messenger.lnk" DEL "%UserProfile%\Application Data\Microsoft\Internet Explorer\Quick Launch\AOL Instant Messenger.lnk" //Daemon Tools MOVE "%AllUsersProfile%\Desktop\DAEMON Tools.lnk" "%UserProfile%\Start Menu\" //TuneUp 2004 RD /S /Q "%UserProfile%\Start Menu\Programs\TuneUp Utilities 2004" DEL "%UserProfile%\Desktop\1-Click Maintenance.lnk" //Winamp DEL "%UserProfile%\Application Data\Microsoft\Internet Explorer\Quick Launch\Winamp.lnk" DEL "%UserProfile%\Desktop\Winamp.lnk" //WinRAR DEL "%UserProfile%\Start Menu\winrar.lnk"ECHO Deleting Sample Music, Playlists, and Pictures... RD /S /Q "%AllUsersProfile%\Documents\My Music\Sample Music\" RD /S /Q "%AllUsersProfile%\Documents\My Music\Sample Playlists\" RD /S /Q "%AllUsersProfile%\Documents\My Pictures\Sample Pictures\"ECHO Deleting Preset Internet Explorer Favorites... RD /S /Q "%UserProfile%\Favorites\"ECHO Deleting Temp Installation Files... RD /S /Q %systemdrive%\Drivers RD /S /Q %systemdrive%\Install RD /S /Q "%systemroot%\Cache\Adobe Reader 6\"EXIT Link to comment Share on other sites More sharing options...
buletov Posted September 15, 2004 Share Posted September 15, 2004 ...as laurens said, merge those two files into one. simple. Link to comment Share on other sites More sharing options...
a06lp Posted September 15, 2004 Author Share Posted September 15, 2004 If I do this (below), will it WAIT for WPI to be totally done? WPI is a check-box interface, once that finishes, it installs things in a runonceex kind of way,,, i want it to wait for all of that to finish.WPI.CMD@echo offstart /wait %systemdrive%\install\WPI20b\WPI.HTA ECHO.shutdown.exe -r -f -t 60 -c "Windows XP will now restart in 1 minute..."ECHO Deleting Default Users of XP (Remote User, Help User, .NET User)...start /wait net user helpassistant /deletestart /wait net user SUPPORT_388945a0 /delete start /wait net user ASPNET /deleteECHO Deleting Installation Shortcuts...//Standard CrapRD /S /Q "%AllUsersProfile%\Start Menu\Programs\PrintMe Internet Printing"RD /S /Q "%AllUsersProfile%\Start Menu\Programs\Java Web Start"DEL "%AllUsersProfile%\Start Menu\Programs\Windows Movie Maker.lnk"DEL "%UserProfile%\Start Menu\Programs\Remote Assistance.lnk"//Adobe Reader 6.0DEL "%AllUsersProfile%\Desktop\Adobe Reader 6.0.lnk"//AIMDEL "%AllUsersProfile%\Desktop\Free AOL & Unlimited Internet.lnk"DEL "%AllUsersProfile%\Start Menu\Free AOL & Unlimited Internet.lnk"DEL "%AllUsersProfile%\Desktop\AOL Instant Messenger.lnk"DEL "%UserProfile%\Application Data\Microsoft\Internet Explorer\Quick Launch\AOL Instant Messenger.lnk"//Daemon ToolsMOVE "%AllUsersProfile%\Desktop\DAEMON Tools.lnk" "%UserProfile%\Start Menu\"//TuneUp 2004RD /S /Q "%UserProfile%\Start Menu\Programs\TuneUp Utilities 2004"DEL "%UserProfile%\Desktop\1-Click Maintenance.lnk"//WinampDEL "%UserProfile%\Application Data\Microsoft\Internet Explorer\Quick Launch\Winamp.lnk"DEL "%UserProfile%\Desktop\Winamp.lnk"//WinRARDEL "%UserProfile%\Start Menu\winrar.lnk"ECHO Deleting Sample Music, Playlists, and Pictures...RD /S /Q "%AllUsersProfile%\Documents\My Music\Sample Music\"RD /S /Q "%AllUsersProfile%\Documents\My Music\Sample Playlists\"RD /S /Q "%AllUsersProfile%\Documents\My Pictures\Sample Pictures\"ECHO Deleting Preset Internet Explorer Favorites...RD /S /Q "%UserProfile%\Favorites\"ECHO Deleting Temp Installation Files...RD /S /Q %systemdrive%\DriversRD /S /Q %systemdrive%\InstallRD /S /Q "%systemroot%\Cache\Adobe Reader 6\"EXIT Link to comment Share on other sites More sharing options...
buletov Posted September 15, 2004 Share Posted September 15, 2004 well test it; i think it should wait... Link to comment Share on other sites More sharing options...
a06lp Posted September 15, 2004 Author Share Posted September 15, 2004 ... next install i'll test it. Link to comment Share on other sites More sharing options...
laurens Posted September 15, 2004 Share Posted September 15, 2004 good luck with testing Link to comment Share on other sites More sharing options...
a06lp Posted September 15, 2004 Author Share Posted September 15, 2004 well test it; i think it should wait...as i suspected, it did not work.It waits until the graphical check-box selection finished. but once that's done, it begins cleanup before the programs actually install.i guess i'll have to find another way to activate the cleanup AFTER the programs install....hmmm...How do I make a program (cleanup.cmd) run AFTER everything else is done? Link to comment Share on other sites More sharing options...
mazin Posted September 16, 2004 Share Posted September 16, 2004 Can't you put this line in your WPI.HTA: call %systemdrive%\install\cleanup.cmdAnd delete this line from your SIF: %systemdrive%\install\cleanup.cmd Link to comment Share on other sites More sharing options...
Jito463 Posted September 16, 2004 Share Posted September 16, 2004 (edited) What I did, and I don't know if this will work for what you use it for, is to create a batch file on the All Users desktop thatA) installs a reg entry to call a batch file that cleans up all the OEM installation files on next login andB) Runs Sysprep on the machine to reseal it for the customer.The next time it's booted up by the customer, it deletes all OEM installation files and is ready to go. Mind you, you could do that without using the Sysprep part if you don't need it.*RANT*SOMETIMES I HATE EMOTICONS!*RANT* Edited September 16, 2004 by Jito463 Link to comment Share on other sites More sharing options...
a06lp Posted September 19, 2004 Author Share Posted September 19, 2004 What I did, and I don't know if this will work for what you use it for, is to create a batch file on the All Users desktop thatA) installs a reg entry to call a batch file that cleans up all the OEM installation files on next login andB) Runs Sysprep on the machine to reseal it for the customer.The next time it's booted up by the customer, it deletes all OEM installation files and is ready to go. Mind you, you could do that without using the Sysprep part if you don't need it.*RANT*SOMETIMES I HATE EMOTICONS!*RANT*could you post your batch file so I can see your exmaple? Link to comment Share on other sites More sharing options...
Jito463 Posted September 19, 2004 Share Posted September 19, 2004 This is the batch file on the desktop that's run to setup the whole cleanup process:regedit /S C:\Windows\System32\OEMClean.regC:\OEM\Sysprep\sysprep.exeThe above two files were already copied from the $OEM$ directory.Windows Registry Editor Version 5.00[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce]"OEMCleanup"="C:\\Windows\\System32\\OEMClean.bat"This sets up the RunOnce key to call the necessary batch file:Deltree /Y C:\OEMDeltree /Y C:\Documents And Settings\All Users\Desktop\Sysprep.batDeltree /Y C:\Documents And Settings\All Users\Desktop\bit.batDeltree /Y C:\Windows\System32\proreg.regDeltree /Y C:\Windows\System32\ChngOwnr.regDeltree /Y C:\Windows\System32\OEMPrep.batDeltree /Y C:\Windows\System32\OEMClean.regDeltree /Y C:\Windows\System32\OEMClean.batAll the above files, including the deltree used during erasure, were copied from $OEM$. This runs on the next boot and cleans up everything, including itself. And in case you're wondering about the desktop icons, I used OEMPrep.bat called from the GUIRunOnce in winnt.sif:COPY C:\OEM\bit.bat "C:\Documents And Settings\All Users\Desktop"COPY C:\OEM\Sysprep.bat "C:\Documents And Settings\All Users\Desktop"REGEDIT /S ChngOwnr.regHope that helps someone. Link to comment Share on other sites More sharing options...
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