Jump to content

Runonceex....doesn't


Recommended Posts

I can't figure this out. I've just converted my unattended CD from start.cmd to runonceex.cmd, but for some reason, either the runonceex.cmd never runs, or else it closes itself right from the beginning (or else something else is wrong). Can anyone help me with this? I'm also somewhat lazy, so my runonceex also contains some of the commands that I should have put in a seperate batch, and they get executed before adding reg keys, could that be the problem? And finally, I used the runonceex generator program, and then modified it from there to add a couple more programs.

winnt.sif in :\i386\


[Data]
MsDosInitiated = 0
UnattendedInstall = Yes

[Unattended]
UnattendMode = FullUnattended
UnattendSwitch = Yes
FileSystem = ConvertNTFS
Repartition = Yes
WaitForReboot = No
NoWaitAfterTextMode = 1
NoWaitAfterGUIMode = 1
OemPreinstall = Yes
OemSkipEula = Yes
TargetPath = "Windows"
DriverSigningPolicy = Ignore
NonDriverSigningPolicy = Ignore
Hibernation = No

[SystemFileProtection]
SFCQuota = 0

[Display]
Xresolution = 1024
Yresolution = 768
BitsPerPel = 32
Vrefresh = 75

[GuiUnattended]
AutoLogon = Yes
AdminPassword = removed
TimeZone = 35
OEMSkipRegional = 1
OemSkipWelcome = 1

[UserData]
ProductKey = "mwahahaha"
ComputerName = "removed"
FullName = "removed"
OrgName = "Somewhere..."

[RegionalSettings]
Language = 0409

[Identification]
DomainAdmin = Administrator
DomainAdminPassword = "removed"
JoinDomain = "removed"

cmdlines.txt in :\$OEM$\

cmdow @ /HID
@Echo Off

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:\win51ip.SP2 SET CDROM=%%i:

SET PP=%cdrom%\

rem This will correct the video resolution, if not already set to 1024*768*32, 75Hz

1365VidChng.exe 1024x768x32@75 -q

rem This will map the networked drives

net use n: \\server\apps /persistent: yes
net use o: \\server\net /persistent: yes
net use u: \\server\logon /persistent: yes

rem This section enables the "Quick Lauch" toolbar

reg load HKU\TempUser "C:\Documents and Settings\Default User\ntuser.dat"
reg add HKU\Tempuser\Software\Microsoft\Windows\CurrentVersion\Explorer\Streams\Desktop /V TaskbarWinXP /t REG_BINARY /d 0c000000080000000200000000000000b0e22bd86457d011a9
6e00c04fd705a222001c000a0100001a000000010000000000
000000000000000000004c0000000114020000000000c00000
00000000468300000010000000a0b0485e898dbd0100d89ee4
2a8dbd010045fe5e898dbd0100000000000000000100000000
0000000000000000000000130114001f0fe04fd020ea3a6910
a2d808002b30309d190023443a5c0000000000000000000000
000000000000cd971500310000000000af245cb9108057696e
6e7400002000310000000000af24a3b9100050726f66696c65
730050524f46494c4553001900310000000000c12408921000
69653530302e30303000002800310000000000c12408921000
4170706c69636174696f6e2044617461004150504c49437e31
002100310000000000c5229d9110004d6963726f736f667400
4d4943524f537e31002900310000000000d32232a61000496e
7465726e6574204578706c6f72657200494e5445524e7e3100
2400310000000000db2276ba1000517569636b204c61756e63
6800515549434b4c7e310000008d0000001c00000001000000
1c000000360000000df0adba8c0000001a00000003000000e7
182d231000000049453530305f58314300433a5c57494e4e54
5c50726f66696c65735c49453530302e3030305c4170706c69
636174696f6e20446174615c4d6963726f736f66745c496e74
65726e6574204578706c6f7265725c517569636b204c61756e
6368000010000000050000a01a000000a30000000000000008
00000002000000cc00000001000000030000004a0000000100
000040003200e6010000c424159f20004c61756e636820496e
7465726e6574204578706c6f7265722042726f777365722e6c
6e6b004c41554e43487e322e4c4e4b00000040000000020000
003600320048020000c424159f20004c61756e6368204f7574
6c6f6f6b20457870726573732e6c6e6b004c41554e43487e31
2e4c4e4b00000036000000000000002c00320051000000ec22
4639200053686f77204465736b746f702e7363660053484f57
44457e312e53434600000052000000e0000000000000001600
00000000000000000000160000000000000001000000010000
00aa4f2868486ad0118c7800c04fd918b437020000e0000000
00000000160000000000000000000000160000000000000001
000000 /f
reg unload HKU\TempUser />

