Client Management Suite

 View Only

From Which Directory Do NS7 VBScript Tasks Run? 

May 27, 2009 01:19 PM

Just a short FYI article.

Being curious about where NS7 VBScript tasks run, I created a simple script to run the following command, which shows the complete path of the running script:

MsgBox(WScript.ScriptFullName)

Notice in the following image that this script ran from the c:\windows\temp\ directory.

imagebrowser image

Statistics
0 Favorited
0 Views
0 Files
0 Shares
0 Downloads

Tags and Keywords

Comments

Jun 10, 2009 08:44 AM

You can use the following script to get script full path along with the script directory.

'============================================
Dim ScriptDir

Set fso = CreateObject("Scripting.FileSystemObject")
ScriptDir = fso.GetParentFolderName(WScript.ScriptFullName)
If Right(ScriptDir,1) <> "\" Then ScriptDir = ScriptDir & "\"

MsgBox "Script directory:    " & ScriptDir & VbCrLf & "Script full path:     " & WScript.ScriptFullName
'============================================


Jun 10, 2009 08:24 AM

Your script seems to have fetched the answer for you. With a few lines of code you can easily change the directory if needed. Good find though, I am sure this will answer several admins questions.

Related Entries and Links

No Related Resource entered.