View Single Post
  #3  
Old 12-03-2004, 02:12 PM
jdev's Avatar
jdev jdev is offline
VanDyke Technical Support
 
Join Date: Nov 2003
Location: Albuquerque, NM
Posts: 972
One of the limitations of an application hosting ActiveX scripting is the inability to gain access to functions that are not true objects within the script engine itself.

When running a vbscript outside of CRT/SecureCRT (where CScript.exe or WScript.exe are hosting the script code), you can make calls to things like:
WScript.Arguments
WScript.Name
WScript.Path
WScript.Quit
WScript.ScriptFullName
WScript.ScriptName
WScript.Sleep
WScript.StdErr
WScript.StdIn
WScript.StdOut
WScript.Version
...
However, when CRT/SecureCRT is hosting the script (instead of WScript.exe or CScript.exe), the WScript object itself isn't there; and unless you can call "CreateObject" to instantiate objects provided by WScript, they can't be used within a CRT/SecureCRT script.

In the past, we've made things like "Sleep" and "Arguments" available by providing an API within the CRT object that can be used for making these types of calls (e.g. crt.sleep; crt.arguments). We can consider adding something like a crt.ScriptFullName to resolve this problem for you.

There might be another way to accomplish what you need.

Can you provide more information about the script you are writing and the need to know the full path to the script being run?

--Jake
__________________
Jake Devenport
VanDyke Software
Technical Support
YouTube Channel: https://www.youtube.com/vandykesoftware
Email: support@vandyke.com
Web: https://www.vandyke.com/support

Last edited by jdev; 11-01-2006 at 09:20 PM.
Reply With Quote