Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


code for silent software installation using vbscript ( SMS environment )

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,51042
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> code for silent software installation using vbscript ( SMS environment )
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 code for silent software installation using vbscript (... - 8/22/2007 1:16:53 AM   
  ursenthils

 

Posts: 4
Score: 0
Joined: 8/22/2007
Status: offline
Original message moved by dm_4ever
Reason : Moving To Appropriate Forum
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 SMS environment.i have
no idea where to start.

     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 will be located on a SMS
server.i need sample script if you have kindly provide me ASAP.

you can reach me at senthil3.n@tcs.com

Thanks&Regards,
n.senthil
 
 
Post #: 1
 
 RE: code for silent software installation using vbscri... - 8/23/2007 2:05:38 AM   
  crazymatt

 

Posts: 296
Score: 0
Joined: 3/4/2005
From:
Status: offline
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



_____________________________

-There is only 10 sorts of people, those who understand binary and those who dont.

(in reply to ursenthils)
 
 
Post #: 2
 
 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

(in reply to crazymatt)
 
 
Post #: 3
 
 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

(in reply to crazymatt)
 
 
Post #: 4
 
 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

(in reply to crazymatt)
 
 
Post #: 5
 
 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 

(in reply to ursenthils)
 
 
Post #: 6
 
 RE: code for silent software installation using vbscri... - 8/28/2007 11:09:50 PM   
  crazymatt

 

Posts: 296
Score: 0
Joined: 3/4/2005
From:
Status: offline
First of all, you have to be able to install the program you want to install unattended. If that is not possible VbScript wont help much. (It would maybe be possible to make vbscript press the buttons during installation for you, but that no good if the user works on the computer at the same time for example). Its then better to make a MSI of the installation. (If you dont have that knowlegde yourself i would buy it from someone, usually not that expensive).

But if the program have to option to install unattended there is no need for vbs if you use SMS.
For example i use the following option in SMS in the "command line" on the program when installing net framework 2.0:

dotnetfx.exe /q:a /c:"msiexec /q /l %windir%\temp\dotnetfx20.log /i netfx.msi USING_EXUIH=1 REBOOT=ReallySuppress"

And if you only want to install to computers that dont already have it installed i would suggest you make a query/collection to get that information.

For more information about SMS and installation i would recommend www.myitforum.com

Hope this helps.



_____________________________

-There is only 10 sorts of people, those who understand binary and those who dont.

(in reply to ursenthils)
 
 
Post #: 7
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> code for silent software installation using vbscript ( SMS environment ) Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts