RE: code for silent installing software using VBscript

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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

.



Relevant Pages

  • Re: Deployng Service Pack 2
    ... firewall turned off from a command line or script? ... command are the usual Microsoft switches, such as /passive, /norestart, etc. ... couple of registry values that disables the firewall. ... firewall as part of the installation. ...
    (microsoft.public.windowsxp.general)
  • code for silent installing software using VBscript
    ... VC++2005,Windows installer services3.0,OWC10.0)with silent installation ... the script should be able to check the previous registry entry,which ... via vbscript.i have command line switches and it is working fine using cmd ...
    (microsoft.public.scripting.vbscript)
  • code for silent installing software using VBscript
    ... VC++2005,Windows installer services3.0,OWC10.0)with silent installation ... the script should be able to check the previous registry entry,which ... via vbscript.i have command line switches and it is working fine using cmd ...
    (microsoft.public.scripting.vbscript)
  • test does not display points in current CVS
    ... The 'test' command seems to be broken in the current CVS ... on Ubuntu 9.10 the configure script doesn't seem to ... want to recognize the presence of a lua installation, ... the lua terminal even if it was enabled with the --with-lua switch. ...
    (comp.graphics.apps.gnuplot)
  • Re: posix ps (was Re: Adding `pgrep and `pkill to /usr/bin)
    ... Are you seriously suggesting that every script forevermore ... >SM>is) then command line switches and aliases are the correct mechanisms to ... aliases. ...
    (freebsd-arch)