rem This section adds software to be installed at the next boot, and then reboots

SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx

REG ADD %KEY% /V TITLE /D "Installing programs..." /f

REG ADD %KEY%\000 /VE /D "HP LaserJet 5" /f
REG ADD %KEY%\000 /V 1 /D "%cdrom%\Setup\hplj5.cmd" /f

REG ADD %KEY%\005 /VE /D "Mozilla Firefox 1.0" /f
REG ADD %KEY%\005 /V 1 /D "%cdrom%\Setup\Apps\Firefox.exe" /f

REG ADD %KEY%\010 /VE /D "VCE General Hospital" /f
REG ADD %KEY%\010 /V 1 /D "%cdrom%\Setup\Apps\VCE_GH.exe" /f

REG ADD %KEY%\015 /VE /D "VCE Medical-Surgical" /f
REG ADD %KEY%\015 /V 1 /D "%cdrom%\Setup\Apps\VCE_MSTI.exe" /f

REG ADD %KEY%\020 /VE /D "MS Office 2003 (Word, Excel, and PowerPoint)" /f
REG ADD %KEY%\020 /V 1 /D "%cdrom%\Setup\Apps\Office.exe" /f

REG ADD %KEY%\025 /VE /D "MS Frontpage 2003" /f
REG ADD %KEY%\025 /V 1 /D "%cdrom%\Setup\Apps\Frontpage.exe" /f

REG ADD %KEY%\026 /VE /D "Ad-Aware Pro" /f
REG ADD %KEY%\026 /V 1 /D "%cdrom%\%cdrom%\Setup\Apps\Aawaawsepro.exe /S" /f
REG ADD %KEY%\026 /V 2 /D "taskkill /IM Adaware.exe /F" /f
REG ADD %KEY%\026 /V 3 /D "taskkill /IM hh.exe /F" /f
REG ADD %KEY%\026 /V 4 /D "taskkill /IM Ad-Aware.exe /F" /f

REG ADD %KEY%\030 /VE /D "Spybot S&D" /f
REG ADD %KEY%\030 /V 1 /D "%cdrom%\Setup\Apps\spybot\spybotsd13.exe /silent" /f

REG ADD %KEY%\035 /VE /D "SpyBot S&D Updates" /f
REG ADD %KEY%\035 /V 1 /D "%cdrom%\Setup\Apps\spybot\spyupd.exe" /f

REG ADD %KEY%\040 /VE /D "AOL Instant Messenger" /f
REG ADD %KEY%\040 /V 1 /D "%cdrom%\Setup\Apps\AIMInstall.exe" /f

REG ADD %KEY%\045 /VE /D "McAfee AntiVirus 7" /f
REG ADD %KEY%\045 /V 1 /D "%cdrom%\Setup\Apps\McAfee\McAfee.exe" /f

REG ADD %KEY%\050 /VE /D "McAfee Updates (12/29/04)" /f
REG ADD %KEY%\050 /V 1 /D "%cdrom%\Setup\Apps\McAfee\sdat4417.exe /silent" /f

REG ADD %KEY%\055 /VE /D "FirstClass 8.0 SP1" /f
REG ADD %KEY%\055 /V 1 /D "%cdrom%\Setup\Apps\FirstClass.exe" /f

REG ADD %KEY%\060 /VE /D "QuickTime Alternative 1.39" /f
REG ADD %KEY%\060 /V 1 /D "%cdrom%\Setup\Apps\quicktimealt139.exe /verysilent /sp-" /f

REG ADD %KEY%\065 /VE /D "Real Alternative 1.29" /f
REG ADD %KEY%\065 /V 1 /D "%cdrom%\Setup\Apps\realalt129.exe /verysilent /sp-" /f

REG ADD %KEY%\070 /VE /D "WinRAR 3.42" /f
REG ADD %KEY%\070 /V 1 /D "%cdrom%\Setup\Apps\wrar342.exe /s" /f

REG ADD %KEY%\000 /VE /D "Acrobat Reader 6.0" /f
REG ADD %KEY%\000 /V 1 /D "%cdrom%\Setup\Apps\AdbeRdr60_enu_full.exe -p"-s /v\"/qn\""" /f

