"could not find part of path" error

evanbooth

New member
Joined
Mar 17, 2009
Messages
3
Programming Experience
5-10
Hey,

I'm running a small piece of code during the startup of my application that checks the version number of a matching file on a mapped network drive against the current version of the executable running. If the exe on the network drive is newer, it runs a separate application that copies the network version over and relaunches the application. This setup works flawlessly in XP, but it's giving me the following error in Vista and Window 7:

"Could not find part of path: (path to executable)"

The problem is, I can copy and paste the path in the error into the "run" dialog, and the path is valid. It's a simple path and filename, so escape characters should not be the issue. An example path might be: H:\deploy_directory\exeName.exe

Everything is running as admin. Any idea why this is happening?
 
Hey,

I'm running a small piece of code during the startup of my application that checks the version number of a matching file on a mapped network drive against the current version of the executable running. If the exe on the network drive is newer, it runs a separate application that copies the network version over and relaunches the application. This setup works flawlessly in XP, but it's giving me the following error in Vista and Window 7:

"Could not find part of path: (path to executable)"

The problem is, I can copy and paste the path in the error into the "run" dialog, and the path is valid. It's a simple path and filename, so escape characters should not be the issue. An example path might be: H:\deploy_directory\exeName.exe

Everything is running as admin. Any idea why this is happening?
Which executable can't it find part of the path for? The network location or the local location?

It could be as simple as the mapped drive letter isn't the one the comparer program is looking for.
 
Thanks for the reply!

The executable that can't find part of the path is local. It's strange, because it worked about 30 minutes after my post until we closed, then this morning it doesn't work again.

It's failing on a FileVersionInfo.GetVersionInfo call. I wrote an application that makes the same call (referencing the same exact executable on the network drive), and it works perfectly. This is really quite confusing and inconsistent.

Any thoughts?
 
Back
Top