From the forums: http://www.myitforum.com/forums/m_142866/mpage_1/key_/tm.htm#142884

Original source:

VBScript & SMS packaging? - 9/27/2006 10:05:05 PM
No New Messages
jsichak
Starting Member



Posts: 25
Score: 0
Joined: 5/26/2005
Status: offline Does anyone know if there is a good way to pass error codes from an MSI or other external application from a VBScript to SMS? We have done several packages that basically call and MSI along with some other customizations, and would like to have an accurate count as to whether the installation of the MSI went well or not.

Thanks!



_____________________________

Jeremy Sichak
SMS Admin/Workstation Architect
jeremysichak at allianzlife.com
[Send Private Message] Report | Rate post | Post #: 1
RE: VBScript & SMS packaging? - 9/28/2006 5:00:51 AM 1 votes
No New Messages
skissinger
Expert Member



Posts: 317
Score: 33
Joined: 9/13/2001
From: Sherry Kissinger
Status: offline I do it all the time; example:

On Error Resume Next
Set sho = Wscript.CreateObject("Wscript.Shell")
strCurrentDir = Left(Wscript.ScriptFullName, (InstrRev(Wscript.ScriptFullName, "\") -1))
strCommand = "msiexec.exe /i " & chr(34) & strCurrentDir & "\widgets.msi" & chr(34) &_
TRANSFORMS=" & chr(34) & strCurrentDir & "\widgets.mst" & chr(34) &_
" REBOOT=ReallySuppress /l*v c:\wdgt.log /qb-!"
intRet = sho.run(strCommand,0,True)
wscript.quit(intRet)

VBScript & SMS packaging?.

the daily ramblings of an sms engineer listen to this article '> Listen to this article

Trackbacks

No Trackbacks

Comments

skissinger :

Oops; noticed syntax was incorrect in the example.

I needed a " and a space before TRANSFORMS; i.e.,

" TRANSFORMS=" &  

Link