REG ADD %KEY%\080 /VE /D "Java Runtime 5.0.1" /f
REG ADD %KEY%\080 /V 1 /D "%cdrom%\Setup\Apps\jre501.exe" /f

REG ADD %KEY%\085 /VE /D "Macromedia Shockwave/Flash Player 10.0" /f
REG ADD %KEY%\085 /V 1 /D "%cdrom%\Setup\Apps\mm_fl_sw_installer.exe /s" /f

REG ADD %KEY%\090 /VE /D "Apply Registry Tweaks" /f
REG ADD %KEY%\090 /V 1 /D "REGEDIT /S %cdrom%\Setup\RegTweaks.reg" /f

REG ADD %KEY%\095 /VE /D "Reboot the computer to finish installation"
RED ADD %KEY%\095 /V 1 /D "shutdown.exe -r -f -t 60 -c "Windows XP will now restart in 1 minute..."

EXIT

Link to comment
Share on other sites


Personally, I'm a batch file man

haven't figured out the runonceex.cmd thingy yet

I guess it makes sense :wacko:

my question is, does cmdlines.txt automatically know the runonceex.cmd is in the $OEM$ or does it need a path to know that?

and is $OEM$ the correct place to put it on the cd?

Link to comment
Share on other sites

your winnt.sif looks good

this is what i use for my runonceEX.cmd

I dont recognize this code that you used.

SET PP=%cdrom%\
FOR %%d 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 %%d\win51 SET CDROM=%%d

cmdow @ /HID

@ECHO OFF

SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx

REG ADD %KEY%\001 /V 1 /D "%cdrom%\Software\WPI\WPI.cmd" /f

EXIT

I also suggest that you remove your regtweak from your RunonceEX.cmd

Instead make a RegistryTweaks.reg file

and from your CMDlines.txt you add this code

[COMMANDS]"REGEDIT /S tweaks.reg"

"RunonceEX.cmd"

I also suggest that you extend the time of your shut down. Once problem

that you MIGHT encounter is that if your have a slower or older pc

your themes might not hv time to be properly applied.

REG ADD %KEY%\095 /VE /D "Reboot the computer to finish installation"

RED ADD %KEY%\095 /V 1 /D "shutdown.exe -r -f -t 60 -c "Windows XP will now restart in 1 minute..."

try 2 mins instead. I hv a new P4 3.4 and I hv mine at 3 mins.

good luck on your progress. will be here to help when u move to wpi :thumbup

Link to comment
Share on other sites

Try this works fine for me. Add all other stuff to another .cmd .

cmdow @ /HID
@Echo Off
FOR %%d 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 %%d\WIN51 SET CDROM=%%d
SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx
REG ADD %KEY% /V TITLE /D "Installing programs..." /f

REG ADD %KEY%\000 /VE /D "HP LaserJet 5" /f
REG ADD %KEY%\000 /V 1 /D "%cdrom%\Setup\hplj5.cmd" /f

REG ADD %KEY%\005 /VE /D "Mozilla Firefox 1.0" /f
REG ADD %KEY%\005 /V 1 /D "%cdrom%\Setup\Apps\Firefox.exe" /f

REG ADD %KEY%\010 /VE /D "VCE General Hospital" /f
REG ADD %KEY%\010 /V 1 /D "%cdrom%\Setup\Apps\VCE_GH.exe" /f

REG ADD %KEY%\015 /VE /D "VCE Medical-Surgical" /f
REG ADD %KEY%\015 /V 1 /D "%cdrom%\Setup\Apps\VCE_MSTI.exe" /f

REG ADD %KEY%\020 /VE /D "MS Office 2003 (Word, Excel, and PowerPoint)" /f
REG ADD %KEY%\020 /V 1 /D "%cdrom%\Setup\Apps\Office.exe" /f

REG ADD %KEY%\025 /VE /D "MS Frontpage 2003" /f
REG ADD %KEY%\025 /V 1 /D "%cdrom%\Setup\Apps\Frontpage.exe" /f

REG ADD %KEY%\026 /VE /D "Ad-Aware Pro" /f
REG ADD %KEY%\026 /V 1 /D "%cdrom%\%cdrom%\Setup\Apps\Aawaawsepro.exe /S" /f
REG ADD %KEY%\026 /V 2 /D "taskkill /IM Adaware.exe /F" /f
REG ADD %KEY%\026 /V 3 /D "taskkill /IM hh.exe /F" /f
REG ADD %KEY%\026 /V 4 /D "taskkill /IM Ad-Aware.exe /F" /f

