stuffman Posted August 7, 2006 Share Posted August 7, 2006 I use the RunOnceEx method, from cmdlines.txt I reference the runonce.cmd file which adds the following text to the registry:@echo offSET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceExREG ADD %KEY% /V TITLE /D "Installing Applications" /fREG ADD %KEY%\001 /VE /D "Symantec Client Security" /fREG ADD %KEY%\001 /V 1 /D "msiexec /i \"\\server\shared\Apps\Utilities\SAVclient10\Rollout\AVServer\CLIENTS\WIN32\Symantec Antivirus.msi\" INSTALLDIR=\"E:\Program Files\Symantec Antivirus\" REBOOT=Suppress RUNLIVEUPDATE=0 NETWORKTYPE=1 SERVERNAME=NCBGATEWAY /qb" /fREG ADD %KEY%\002 /VE /D "Adobe Acrobat Reader 7" /fREG ADD %KEY%\002 /V 1 /D "\\server\shared\msi\acrobat6\v70\acrobat7.msi INSTALLDIR=\"e:\Program Files\Adobe\Acrobat Reader\" /qb" /fREG ADD %KEY%\003 /VE /D "Symantec PC Anywhere" /fREG ADD %KEY%\003 /V 1 /D "\"C:\Apps\PCAnywhere\Symantec pcAnywhere - Full Product.msi\" /qb" /fREG ADD %KEY%\004 /VE /D "Microsoft Office 2000 SR-3" /fREG ADD %KEY%\004 /V 1 /D "\\server\shared\Apps\Productivity\MSOffice\Office2000\admin\setup.exe /qb" /fcopy "c:\scripts\PostInstall.lnk" "%AllUsersProfile%\start menu\programs\startup"exitUsing this method, along with AutoAdminLogon=1 and count set to 1, it installs SAV, PCAnywhere, Adobe Reader and Office 2000. I had to play with the order quite a bit, as Office 2000 wont wait until it's done, it will continue down the line to the next install before it finishes installing, which can complicate things. After those install, I have another script (using microsoft's scriptit.exe - A great app if you want to go low-tech) that installs our AS400 5250 client. All of this was made necessary by my company's desire to have all applications installed to the e:\ drive. It would have been much easier if they'd have let me install everything to one partition. Please let me know if you're interested in this method, I'll give whatever help I can. thanks,Stuff Link to comment Share on other sites More sharing options...
RogueSpear Posted August 7, 2006 Share Posted August 7, 2006 All of this sort of begs the question as to why group policy, SMS, or something else isn't being utilized for deployment of .msi based installs. Link to comment Share on other sites More sharing options...
stuffman Posted August 7, 2006 Share Posted August 7, 2006 At least in my organization, it all comes down to expense. I've had to McGyver a lot of things to get them to work, but they're 100% reliable now that I've gotten the bugs out. Link to comment Share on other sites More sharing options...
Steve.mccall Posted August 8, 2006 Author Share Posted August 8, 2006 (edited) All of this sort of begs the question as to why group policy, SMS, or something else isn't being utilized for deployment of .msi based installs.Well speaking from my point of view, our company does not as yet have much redundancy (although it's changing) and is currently changing quite a lot. My boss wants me to experiement with the different solutions to deployment as well as MS Update management (to name but a few things.) I think he likes the idea of a script for each type of machine. I am using GPO to change the general settings of the computers however (odbc, firewall RD etc)Steve Edited August 8, 2006 by Steve.mccall Link to comment Share on other sites More sharing options...
RogueSpear Posted August 8, 2006 Share Posted August 8, 2006 Well deploying .msi based software via group policy is a freebie since it's built right in. I've been using that method for about 6 years now and it works rather well. I also have a series of scripts assigned both to the computer and to the user based on OU. In the case of the machine scripts, a script unique to each OU performs it's duties and then calls a common script for those things every computer should perform at boot up. With good planning you can make a very efficient and reliable system this way. Link to comment Share on other sites More sharing options...
Br4tt3 Posted August 9, 2006 Share Posted August 9, 2006 I totally agree with RougeSpear's last post, the only downside to using AD's MSI capability is patching (.msp assigning) according to me. Link to comment Share on other sites More sharing options...
Steve.mccall Posted August 9, 2006 Author Share Posted August 9, 2006 Well personally I agree. From my limited experience It does seem that using the AD's deployment procedure would be a lot easier considering most of the software that has to be installed uses .msi. I have implemented a few registry key changes using AD. Unfortunately my boss has explicitly stated for me not to use this function as he has had lots of problems with software rollbacks in the past. I'm not about to argue with someone who constructed the network, so it has to be this way.I've decided to use a RunOnceEx.cmd and it works fine at the moment. But what I'd now like to know is it possible to use the same image and install different software. Below is the code I have so far...cmdow @ /HID@echo offSET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceExREG ADD %KEY% /V TITLE /D "Installing Applications" /fREG ADD %KEY%\010 /VE /D "Faxclient 12" /fREG ADD %KEY%\010 /V 1 /D "%systemdrive%\install\faxclient.msi /QN" /fREG ADD %KEY%\015 /VE /D "Adobe Reader 7" /fREG ADD %KEY%\015 /V 1 /D "%systemdrive%\install\Adobe\ar.msi /QN" /fREG ADD %KEY%\020 /VE /D "xxxx ULR 8.1.1" /fREG ADD %KEY%\020 /V 1 /D "\\xxxx\xxxx\Deployment\ULR Release Builds\ULR XP 8.1.1\ClaimTec 8.1.1.msi /QN" /fREG ADD %KEY%\025 /VE /D "Office 2003 std." /fREG ADD %KEY%\025 /V 1 /D "\\xxxx\Office2003\STD11.MSI /QB" /fREG ADD %KEY%\030 /VE /D "Cleaning Up and Rebooting" /fREG ADD %KEY%\030 /V 1 /D "%systemdrive%\install\cleanup.cmd" /fSome of the software (Faxclient, Adobe) needs to be on every machine but there will be different versions of office and other software for other builds of machine. Is there a way I can select between different RunOnceEx files based on which build I am creating. Would it be possible to create a variable entered during the initial setup screen that can be select a different runonceex.cmd. Or is there a much easier way of doing it?ThanksSteveEXIT Link to comment Share on other sites More sharing options...
Br4tt3 Posted August 9, 2006 Share Posted August 9, 2006 Hi!First you need to pinpoint on what basis diffrent installations will take place, what is the criteria to have SOFTWARE X installed, rather than SOFTWARE Z. This could be, people working at the finacial department needs to have the Office suite that includes Access while people working in the Resception only needs Word... in other words, create decision making criterias for yourself.Of course these criterias can based on anything from HW, geografic placement and so on...From what I understand u want to be able to install the diffrent softwares, depending on what u tap in when pressing F12? Thats fine, then what u need to do is create a custom .osc screen which create an variable for u: e.g %Which-RunExOnce-To-Run% for example. This variable "lives" within RIS until the temp .sif file has been created. Once the file has been created, the variable has been translated into whatever on supplied for value during the .osc screen, e.g %Which-RunExOnce-To-Run% into FullOffice or something...We discussed these features in the following thread! Link to comment Share on other sites More sharing options...
Steve.mccall Posted August 9, 2006 Author Share Posted August 9, 2006 (edited) Well, there are 4 main types of installation. All have the fax client and Adobe Reader and Office standard, whilst the management have Office Enterprise.Then depending on the machine use, (Claims, Ensign, Legal, Accounts) there is a whole subset of different software to be installed.Steve Edited August 9, 2006 by Steve.mccall Link to comment Share on other sites More sharing options...
Br4tt3 Posted August 9, 2006 Share Posted August 9, 2006 (edited) Here is a guy that is taking this approach seriously... http://ist.uwaterloo.ca/~etbain/RIS_Notes.html Edited August 9, 2006 by Br4tt3 Link to comment Share on other sites More sharing options...
Br4tt3 Posted August 9, 2006 Share Posted August 9, 2006 Hi again!Software to be installed on all machine: Intergrate into the main RIS installation is the easiest. Personally, I dont like intergration unless it is security patches.Software to be installed on a selection of machines: All I can think of is etiher as discussed, having some kind of criteria to base the decision on and a script to handle that criteria so it becomes automatic or if u r using tactic to place out the newly installed RIS clients in the correct OU structure. If u r placing the clients automatic into their correct OU structure (prestaging) then it is eazy. Just assing a login/startup script to that OU and have the installation take place from there.Of course, u can also have a combination of them, create a .osc screen where u can choose to place ur computer into the correct OU, a script will move to computer to the correct OU, once there, the startup/login script will take care of the installations... Link to comment Share on other sites More sharing options...
Steve.mccall Posted August 9, 2006 Author Share Posted August 9, 2006 Ha Ha! Plenty of time on his hands!I understand how to pass the variable into the the .sif file but how can I use it to select a different RunOnceEx files? do I call a script from the [RunOnceEx] section in the .sif file which will in turn use 'if' statements to call the relevent RunOnceEx file?Steve Link to comment Share on other sites More sharing options...
Br4tt3 Posted August 9, 2006 Share Posted August 9, 2006 (edited) U stated above u had a file named RunExOnce.cmd (now, I am not familiar with RunExOnce at all so bare with me.. ) but instead of having one file, u create multiples, for example named:1. Claims.cmd2. Ensign.cmd3. Legal.cmd4. Accounts.cmdNow these files will of course contain the code for installing software based on their departments, so far so good... For the time being we assume u store these scripts in ur root c: drive ($OEM$\$1)Now, if u create a custom .osc screen that will allow u to assign an variable that will handled/translated into an value (as written in the .osc screen) and then executed within the [GuiRunOnce] section of the .sif file it would be something like:.sif file before written to the client disk:[GuiRunOnce]Command0 = "c:\%RunExOnce%.cmd"We assume u tap in "Legal" in the .osc screen when pressing F12 and following the wiz. Once the .sif is written to client, the %RunExOnce% is translated into, guess what? "Legal" and the .sif that is to be executed on the client contains the following entry:[GuiRunOnce]Command0 = "c:\Legal.cmd" In other words, if u write Accounts, then it would say Accounts.cmd and so on... should solve ur dilemma if I understood u correctly!Hope it helps.. otherwise I am out of possibilities unless using the .msi/AD/SMS thingy's. Edited August 9, 2006 by Br4tt3 Link to comment Share on other sites More sharing options...
Steve.mccall Posted August 9, 2006 Author Share Posted August 9, 2006 I think that might be just about perfect!Thanks for all your help, truely.Steve Link to comment Share on other sites More sharing options...
Steve.mccall Posted August 10, 2006 Author Share Posted August 10, 2006 Ok, Almost perfect! So close! At the moment the gui section of the install completes. The computer restarts and doesn't autologin. Once I manually logon as administrator the relevant cmd file for the build type runs and the computer restarts. Then the computer logs on automatically (although not as a domain admin, just a local admin) and everything installs fine. All the code I use is shown below....sif template[data]AutoPartition=1floppyless = "1"msdosinitiated = "1"OriSrc = "\\%SERVERNAME%\RemInst\%INSTALLPATH%\%MACHINETYPE%"OriTyp = "4"LocalSourceOnCD = 1[SetupData]OsLoadOptions = "/noguiboot /fastdetect"SetupSourceDevice = "\Device\LanmanRedirector\%SERVERNAME%\RemInst\%INSTALLPATH%"[Unattended]UnattendMode=FullUnattendedOemSkipEula = yesOemPreinstall = yesOemSkipWelcome = 1TargetPath = \WINDOWSFileSystem = LeaveAloneNtUpgrade=NoOverwriteOemFilesOnUpgrade=NoOemPnPDriversPath="Drivers\000_chipset\IntelINF;Drivers\001_network\Marvell;Drivers\002_graphics\Intel;Drivers\003_audio;Drivers\004_SATA"DriverSigningPolicy=IgnoreExtendOEMPartition = 0InstallFilesPath = "\\%SERVERNAME%\RemInst\%INSTALLPATH%\%MACHINETYPE%"LegacyNIC = 1[UserData]ProductKey=xxxxFullName = "xxxx"OrgName = "%ORGNAME%"ComputerName = %MACHINENAME%[GuiUnattended]AdminPassword=xxxxEncryptedAdminPassword=noAutoAdminLogon=yesAutoAdminLogon=1ForceAutoLogon=1OemSkipRegional = 1TimeZone = %TIMEZONE%OemSkipWelcome = 1[GuiRunOnce]%systemdrive%\install\Login.cmd%systemdrive%\install\%BUILDTYPE%.cmd[Display]BitsPerPel = 32XResolution = 1024 YResolution = 768VRefresh = 60[RegionalSettings]LanguageGroup=1SystemLocale=00000809UserLocale=00000809InputLocale=0809:00000809[SetupMgr] DistFolder=C:\windist DistShare=windist[Networking] InstallDefaultComponents=Yes ProcessPageSections=No[Identification] DomainAdmin = xxxx DomainAdminPassword = xxxx JoinDomain = xxxx DoOldStyleDomainJoin = Yes[RemoteInstall]Repartition = YesUseWholeDisk = Yes[OSChooser]Description = "Gigabyte - GA-81945GMF v5 RunOnceEx.cmd"Help = "This will install Windows XP Pro SP2 Pro in a standard configuration. Installs LAN, Chipset, SATA and GFX drivers. Includes GuiRunOnce Office Std"LaunchFile = "%INSTALLPATH%\%MACHINETYPE%\templates\startrom.com"ImageType = "Flat"Login.cmdcmdow @ /HID@echo offSET KEY2="HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon"REG ADD %KEY2% /V DefaultPassword /D "xxxx" /f REG ADD %KEY2% /V DefaultUsername /D "xxxx" /fREG ADD %KEY2% /V AutoLogonCount /t REG_DWORD /d 1 /fREG ADD %KEY2% /V AutoAdminLogon /D "1" /fREG ADD %KEY2% /V ForceAutoLogon /D "1" /fshutdown.exe -r -f -t 10 -c "Windows XP will now restart in 10 seconds..."EXITClaimtec.cmdcmdow @ /HID@echo offSET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceExREG ADD %KEY% /V TITLE /D "Installing Claimtec Applications" /fREG ADD %KEY%\010 /VE /D "Faxclient 12" /fREG ADD %KEY%\010 /V 1 /D "%systemdrive%\install\faxclient.msi /QN" /fREG ADD %KEY%\015 /VE /D "Adobe Reader 7" /fREG ADD %KEY%\015 /V 1 /D "%systemdrive%\install\Adobe\ar.msi /QN" /fREG ADD %KEY%\020 /VE /D "Claimtec ULR 8.1.1" /fREG ADD %KEY%\020 /V 1 /D "%systemdrive%\install\ClaimTec.msi /QN" /fREG ADD %KEY%\025 /VE /D "Office 2003 std." /fREG ADD %KEY%\025 /V 1 /D "\\xxxx\Office2003\STD11.MSI /QB" /fREG ADD %KEY%\030 /VE /D "Cleaning Up and Rebooting" /fREG ADD %KEY%\030 /V 1 /D "%systemdrive%\install\cleanup.cmd" /fEXITOriginally login.cmd and claimtec.cmd were one file but I tried splitting them to get it to work. Would it work better if somehow coded the login script directly into the .sif template?Steve 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