NOTE: ur program need one argument to run, since u have
if (args.Length == 1) restriction in the main function
if you don't want to impose this restriction simply remove the if statement
regard to the program itself
u need to change the value of the textbox to
"C:\Documents and Settings\Darren\My Documents\Visual Studio
Projects\shorcut\bin\Debug\shorcut.exe" /r
because this is the actual command for shortcut
and change the s variable to
string s = @"""C:\Documents and Settings\Darren\My Documents\Visual Studio
Projects\shorcut\bin\Debug\shorcut.exe""";
beause link.cs only need this to figure out what is the name for your
shortcut
Link.Update(Environment.SpecialFolder.DesktopDirec tory,textBox1.Text, s
,true);
hope this help
<darren> wrote in message news:th********************************@4ax.com...
hi ok thank for the ideas so far here is my small test program if
anyone can help that would be great i just want to make a
desktopshortcut whic also passes \r
regards
Darren
On Sat, 14 Feb 2004 12:43:49 -0500, "Du Dang" <vi*******@hotmail.com>
wrote:
copy and paste error ... don't include the last \
string s = @"""C:\Documents and Settings\Darren\My Documents\Visual
Studio Projects\shorcut\bin\Debug\shorcut.exe\"" /r";
string s = @"""C:\Documents and Settings\Darren\My Documents\Visual
Studio Projects\shorcut\bin\Debug\shorcut.exe"" /r";
"Du Dang" <vi*******@hotmail.com> wrote in message
news:M4******************@nnrp1.uunet.ca... try this
string s = @"""C:\Documents and Settings\Darren\My Documents\Visual
Studio Projects\shorcut\bin\Debug\shorcut.exe\"" /r";
<darren> wrote in message
news:cl********************************@4ax.com.. . >
> hi iam righting aprogram that creates its own desktop shotcut and a
> want to add a command line switch
>
> so i want to have a string like this
>
> "C:\Documents and Settings\Darren\My Documents\Visual Studio
> Projects\shorcut\bin\Debug\shorcut.exe" /r"
>
> my problem is how do i get the single " quote mark into my string
> please help
>
> thanks
> Darren