I
Ilya
Hi, all!
Some weird thing happens...
I'm trying to create a shortcut programmatically in C#. I need to
create a shortcut with the "target" parameter using slash. Actually
I'm creating a shortcut to a file using command line arguments, smth
like:
"C:\PATH\MyFile.exe" /param1
The problem is that when I create a shortcut the regular slash that
comes before param1 changes to backslash. I checked it in the
debugger. The string that's passed to a function that creates the
shortcut itself has a slash, but the shortcut after creation has
backslash instead. And it ruins the launch of the app because command
line argument is not recognized.
I tried to create a shortcut in 2 ways:
1. Using the code from http://www.msjogren.net/dotnet/eng/samples/dotnet_shelllink.asp.
2. Using shell functions.
Both lead to the same result.
Anybody has idea what can I do?
Thanks in advance,
Ilya
Some weird thing happens...
I'm trying to create a shortcut programmatically in C#. I need to
create a shortcut with the "target" parameter using slash. Actually
I'm creating a shortcut to a file using command line arguments, smth
like:
"C:\PATH\MyFile.exe" /param1
The problem is that when I create a shortcut the regular slash that
comes before param1 changes to backslash. I checked it in the
debugger. The string that's passed to a function that creates the
shortcut itself has a slash, but the shortcut after creation has
backslash instead. And it ruins the launch of the app because command
line argument is not recognized.
I tried to create a shortcut in 2 ways:
1. Using the code from http://www.msjogren.net/dotnet/eng/samples/dotnet_shelllink.asp.
2. Using shell functions.
Both lead to the same result.
Anybody has idea what can I do?
Thanks in advance,
Ilya