Jump to content

rdallimore

Member
  • Posts

    1
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    country-ZZ

Everything posted by rdallimore

  1. Hi All - this is my 1st post - and my take on the multiple machine question. I have written a WMI script that is called during runOnceCmd.cmd. The script uses WMI and finds the machine type, then based on what is found adds some lines to some runoncekeys to add some additional software: example below. This could be used for drivers or anything. Our current RIS build supports a whole range of Dell machines and drivers are specified in our sif file. anyway heres the script example. once the machine reboots the software / drivers are installed automatically. incedently the software.vbs script that is called populates runonce keys with a whole list of our STD build software, the additional software is installed at the end of the process. Dim StrModel SET WshShell = Wscript.CreateObject("Wscript.Shell") SET WshFSO = Wscript.CreateObject("Scripting.FileSystemObject") SET WshNetwork = Wscript.Createobject("Wscript.Network") StrComputer = "." Set objWMI = GetObject("Winmgmts:" & "{Impersonationlevel=impersonate}!\\" & strComputer & "\root\cimv2") Computer = wshShell.ExpandEnvironmentStrings("%Computername%") sysdrv = wshShell.ExpandEnvironmentStrings("%SYSTEMDRIVE%") allusers = wshShell.ExpandEnvironmentStrings("%AllUsersProfile%") Set ColSystem = ObjWmi.Execquery ("SELECT Model FROM WIN32_ComputerSystem") For Each SYS in ColSystem Model = Sys.Model Next strModel = Model Select Case Trim(strModel) Case "Latitude D610" D610 Case "Latitude D600" D600 Case "Latitude D800" D800 Case "OptiPlex GX520" GX520 Case "OptiPlex GX280" GX280 Case "Latitude D620" D620 Case Else Default End Select Sub D600 VPN ' install VPN software PowerDVD 'install PowerDVD WshShell.Run "C:\Windows\BuildScripts\Software.vbs" ' run std software routine End Sub Sub D610 VPN PowerDVD WshShell.Run "C:\Windows\BuildScripts\Software.vbs" End Sub Sub D620 D620Modem VPN PowerDVD WshShell.Run "C:\Windows\BuildScripts\Software.vbs" End Sub Sub GX520 PowerDVD WshShell.Run "C:\Windows\BuildScripts\Software.vbs" END Sub Sub GX280 WshShell.Run "C:\Windows\BuildScripts\Software.vbs" END Sub Sub Default WshShell.Run "C:\Windows\BuildScripts\Software.vbs" END Sub Sub PowerDVD WshShell.RegWrite "HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnceEx\998\","Power DVD","REG_SZ" WshShell.RegWrite "HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnceEx\998\1","C:\TenonIT\Software\PowerDVD\Setup.exe /S","REG_SZ" END SUB Sub VPN WshShell.RegWrite "HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnceEx\994\","Cisco VPN Software","REG_SZ" WshShell.RegWrite "HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnceEx\994\1","C:\TenonIT\Software\VPNClient\vpnclient_setup.msi /qn /norestart","REG_SZ" END SUB Sub D620Modem WshShell.RegWrite "HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnceEx\993\","D620 Modem","REG_SZ" WshShell.RegWrite "HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnceEx\993\1","C:\WINDOWS\Drivers\D620\Modem\setup.exe /S","REG_SZ" END SUB
×
×
  • Create New...