Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Questions about software installation

Status
Not open for further replies.

Lorrec

Technical User
Sep 5, 2007
8
US
I am new to working with VBScripting and thought I would post here for some assistance. Any help would be appreciated.

Currently, I have a script that installs Adobe Reader 8 from a central server. I am going to deploy the script through SMS and would like to set it up to pull the files locally instead of from the central server. Below is the code I have been using. Is it possible to make it pull from the SMS distribution points with changing each script manually? For example, using a %inst% or something like that.

'-------------------------------------------
' Installing AdobeReader8
'-------------------------------------------
function InstReader8()

Set msi = CreateObject("WindowsInstaller.Installer")

msi.UILevel = 2

msi.InstallProduct "\\centralsms0\software\AdobeAcrobatReader8.0AcroRead.msi", "TRANSFORMS=\\centralsms0\software\AdobeAcrobatReader8.0\AcroRead.mst"

Set msi = Nothing

End Function
 
Yes, if all the files are in the same folder then you could just use the folder names:

msi.InstallProduct "AdobeAcrobatReader8.0AcroRead.msi", "TRANSFORMS=AcroRead.mst"

if that doesn't work you can get the script to figure out where it is and insert the path into the function:

Code:
Set objShell = CreateObject("Wscript.Shell")
MyPath = objShell.CurrentDirectory
...
msi.InstallProduct MyPath & "\AdobeAcrobatReader8.0AcroRead.msi", "TRANSFORMS=" & MyPath & "\AcroRead.mst"

However you shouldn't need to use a script to perform the install with SMS, if you put the following directly in the SMS command line field, it should work:

msiexec /qn /i AdobeAcrobatReader8.0AcroRead.msi /t AcroRead.mst
 
Forgot to add, you will need to set the advertisement to download the install files from the Distribution point.
 
Thanks for the quick reply. I will try it right away.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top