Br4tt3 Posted August 16, 2006 Share Posted August 16, 2006 Hmmm....I dont understand it but anyway... reommend:[GuiRunOnce]Command0 = "Start /Wait cmd.exe /c c:\install\Install-Application-1.cmd"Command1 = "Start /Wait cmd.exe /c c:\install\Install-Application-2.cmd"Command2 = "Start /Wait cmd.exe /c c:\install\Install-Application-3.cmd"And it still doesn't work? Then try adding one application and then the next one until done... to figure out if there is one specific install that messes up the flow.. Link to comment Share on other sites More sharing options...
Steve.mccall Posted August 16, 2006 Author Share Posted August 16, 2006 What I am going to try now is using wise installer or installshield to package the installers into independent units. That should work better I think.Steve Link to comment Share on other sites More sharing options...
theunknown Posted August 28, 2006 Share Posted August 28, 2006 Not sure how many people are interested in my RIS application install method, but figured i'd share it just in case.Basically my RunOnceEx.bat contains all the switches required for all available applications to install across my entire network (350+ machines). When it executes because of my site naming convention (EG C2-01) it breaks up the name to determin the room and required room config.From there it parses a pre set list for that room of what is needed and applies the appropriate keys to RunOnceEx. AutoLogon keys are added for a single logon then the machine is restarted. It logs on, installs all the appropriate applications restarts again ready for use.Here's an example of the scripts, mine carries about 50 different apps but for explaining ive cut most of it out.RunOnceEx.batcmdow @ /HID@echo off::SETS AUTOLOGON KEYSET KEY=HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon::ENABLES SINGLE ADMIN LOGONREG ADD "%KEY%" /f /v DefaultDomainName /t REG_SZ /d DOMAINREG ADD "%KEY%" /f /v AltDefaultDomainName /t REG_SZ /d DOMAINREG ADD "%KEY%" /f /v DefaultUserName /t REG_SZ /d USERNAMEREG ADD "%KEY%" /f /v AltDefaultUserName /t REG_SZ /d USERNAMEREG ADD "%KEY%" /f /v DefaultPassword /t REG_SZ /d PASSWORDREG ADD "%KEY%" /f /v AutoLogonCount /t REG_DWORD /d 1REG ADD "%KEY%" /f /v AutoAdminLogon /t REG_SZ /d 1REG ADD "%KEY%" /f /v DontDisplayLastUserName /t REG_DWORD /d 0::SETS RUNONCEEX TITLE AND WORKING KEYSET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceExREG ADD %KEY% /V TITLE /D "Installing Applications" /f::CREATES CLEANUP.CMDset CLEANUPATH=%SystemDrive%\CleanUp.cmdecho cmdow @ /HID>%CLEANUPATH%echo @echo off>>%CLEANUPATH%::MOUNTS APPLICATION WORKING DIRECTORYREG ADD %KEY%\001 /VE /D "Mounting Applications Folder" /fREG ADD %KEY%\001 /V 1 /D "NET USE Y: \\RISServer\Applications$" /f::APPLYS APPROPRIATE KEYS FOR SITE/CURRENT ROOM/MACHINEfor /f "tokens=1* delims=-" %%a in ("%COMPUTERNAME%") DO SET ROOMNAME=%%aif exist RoomConfig\ALLROOMS.txt for /f "tokens=* delims= " %%a in (RoomConfig\AllRooms.txt) DO if not '%%a'=='' call :%%aif exist RoomConfig\%ROOMNAME%.txt for /f "tokens=* delims= " %%a in (RoomConfig\%ROOMNAME%.txt) DO if not '%%a'=='' call :%%aif exist RoomConfig\%COMPUTERNAME%.txt for /f "tokens=* delims= " %%a in (RoomConfig\%COMPUTERNAME%.txt) DO if not '%%a'=='' call :%%a::UNMOUNTS APPLICATION WORKING DIRECTORYREG ADD %KEY%\998 /VE /D "Removing Applications Folder" /fREG ADD %KEY%\998 /V 1 /D "NET USE Y: /DELETE" /f::FINALIZES CLEANUP.CMD AND ADDS IT TO RUNONCEEXecho SHUTDOWN /R /M \\%COMPUTERNAME% /T 02 /f>>%CLEANUPATH%echo DEL /F /Q %CLEANUPATH%>>%CLEANUPATH%REG ADD %KEY%\999 /VE /D "Cleaning up and Restarting" /fREG ADD %KEY%\999 /V 1 /D "%CLEANUPATH%" /f::EXITS RUNONCEEX SCRIPTEXIT:APP1REG ADD %KEY%\010 /VE /D "Application 1" /fREG ADD %KEY%\010 /V 1 /D "App1 Install Path" /fgoto :eof:APP2REG ADD %KEY%\020 /VE /D "Application 2" /fREG ADD %KEY%\020 /V 1 /D "App2 Install Path" /fgoto :eof:APP3REG ADD %KEY%\030 /VE /D "Application 3" /fREG ADD %KEY%\030 /V 1 /D "App3 Install Path" /fgoto :eof:APP4REG ADD %KEY%\040 /VE /D "Application 4" /fREG ADD %KEY%\040 /V 1 /D "App4 Install Path" /fgoto :eofRoomConfig\ALLROOMS.txtAPP1APP2RoomConfig\C2.txtAPP3RoomConfig\C2-03.txtAPP4So in the above example my entire site recieves APP1 & APP2 - Room C2 recives APP3 - and only machine 3 in room C2 recieves APP4.Its far more versatile than that, if you want to add clean up lines to the cleanup script depending on what applications you install a line such as echo DEL C:\*.tmp>>%CLEANUPATH% under :APP4 would delete all .tmp files only when you specify APP4 to be installed.Hopefully someone finds it useful, i hated all the alternatives requiring me to replicate install code for each different config. now all i need to do when i get new machines is name the machines right and create a new txt file in roomconfig and RIS + This script looks after the rest.New applications i simple add the silent install switch once to RunOnceEx.cmd, reference in the appropriate room txt files and when the machines are next rebuilt that app is included.hopefully someone finds it useful, and if you need more explanation ill be more than happy to help out.regards theunknown Link to comment Share on other sites More sharing options...
theunknown Posted September 27, 2006 Share Posted September 27, 2006 slight update for those interested, i ran into the need to exclude apps from certain rooms, this is the fix to allow it.change::APPLYS APPROPRIATE KEYS FOR SITE/CURRENT ROOM/MACHINEfor /f "tokens=1* delims=-" %%a in ("%COMPUTERNAME%") DO SET ROOMNAME=%%aif exist RoomConfig\ALLROOMS.txt for /f "tokens=* delims= " %%a in (RoomConfig\AllRooms.txt) DO if not '%%a'=='' call :%%aif exist RoomConfig\%ROOMNAME%.txt for /f "tokens=* delims= " %%a in (RoomConfig\%ROOMNAME%.txt) DO if not '%%a'=='' call :%%aif exist RoomConfig\%COMPUTERNAME%.txt for /f "tokens=* delims= " %%a in (RoomConfig\%COMPUTERNAME%.txt) DO if not '%%a'=='' call :%%ato::APPLYS APPROPRIATE KEYS FOR SITE/CURRENT ROOM/MACHINEfor /f "tokens=1* delims=-" %%a in ("%COMPUTERNAME%") DO SET ROOMNAME=%%aif not exist Exclude md Excludeif exist RoomConfig\ALLROOMS.txt for /f "tokens=1* delims= " %%a in (RoomConfig\AllRooms.txt) DO if not '%%a'=='' if '%%b'=='NO' (echo.>Exclude\%%a.txt) else echo %%a>>temp.txtif exist RoomConfig\%ROOMNAME%.txt for /f "tokens=1* delims= " %%a in (RoomConfig\%ROOMNAME%.txt) DO if not '%%a'=='' if '%%b'=='NO' (echo.>Exclude\%%a.txt) else echo %%a>>temp.txtif exist RoomConfig\%COMPUTERNAME%.txt for /f "tokens=1* delims= " %%a in (RoomConfig\%COMPUTERNAME%.txt) DO if not '%%a'=='' if '%%b'=='NO' (echo.>Exclude\%%a.txt) else echo %%a>>temp.txtif exist temp.txt for /f "tokens=* delims= " %%a in (temp.txt) DO if not exist Exclude\%%a.txt call:%%aif exist temp.txt del /F /Q temp.txtif exist Exclude RD /S /Q Excludethis way you can doRoomConfig\C2-04.txtAPP2 NOand computer C2-04 wont get APP2, this can be done for site/rooms/individual computers.regards, theunknown 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