tags:

views:

26

answers:

1

Recently users of our VB6 app have encountered problems when trying to read files.

It surfaced that the Dir function throws an error for non-existing shares instead of returning an empty string.

My hunch is that previously the App.Path function returned "C:\Program Files\OurApp\ourapp.exe" but now it returns "\\MyComputer\C$\Program Files\OurApp\ourapp.exe". The Dir function raises an error if \\MyComputer\ does not exist.

Has anyone an idea when or how this undesirable behaviour is generated?

+1  A: 

The shortcut your users start your app is pointing to \\MyComputer\C$r\... which explains why App.Path is in UNC notation.

Who turned the shortcut in UNC?

Ususally when an admin browses \\MyComputer\C$ and finds a shortcut in \\MyComputer\C$\Document and Settings\User\Desktop or similar and start it, the shortcut automagically is reconciled not to point to local drive C: but to \\MyComputer\C$. Later local users being local admins don't find anything wrong such shortcuts and so on...

wqw