Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

SUPPORTDIR


5 replies to this topic

cross

cross
  • Members
  • 8 posts

Posted 06 June 2001 - 16:38

I need to create a CA that runs a vbscript.  I have to pass parameters to the Vbscript, therefore I cannot just have a CA that calls this script.  I want to try and stream this script into the SUPPORTDIR and call launchappandwait, passing in the parameters. This doesn't work.  Can anyone explain SUPPORTDIR to me. There doesn't seems to be much documentation.


Leigh Ravenhall

Leigh Ravenhall
  • Members
  • 269 posts

Posted 07 June 2001 - 00:03

Instead of passing parameters, is it possible to call your VBScript, then at the start of the script retrieve the values of some properties that you wanted to pass in.

All it takes is:
VBVar = Session.Property(PropertyName)


cross

cross
  • Members
  • 8 posts

Posted 08 June 2001 - 16:23

I'm trying this however Session.Property is causing an error when the script is run.  

Leigh Ravenhall

Leigh Ravenhall
  • Members
  • 269 posts

Posted 12 June 2001 - 00:17

What error is it returning?

Can you post the code that it is failing on?


SteveP

SteveP
  • Members
  • 126 posts

Posted 12 June 2001 - 21:08

You may want to try calling your custom action as a Type 34 (base type ... add in the flag values for deferred action, etc.).  Use the location of WScript.exe as the Source (generally, you can use [SystemFolder] in NT and 2000 ... not sure for Win 9x).  Then, in the Target field, use WScript.exe //B <path and location to your VBS script> <Arg1> <Arg2> ... etc.

Then, in the first part of your script, use something like this:

Dim oArgs
Set oArgs = WScript.Arguments

With the way I wrote the command line, <Arg1> would be oArgs(0), etc.

This is a ton easier than trying to get property values from within the script, and you can use property values in the command line.  The limitation would be that the command line is limited to 255 characters, and you have to double quote entries that contain white space.

Hope that helps.