Steve.mccall Posted August 7, 2006 Share Posted August 7, 2006 (edited) Hi,I'm having a few problems.Basically I Need to deploy multiple images of computers via RIS using a windows image file with different templates to install different applications although there is a basic requirement of applications for every computer. So far I have hard coded the commands into the template file as I have little experience of writing scripting. Unfortunately I'm having a number of problems and the only thing I can get to work is the odbc and faxclient.[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=*****FullName = "*****"OrgName = "%ORGNAME%"ComputerName = %MACHINENAME%[GuiUnattended]AdminPassword=*****EncryptedAdminPassword=YesAutoLogon=YesAutoLogonCount=4OemSkipRegional = 1TimeZone = %TIMEZONE%OemSkipWelcome = 1[GuiRunOnce]DriverSigningPolicy=Ignore"regedit /s %systemdrive%\install\odbc.reg""%systemdrive%\install\faxclient.msi /QN""\\*****\Office2003\STD11.MSI /QB""%systemdrive%\install\MapULRDrive.vbs""J:\ULR XP 7.8\setup /s""%systemdrive%\install\patch7.8.2.bat""Z:\Software Installation\Misc\AdbeRdr70_enu_full.exe /s"[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 = Administrator DomainAdminPassword = ***** JoinDomain = ***** DoOldStyleDomainJoin = Yes[RemoteInstall]Repartition = YesUseWholeDisk = Yes[OSChooser]Description = "Gigabyte - GA-81945GMF v4 Faxclient, Office Std. Claimtec ULR. Adobe."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"I've removed a few things but that is basically my template file. Any help at all would be brilliant. The DriverSigning = ignore shouldn't be there either, but it all starts to go wrong at the install of MS Office. I get an error saying an install is already in progress. I need to somehow add a break or a restart before the Office is installed.Oh and also the computer does not autologon...ThanksSteve Edited August 7, 2006 by Steve.mccall Link to comment Share on other sites More sharing options...
Br4tt3 Posted August 7, 2006 Share Posted August 7, 2006 Hi!Try using a single .cmd file or .vbs file for the whole [GuiRunOnce] section that will run the installation for u in a more structured way. If using a .cmd file, u can controll the installation sequence by using the Start /Wait as described @ this site, or if using a .vbs file u can control it even better when using this example code:Set WshShell = WScript.CreateObject("WScript.Shell")Command = "C:\MyAppz\App1\RunApp.exe /param1 /param2"WshShell.Run Command, 0, TrueWhere the 0 stands for: "wait until the process ends and then continue... with the next one?" while if setting a 1 instead will kick of one setup and directly go to the next one. True/False, turns on/off visibility of the process.Hope it helps.. Link to comment Share on other sites More sharing options...
Steve.mccall Posted August 7, 2006 Author Share Posted August 7, 2006 (edited) Hi!Try using a single .cmd file or .vbs file for the whole [GuiRunOnce] section that will run the installation for u in a more structured way. If using a .cmd file, u can controll the installation sequence by using the Start /Wait as described @ this site, or if using a .vbs file u can control it even better when using this example code:Set WshShell = WScript.CreateObject("WScript.Shell")Command = "C:\MyAppz\App1\RunApp.exe /param1 /param2"WshShell.Run Command, 0, TrueWhere the 0 stands for: "wait until the process ends and then continue... with the next one?" while if setting a 1 instead will kick of one setup and directly go to the next one. True/False, turns on/off visibility of the process.Hope it helps..Thanks, that is a great help. By making the process invisible, will it silently install or do I need to control that with command line arguments?Steve Edited August 7, 2006 by Steve.mccall Link to comment Share on other sites More sharing options...
Br4tt3 Posted August 7, 2006 Share Posted August 7, 2006 (edited) lo again..******************************************Thanks, that is a great help. By making the process invisible, will it silently install or do I need to control that with command line arguments?Steve******************************************First of all, I hasted, the 0/1 controls the visibility/silent features, the True or False, controls if it is to wait until process has been completed before continuing. There is 2 ways do it... either you control the quiet/silent installations via the .exe or .msi source binary or via the host that is performing the installation for you (wsh or any other). In other words:Ex 1.msiexec /I my_msi_app.msi /quiet (where the /quiet switch will inform the install that - show no UI)Ex 2.An MS KB fix: KB392012.exe /quiet /norestart (same as above.. more or less)A combination:Set WshShell = WScript.CreateObject("WScript.Shell")Command = "C:\MyAppz\App1\RunApp.exe /param1 /param2"WshShell.Run Command, 0, TrueWill install silently, because the script host will be informed due to the 0 that it is to invisible, to the UI.Set WshShell = WScript.CreateObject("WScript.Shell")Command = "C:\MyAppz\App1\RunApp.exe /quiet"WshShell.Run Command, 1, TrueWill be silent, because the command string indicates to the setup engine, that show no UI (rather than the script host in the other example)Set WshShell = WScript.CreateObject("WScript.Shell")Command = "C:\MyAppz\App1\RunApp.exe /quiet /param2"WshShell.Run Command, 0, TrueTotally unnecessary, but possible... I supplied the silent parameter both to the script host, and to the .exe binary setup engine. I recommend u start using one of the methods, so that u have a unified way of controlling the installation behaviours, I recommend the host method as NOT all binries support the silent features.Hope that works out for you... Edited August 7, 2006 by Br4tt3 Link to comment Share on other sites More sharing options...
Steve.mccall Posted August 7, 2006 Author Share Posted August 7, 2006 Brilliant thanks,So if I create a script like this...Set WshShell = WScript.CreateObject("WScript.Shell")Command = "C:\MyAppz\App1\RunApp.exe /param1 /param2"WshShell.Run Command, 0, TrueSet WshShell = WScript.CreateObject("WScript.Shell")Command = "C:\MyAppz\App2\RunApp.exe /param1 /param2"WshShell.Run Command, 0, TrueWith essentially the same command for each different app, will it install them in sequence? The 'True' argument will make it wait to start the next command?I started trying to develop a RunOnceEx.cmd file with key entries for each application but this method seems better as I'd imagine customising what applications are installed for each difference specification of machine would be difficult.Steve Link to comment Share on other sites More sharing options...
Br4tt3 Posted August 7, 2006 Share Posted August 7, 2006 With essentially the same command for each different app, will it install them in sequence? The 'True' argument will make it wait to start the next command?YES! So if I create a script like this...Set WshShell = WScript.CreateObject("WScript.Shell")Command = "C:\MyAppz\App1\RunApp.exe /param1 /param2"WshShell.Run Command, 0, TrueSet WshShell = WScript.CreateObject("WScript.Shell")Command = "C:\MyAppz\App2\RunApp.exe /param1 /param2"WshShell.Run Command, 0, TrueWell, Yes but, it is not very nice coding but it will work.. just so that I dont get blamed for this, only need do create WshShell object once within the script, as in:Option ExplicitDim WshShell, CommandSet WshShell = WScript.CreateObject("WScript.Shell")Command = "C:\MyAppz\App1\RunApp.exe /param1 /param2"WshShell.Run Command, 0, TrueCommand = "C:\MyAppz\App2\RunApp.exe /param1 /param2"WshShell.Run Command, 0, TrueCommand = and so on....horrible but it will work...I started trying to develop a RunOnceEx.cmd file with key entries for each application but this method seems better as I'd imagine customising what applications are installed for each difference specification of machine would be difficult.Dunno, never used the RunOnceEx method, maby even better, who knows? Link to comment Share on other sites More sharing options...
Steve.mccall Posted August 7, 2006 Author Share Posted August 7, 2006 'horrible but it will work...'Would it be better to create a single vb script file for each application and then link the relevant vb script files in the template file for each different installation?Or would it be better to create a single vbscript file for each installation?Thanks again for your help!Steve Link to comment Share on other sites More sharing options...
Br4tt3 Posted August 7, 2006 Share Posted August 7, 2006 Mostly what one wanna acchieve... I would say it is better to have one script performing all of the installs but that is just me. Link to comment Share on other sites More sharing options...
RogueSpear Posted August 7, 2006 Share Posted August 7, 2006 If you're a systems admin you seriously owe it to yourself to get even just mildly aquainted with VBscript and Windows Script Host. It's really not all that difficult to pick up, there are tons and tons of free resources out there to learn from, and in the end it will make your life much easier. Once you have the basics down it can really become downright addictive having the ability to automate so many things.If you ever need some examples of VBscript that would be applicable to unattended installations, take a peek at my ScriptPack (link in the signature). Link to comment Share on other sites More sharing options...
Br4tt3 Posted August 7, 2006 Share Posted August 7, 2006 ...really become downright addictive having the ability to automate so many things...hahaha... I know what u mean! I guess ur gf doesnt though! Link to comment Share on other sites More sharing options...
RogueSpear Posted August 7, 2006 Share Posted August 7, 2006 Well my wife doesn't mind things being automated so much, but my girlfriend is another story Link to comment Share on other sites More sharing options...
Steve.mccall Posted August 7, 2006 Author Share Posted August 7, 2006 If you're a systems admin you seriously owe it to yourself to get even just mildly aquainted with VBscript and Windows Script Host. It's really not all that difficult to pick up, there are tons and tons of free resources out there to learn from, and in the end it will make your life much easier. Once you have the basics down it can really become downright addictive having the ability to automate so many things.If you ever need some examples of VBscript that would be applicable to unattended installations, take a peek at my ScriptPack (link in the signature).Yeah, I am starting to learn it. I've only just started my first job as a lowly tech support / developer so I'm at the bottom of the ladder. I've got a good grasp of php, html, java etc so it shouldn't be too difficult to learn.Steve Link to comment Share on other sites More sharing options...
Steve.mccall Posted August 7, 2006 Author Share Posted August 7, 2006 OK,I've tried thisOption ExplicitDim WshShell, CommandSet WshShell = WScript.CreateObject("WScript.Shell")Command = "%systemdrive%\install\AdbeRdr70_enu_full.exe /param1 /param2"WshShell.Run Command, 0, TrueCommand = "%systemdrive%\install\faxclient.msi /param1 /param2"WshShell.Run Command, 0, TrueIt starts to install adobe but still wants me to press next etc (i.e. not silent) and then gets stuck before installing the faxclient and doesn't get any further. And I still can't get it to auto logon.Steve Link to comment Share on other sites More sharing options...
RogueSpear Posted August 7, 2006 Share Posted August 7, 2006 I'm not entirely sure what the command line options are for Adobe Reader's exe file. But if you run it manually you can snag the resulting .msi file (and the accompanting data files). Then you would just use standard msiexec commands: msiexec /i adobereader.msi /qnIf you don't mind taking the easy way out, you could always download one of several switchless silent installers for Adobe Reader. I maintain one as well as RyanVM and I'm sure a few others. Link to comment Share on other sites More sharing options...
Steve.mccall Posted August 7, 2006 Author Share Posted August 7, 2006 I'm not entirely sure what the command line options are for Adobe Reader's exe file. But if you run it manually you can snag the resulting .msi file (and the accompanting data files). Then you would just use standard msiexec commands: msiexec /i adobereader.msi /qnIf you don't mind taking the easy way out, you could always download one of several switchless silent installers for Adobe Reader. I maintain one as well as RyanVM and I'm sure a few others.Great, that will work I think.ThanksSteve 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