Video Screencast Help
Search Video Help Close Back
to help
Not able to make it to Vision this year? Get a sampling in the Best of Vision on Demand group.

From Which Directory Do NS7 VBScript Tasks Run?

Updated: 27 May 2009 | 2 comments
dougj's picture
+6 6 Votes
Login to vote

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

Comments

aspen's picture
10
Jun
2009
1 Vote +1
Login to vote

I think you are looking at your answer

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.

AppPkgServices's picture
10
Jun
2009
3 Votes +3
Login to vote

You can also get the script directory

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
'============================================