Login | |
|
 |
RE: code for silent software installation using vbscri... - 8/23/2007 2:37:16 AM
|
|
 |
|
| |
mcds99
Posts: 434
Score: 4
Joined: 2/28/2006
Status: online
|
Thank You crazymatt! I was an SMS admin for years, people need to learn what they need to know, make mistakes and learn from them. LEARNING is life long, it doesn't end when you get the diploma. quote:
ORIGINAL: crazymatt Hi, First of all, noone will make such as script for you. If you had read the READ ME FIRST post then you would have known where to start (since you say you have no idea where to start)... When you have tried a little own your own and need more specific help ppl here will gladly help you. Second of all, deciding what computer needs what software is what you use collections and querys in SMS for. You can also link installations and do lots of neat stuff with it, if you already havnt i would recommend you attend one of Microsofts courses. It is worth it. And you or someone in your organisation should learn MSI-packaging, that way you could repackage any program for silent unattended installations Hope this helps
_____________________________
Sam Keep it Simple Make it Fun KiSMiF
|
|
| |
|
|
|
 |
RE: code for silent software installation using vbscri... - 8/27/2007 1:42:29 AM
|
|
 |
|
| |
ursenthils
Posts: 4
Score: 0
Joined: 8/22/2007
Status: offline
|
Hi. Thanks for your reply. i have developed script.but problem is not able to find silent installation via vbscript.i have command line switches and it is working fine using cmd prompt.(standalone machine).But using script does not support the same command line. i will send my script and command line details. Set objFSO = CreateObject("Scripting.FileSystemObject") Set objShell = CreateObject("Wscript.Shell") Set objNetWork = WScript.CreateObject("WScript.Network") strComputer = "." const HKEY_LOCAL_MACHINE = &H80000002 strComputer = "." Set objReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\"& strComputer & "\root\default:StdRegProv") Computername= objNetWork.computername strKeyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" objReg.EnumKey HKEY_LOCAL_MACHINE, strKeyPath, arrSubKeys blnVcplus = false blnOWC = false blnDotnet = false 'blnXml = false For Each subkey In arrSubKeys Select case subKey 'For VC++ case "{A49F249F-0C91-497F-86DF-B2585E8E76B7}" blnVcplus = true 'For OWC case "{90260409-6000-11D3-8CFE-0050048383C9}" blnOWC = true 'For Dotnet case "{7131646D-CD3C-40F4-97B9-CD9E4E6262EF}" blnDotnet = true 'For Xml 'case "{716E0306-8318-4364-8B8F-0CC4E9376BAC}" 'blnXml = true end select next If blnVcplus = false Then RunInstaller("""C:\Documents and Settings\134520\Desktop\working\vc++""") End If If blnOwc = false Then RunInstaller("""C:\Documents and Settings\134520\Desktop\working\owc10.exe""") End If If blnDotnet = false Then RunInstaller("""C:\Documents and Settings\134520\Desktop\working\dotnet""") End If 'If blnDotXML = false Then 'RunInstaller("""C:\Documents and Settings\134520\Desktop\working\XML""") 'End If set arrSubKeys=nothing Function RunInstaller(installerPath) Dim fso, sh, r, s, pe,wshshell Set fso = CreateObject("Scripting.FileSystemObject") Set wshShell = WScript.CreateObject ("WSCript.shell") wshshell.run """C:\Documents and Settings\134520\Desktop\working\WindowsInstaller.exe""", 6, false wshshell.run installerPath, 6, false set wshshell = nothing End Function Command line switches for my pre-requisites. .net2.0 - dotnetfx.exe /q:a /c:"Install /q" vc++ "VCREDI~1.EXE" /q:a /c:"msiexec /i vcredist.msi /qb!" OWC10 owc10.exe /q:a /c:"msiexec /i owc10se.msi /qb!" xml4.0 msiexec /i msxml4.msi /qn kindly please provide your solution. thanks, N.senthil
|
|
| |
|
|
|
 |
RE: code for silent software installation using vbscri... - 8/27/2007 1:46:59 AM
|
|
 |
