Topic Options
#19004 - 12/07/05 11:14 AM calling one script from another
stuartg Offline
OL Expert

Registered: 03/06/03
Posts: 713
Loc: Swindon, England
I have some VB scripts that I call from my Watch process VB script by using the Run method of the Shell object.
Having the scripts in free standing files allows me to modify them without changing my Watch config.
This works OK most of the time, but occasionally the scripts start and hang. I haven't figured out why.
Are there any restrictions on the Watch scripts that mean calling scripts asynchronously like this will cause problems?
      strCmdLine = """c:\Program Files\WHSNJobStore\print_on_demand.vbs"" """+strFolder+""" """+strPrinter+""""
      Set objShell = CreateObject("WScript.Shell") strCmdLine

#19005 - 12/07/05 06:03 PM Re: calling one script from another

Using the run external program to call WScript, with the vbs name and other parameters would be better.

If the process hangs, it may be waiting for a reply from the user ( Clicking on 'ok' in a message box ? ) You will not see that message box unless the process is allowed to interact with the desktop. You may want to verify the user settings for PlanetPress.

Hope this helps.