Bug in running scripts on network path
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Bug in running scripts on network path
I have noticed this before but thought it was a one-off. After opening several scripts via UNC paths, when I try to run a script that was opened from a hard-coded network drive I get the messageInput Error: Can not find script file "<UNCPath>myscript.vbs".For example, say I open script1 from SERVER1PackagesScriptsscript1.vbs and also open script2 from "H:scriptsscript2.vbs"Sometimes, when trying to run script2 I will get the error Input Error: Can not find script file "SERVER1PackagesScriptsscript2.vbs".Any ideas?
- Alexander Riedel
- Posts: 8488
- Last visit: Tue Apr 16, 2024 8:42 am
- Been upvoted: 37 times
Bug in running scripts on network path
So this is an error message from your script and not from PrimalScript, correct?
I am not sure from your post if you are trying to run script2 from PrimalScript or from Script1.
Alex
I am not sure from your post if you are trying to run script2 from PrimalScript or from Script1.
Alex
Alexander Riedel
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
Bug in running scripts on network path
Sorry, everything is run from within Primalscript.Script1 and Script2 are both open. Script1 was opened using a UNC path. Script2 was opened from a mapped drive.Sometimes, when trying to run Script2 it appears to look for it in the UNC path of script1. Most odd.I shall try to reproduce it tomorrow and take a screenshot
Bug in running scripts on network path
Here you go. The Outlook2003.vbs scripts is in a folder called HHBRUA061NsstorePackagesMicrosoft Office 2003ScriptsThe pcowner.vbs script is in a folder called H:ScriptingWhen I try to run the Pcowner.vbs (using CTRL+F5) it seems to be looking for it in the folder of the Outlook2003.vbs script
- Alexander Riedel
- Posts: 8488
- Last visit: Tue Apr 16, 2024 8:42 am
- Been upvoted: 37 times
Bug in running scripts on network path
That would be rather odd if it would mix up path names.
Two questions:
1. What does H: actually map to?
2. Can you show a screenshot of Tools - Options - Environment - Languages - VBScript ?
I suspect it just tries to execute the script in the "current" directory and the mix of UNC and mapped path names throws something off.
I can tell more when I see the actual settings.
Two questions:
1. What does H: actually map to?
2. Can you show a screenshot of Tools - Options - Environment - Languages - VBScript ?
I suspect it just tries to execute the script in the "current" directory and the mix of UNC and mapped path names throws something off.
I can tell more when I see the actual settings.
Alexander Riedel
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
Bug in running scripts on network path
H: maps to an entirely different server (i.e. my home drive on the network)Here's the screenshot.
Bug in running scripts on network path
I just changed the InitialDirectory to be $FileDir$ and this seems to have resolved the problem.Still seems like a bug to me though
- Alexander Riedel
- Posts: 8488
- Last visit: Tue Apr 16, 2024 8:42 am
- Been upvoted: 37 times
Bug in running scripts on network path
Ok, the initial directory field contains
$FileDir$
by default, guess you somehow removed that.
Set that again and try.
If that does not help, replace
"$FileName$" with "$File$"
(with the quotes).
Alex
$FileDir$
by default, guess you somehow removed that.
Set that again and try.
If that does not help, replace
"$FileName$" with "$File$"
(with the quotes).
Alex
Alexander Riedel
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
- Alexander Riedel
- Posts: 8488
- Last visit: Tue Apr 16, 2024 8:42 am
- Been upvoted: 37 times
Bug in running scripts on network path
No, not really a bug. You removed the specification where to run the script. PrimalScript launches CScript with the filename (with no path specified) and faithfully looks in the current folder and complains if it isn't there.
It was just doing what it was told
It was just doing what it was told
Alexander Riedel
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
Bug in running scripts on network path
Hmm, I don't remember removing anything. I think it's always been like that.Oh well, maybe I did and just forgot in my old age