BobCrothers
Posts: 66
Joined: Wed Dec 05, 2007 10:58 pm

Path not found on VBscript copy

Hi AI Gurus,

We have a VB script which copies a site specific properties file to APPDIR. The script has worked fine for a couple years. One of our clients wanted to do some testing on Windows 7. The script had a Permission denied error. On Sept 20 I asked the forum how to fix the permission. You made some suggestions (deferred with no impersonation) which worked great. As part of this change the script was moved under Install. See
http://www.advancedinstaller.com/forums ... =2&t=11611
Subject Permission denied on VB script copy

This fixed the permission denied problem under Windows 7. But it has created another problem. One of our customers installs from a network share. This use to work; now it fails. I have done some testing, if I install from C: everything works fine. If I installed from a mapped drive, say p: it fails. I have tested on Windows 7 and windows XP. The script fails on both when installed from a mapped drive. The script assumes there is a property file in the same location as the install file. The script copies the install file to APPDIR. The error is path not found. I have done some debugging. I have stopped the script just before the copy is made. I have confirmed that the source file exists where it should be. I have confirmed that the destination directory exists. Further debugging shows, if I call FileExists on the source file, it returns it does not exist! If I call getDrive on the P: the error is Device unavailable. Working from a command window the p: drive is available.

This worked before the changes for Windows 7.

Any ideas?

Thanks
Bob
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Path not found on VBscript copy

Hi Bob,

I am not sure about this, but I think it might be a permissions issue. When deferred with no impersonation, the script runs under the local SYSTEM account, which may not have read permissions to the network share.
If that is the case, perhaps you can try the following approach:
- a script (without the "no impersonation" option) copies the properties file from its location to your account's Temp folder. This will also work for the network share case because your account seems to have read access for it.
- a script (with the "no impersonation" option) copies the properties file from the Temp folder to it's intended destination. This will work on windows 7 also.

Let me know how this worked.

Best regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/

Return to “Common Problems”