|
| |
ursenthils
Posts: 4
Score: 0
Joined: 8/22/2007
Status: offline
|
Hi. Thanks for your reply. i have developed script.but problem is not able to find silent installation via vbscript.i have command line switches and it is working fine using cmd prompt.(standalone machine).But using script does not support the same command line. i will send my script and command line details. Set objFSO = CreateObject("Scripting.FileSystemObject") Set objShell = CreateObject("Wscript.Shell") Set objNetWork = WScript.CreateObject("WScript.Network") strComputer = "." const HKEY_LOCAL_MACHINE = &H80000002 strComputer = "." Set objReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\"& strComputer & "\root\default:StdRegProv") Computername= objNetWork.computername strKeyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" objReg.EnumKey HKEY_LOCAL_MACHINE, strKeyPath, arrSubKeys blnVcplus = false blnOWC = false blnDotnet = false 'blnXml = false For Each subkey In arrSubKeys Select case subKey 'For VC++ case "{A49F249F-0C91-497F-86DF-B2585E8E76B7}" blnVcplus = true 'For OWC case "{90260409-6000-11D3-8CFE-0050048383C9}" blnOWC = true 'For Dotnet case "{7131646D-CD3C-40F4-97B9-CD9E4E6262EF}" blnDotnet = true 'For Xml 'case "{716E0306-8318-4364-8B8F-0CC4E9376BAC}" 'blnXml = true end select next If blnVcplus = false Then RunInstaller("""C:\Documents and Settings\134520\Desktop\working\vc++""") End If If blnOwc = false Then RunInstaller("""C:\Documents and Settings\134520\Desktop\working\owc10.exe""") End If If blnDotnet = false Then RunInstaller("""C:\Documents and Settings\134520\Desktop\working\dotnet""") End If 'If blnDotXML = false Then 'RunInstaller("""C:\Documents and Settings\134520\Desktop\working\XML""") 'End If set arrSubKeys=nothing Function RunInstaller(installerPath) Dim fso, sh, r, s, pe,wshshell Set fso = CreateObject("Scripting.FileSystemObject") Set wshShell = WScript.CreateObject ("WSCript.shell") wshshell.run """C:\Documents and Settings\134520\Desktop\working\WindowsInstaller.exe""", 6, false wshshell.run installerPath, 6, false set wshshell = nothing End Function Command line switches for my pre-requisites. .net2.0 - dotnetfx.exe /q:a /c:"Install /q" vc++ "VCREDI~1.EXE" /q:a /c:"msiexec /i vcredist.msi /qb!" OWC10 owc10.exe /q:a /c:"msiexec /i owc10se.msi /qb!" xml4.0 msiexec /i msxml4.msi /qn kindly please provide your solution. thanks, N.senthil
|
|
| |
|
|
|
 |
RE: code for silent software installation using vbscri... - 8/27/2007 1:52:23 AM
|
|
 |
|
| |
ursenthils
Posts: 4
Score: 0
Joined: 8/22/2007
Status: offline
|
Set objFSO = CreateObject("Scripting.FileSystemObject") Set objShell = CreateObject("Wscript.Shell") Set objNetWork = WScript.CreateObject("WScript.Network") strComputer = "." const HKEY_LOCAL_MACHINE = &H80000002 strComputer = "." Set objReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\"& strComputer & "\root\default:StdRegProv") Computername= objNetWork.computername strKeyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" objReg.EnumKey HKEY_LOCAL_MACHINE, strKeyPath, arrSubKeys blnVcplus = false blnOWC = false blnDotnet = false 'blnXml = false For Each subkey In arrSubKeys Select case subKey 'For VC++ case "{A49F249F-0C91-497F-86DF-B2585E8E76B7}" blnVcplus = true 'For OWC case "{90260409-6000-11D3-8CFE-0050048383C9}" blnOWC = true 'For Dotnet case "{7131646D-CD3C-40F4-97B9-CD9E4E6262EF}" blnDotnet = true 'For Xml 'case "{716E0306-8318-4364-8B8F-0CC4E9376BAC}" 'blnXml = true end select next If blnVcplus = false Then RunInstaller("""C:\Documents and Settings\134520\Desktop\working\vc++""") End If If blnOwc = false Then RunInstaller("""C:\Documents and Settings\134520\Desktop\working\owc10.exe""") End If If blnDotnet = false Then RunInstaller("""C:\Documents and Settings\134520\Desktop\working\dotnet""") End If 'If blnDotXML = false Then 'RunInstaller("""C:\Documents and Settings\134520\Desktop\working\XML""") 'End If set arrSubKeys=nothing Function RunInstaller(installerPath) Dim fso, sh, r, s, pe,wshshell Set fso = CreateObject("Scripting.FileSystemObject") Set wshShell = WScript.CreateObject ("WSCript.shell") wshshell.run """C:\Documents and Settings\134520\Desktop\working\WindowsInstaller.exe""", 6, false wshshell.run installerPath, 6, false set wshshell = nothing End Function
|
|
| |
|
|
|
| |
|
|
 |
|
 |
|
|