Re: return code of .vbs



You can't directly associate exit codes with status messages.

If you want more detailed reporting you can take a look at InstallMIF's or
write your own status messages. There is an example in the SMS SDK on how to
generate status messages using the Microsoft.SMS.Event automation object:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/smssdk03/hh/sms/smsref30_ce00.asp

/Rune

"LionPaw" <LionPaw@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:3810AAAC-AB7E-49B9-9352-49C3C931B2A2@xxxxxxxxxxxxxxxx
> Thank You !! Wworks like a charm. Will save me alot of time.
>
> Extra credit, can I assocaite the quit code like 1 or 5445 to a sms
> MessageID and Description? Or am I in over my head.
>
> --
> misguided hacker
>
>
> "Kristian F. Thomsen" wrote:
>
>> Yes you can; in your VBScript you can use WScript.Quit(errorcode) - e.g.
>> WScript.Quit(1) - This will send return code 1 to SMS, which SMS will
>> recognize as a failure.
>>
>> --
>> ________________________________
>> Med venlig hilsen / Best regards
>>
>> Kristian F. Thomsen
>> MCP, MCAD, MCSD
>> "LionPaw" <LionPaw@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
>> news:387FFB5D-D8A2-4AF9-A95B-5BC95F0C3D44@xxxxxxxxxxxxxxxx
>> > We run several items in a .vbs and at the end of the script, we know if
>> > all
>> > succeeded or not, but SMS only cares that the script ran ok, whick it
>> > frequently does, but not all items in the script did. Can I force the
>> > .vbs
>> > to return a failed message code without :
>> >
>> > putting it in an endless loop that exceeds the advertiemsnt limit or
>> > concatinating a bogus command and failing the script
>> >
>> > -- Thanks
>> > misguided hacker
>>
>>
>>


.



Relevant Pages

  • Re: Making sure Office apps are closed
    ... you need to make sure that for dependent programs SMS doesn't ... package that had two programs in it. ... Popup-n-kill-Office script and the second one would be the actual Office ... and the actual Office 2003 install script to run whether logged on or not. ...
    (microsoft.public.sms.swdist)
  • Re: Distributing Software "Quickly" to Bare Metal Installs
    ... >> Nope, never seen any script like it, I just tought it would be a feasible ... >> ' Script By Kim Oppalfens - MVP SMS ... >> Dim objSWbemServices ... Set objCollection = objSWbemServices.ExecQuery _ ...
    (microsoft.public.sms.swdist)
  • Re: OSD: get mac address of network cards
    ... Windows Server System MVP - SMS ... think) the ZTIGather script. ... 2004/2005 build that includes WMI support. ... > I have a problem automating the installation process with OSD. ...
    (microsoft.public.sms.tools)
  • Re: Pushing a file
    ... To copy a file to your computers using SMS you will need to write some sort ... The script can be written in just about ... source directory and the file to update on a Share). ...
    (microsoft.public.sms.swdist)
  • Re: Migrating SMS 2.0 content to SMS 2003
    ... I found this VBS Script that seems to work part way. ... generate a .SMS file that can then be used to import into SMS (in Packages, ... the script will export a specified package given the package id. ... ICON comes back as actual Icon data. ...
    (microsoft.public.sms.admin)

Loading