Create desktop icon of a file

December 3, 2010 at 02:59:50
Specs: Windows 7, Intel I5 - 8 gig
I need to create a desktop icon for the file Lookup.jar during the setup process I tried xcopy to desktop, but it doesn't work.

See More: Create desktop icon of a file

Report •

#1
December 3, 2010 at 04:30:15
What do you mean it doesn't work? What happened? Also, it's a little hard to debug a script without seeing it (twice in a row I've had to say this).

The syntax of the command is:

XCOPY "P:\a\t\h\Lookup.jar" "%UserProfile%\Desktop\Lookup.jar"

Can I put a question here?


Report •

#2
December 3, 2010 at 06:26:36
Sorry Matt about not entering the script. My first time doing this. Your script works, but I have a question. You showed P:/A/t/h after your xcopy cmd. Is that just the path, whatever it should be. The process stopped and asked me if this was a file or a directory. How do I default it to be a file.

JD Walsh


Report •

#3
December 3, 2010 at 06:55:13
How do I default it to be a file.
In this instance? Use COPY instead of XCOPY.

Although, if what you want is a shortcut, then just use VBScript to make a shortcut.

How To Ask Questions The Smart Way


Report •
Related Solutions


Ask Question