I've coded a C# executable that uses xcopy (cmd.exe /Q /D /C xcopy "C:\_Depot\Tools\CAD\2009" "C:\Apps\CAD 2009" /E /K /R /Y) to duplicate some files.
If I run the .exe by double-clicking it, the xcopy operation works every time.
If I run the .exe by double-clicking a shortcut to the .exe, the xcopy works only if the shortcut is in the same folder as the .exe.
I've tried setting the current directory to the executing assembly's folder, but that's no help.
The "Start in:" value of the shortcut has been the same folder as the .exe in all of my test. (Not that this should matter -- I want the code to work regardless of the value.)
Any ideas, people?