RE: code for silent installing software using VBscript
- From: T_Condit <TCondit@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 30 Aug 2007 09:04:02 -0700
Try assigning your program with switches to a string and then pass that
variable.
strProgram = "runme.exe /a /b -c"
....
....
RunInstaller(strProgram)
If that doesn't work then you may be able to call to a bat file with the
commands set in it.
"senthil" wrote:
Hi,.
I need to create script to install ( .netframework2.0,MDAC2.7,XML4.0,
VC++2005,Windows installer services3.0,OWC10.0)with silent installation
through VBscript.
the script should be able to check the previous registry entry,which
machine do not have the particular version, then installation will start
from my script with software folder.The executable script and softwares will
be located on same folder.
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
- References:
- code for silent installing software using VBscript
- From: senthil
- code for silent installing software using VBscript
- Prev by Date: uh-oh, correction / clarification
- Next by Date: Re: Advice to access multiple inquiries?
- Previous by thread: code for silent installing software using VBscript
- Next by thread: code for silent installing software using VBscript
- Index(es):
Relevant Pages
|