REG ADD %KEY%\030 /VE /D "Spybot S&D" /f
REG ADD %KEY%\030 /V 1 /D "%cdrom%\Setup\Apps\spybot\spybotsd13.exe /silent" /f

REG ADD %KEY%\035 /VE /D "SpyBot S&D Updates" /f
REG ADD %KEY%\035 /V 1 /D "%cdrom%\Setup\Apps\spybot\spyupd.exe" /f

REG ADD %KEY%\040 /VE /D "AOL Instant Messenger" /f
REG ADD %KEY%\040 /V 1 /D "%cdrom%\Setup\Apps\AIMInstall.exe" /f

REG ADD %KEY%\045 /VE /D "McAfee AntiVirus 7" /f
REG ADD %KEY%\045 /V 1 /D "%cdrom%\Setup\Apps\McAfee\McAfee.exe" /f

REG ADD %KEY%\050 /VE /D "McAfee Updates (12/29/04)" /f
REG ADD %KEY%\050 /V 1 /D "%cdrom%\Setup\Apps\McAfee\sdat4417.exe /silent" /f

REG ADD %KEY%\055 /VE /D "FirstClass 8.0 SP1" /f
REG ADD %KEY%\055 /V 1 /D "%cdrom%\Setup\Apps\FirstClass.exe" /f

REG ADD %KEY%\060 /VE /D "QuickTime Alternative 1.39" /f
REG ADD %KEY%\060 /V 1 /D "%cdrom%\Setup\Apps\quicktimealt139.exe /verysilent /sp-" /f

REG ADD %KEY%\065 /VE /D "Real Alternative 1.29" /f
REG ADD %KEY%\065 /V 1 /D "%cdrom%\Setup\Apps\realalt129.exe /verysilent /sp-" /f

REG ADD %KEY%\070 /VE /D "WinRAR 3.42" /f
REG ADD %KEY%\070 /V 1 /D "%cdrom%\Setup\Apps\wrar342.exe /s" /f

REG ADD %KEY%\000 /VE /D "Acrobat Reader 6.0" /f
REG ADD %KEY%\000 /V 1 /D "%cdrom%\Setup\Apps\AdbeRdr60_enu_full.exe -p"-s /v\"/qn\""" /f

REG ADD %KEY%\080 /VE /D "Java Runtime 5.0.1" /f
REG ADD %KEY%\080 /V 1 /D "%cdrom%\Setup\Apps\jre501.exe" /f

REG ADD %KEY%\085 /VE /D "Macromedia Shockwave/Flash Player 10.0" /f
REG ADD %KEY%\085 /V 1 /D "%cdrom%\Setup\Apps\mm_fl_sw_installer.exe /s" /f

REG ADD %KEY%\090 /VE /D "Apply Registry Tweaks" /f
REG ADD %KEY%\090 /V 1 /D "REGEDIT /S %cdrom%\Setup\RegTweaks.reg" /f

REG ADD %KEY%\095 /VE /D "Reboot the computer to finish installation"
RED ADD %KEY%\095 /V 1 /D "shutdown.exe -r -f -t 60 -c "Windows XP will now restart in 1 minute..."

EXIT

Link to comment
Share on other sites

Your error is in this line:

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:\win51ip.SP2 SET CDROM=%%i:

%%i already contains a : at the end, so your line should be:

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\win51ip.SP2 SET CDROM=%%i

Link to comment
Share on other sites

wow thanks for the help. BTW, the

SET PP=%CDROM%\

is added by the runonceex maker, it's completely unused, I got rid of it once, but I must've forgotten to save it, it's been completely removed now. That runonceex.cmd creator has some serious issues, that malformed %cdrom% detection error, the %pp% thing (which causes the cdrom to be called twice, it adds %PP% before the path), and any time you access the "file" menu, it asks you to save...

Anyways, I think runonceex is complex enough for me, asta, my cd right now is at 696mb, I wanna get it running and leave it alone ;) also, I have no custom themes, and those VCE programs take ~5min apiece to extract on the test machine I've got, so there shouldn't be any problems...I hope.

edit: and it works perfectly, thanks again guys!

Link to comment
Share on other sites

  • 2 weeks later...

:hello::thumbup B)

I have a curious question on an unattended install and I have to add only two lines to a runonceex, do I just add the lines or do I have to add all those lines with it?

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