Re: Copy shortcut to desktop in a batch file
- From: "Diane Walker" <ett9300@xxxxxxxxx>
- Date: Mon, 21 Jul 2008 17:00:01 -0700
Thank you very much for your prompt response and suggestions. I still got
the same error message.
"Pegasus (MVP)" <I.can@xxxxxxxxxx> wrote in message
news:OBy1RF26IHA.1080@xxxxxxxxxxxxxxxxxxxxxxx
Instead of writing
copy XXX.lnk "%allusersprofile\desktop", try this:
copy /y XXX.lnk "%allusersprofile%\desktop"
You'll notice the missing "%". The "/y" switch will ensure
that there will be no prompt in case the file already exists.
Furthermore, to make your batch file robust, add the full path
to your source file, e.g. like so:
xcopy /y /d "U:\Some Folder\XXX.lnk" "%allusersprofile%\desktop"
Using xcopy.exe with the /d switch will prevent mindless
copying of the same file each time the use command is
invoked.
"Diane Walker" <ett9300@xxxxxxxxx> wrote in message
news:%23djR3r16IHA.4292@xxxxxxxxxxxxxxxxxxxxxxx
Thank you very much all for your prompt response.
The batch file is
copy XXX.lnk "%allusersprofile\desktop"
The error message said "file not found". I interpret that the batch file
cannot find "XXX.lnk" file even though the shortcut "XXX.lnk" does exist.
Please let me know if you need additional information. Thanks.
"Pegasus (MVP)" <I.can@xxxxxxxxxx> wrote in message
news:%23%23XQke16IHA.1460@xxxxxxxxxxxxxxxxxxxxxxx
"Diane Walker" <ett9300@xxxxxxxxx> wrote in message
news:OLwC$w06IHA.1196@xxxxxxxxxxxxxxxxxxxxxxx
I use Installshield software to setup the executable file to install the
software. In that executable file, I setup a batch file to copy a
shortcut to the desktop. The executable file ran successfully.
However, the shortcut was not copied to the desktop. I got the error
message "File not found" for the shortcut command. Do you have any
suggestions? Thanks.
Let's have a look at your batch file!
.
- Follow-Ups:
- Re: Copy shortcut to desktop in a batch file
- From: Pegasus \(MVP\)
- Re: Copy shortcut to desktop in a batch file
- From: Terry R.
- Re: Copy shortcut to desktop in a batch file
- References:
- Copy shortcut to desktop in a batch file
- From: Diane Walker
- Re: Copy shortcut to desktop in a batch file
- From: Pegasus \(MVP\)
- Re: Copy shortcut to desktop in a batch file
- From: Diane Walker
- Re: Copy shortcut to desktop in a batch file
- From: Pegasus \(MVP\)
- Copy shortcut to desktop in a batch file
- Prev by Date: Re: How do you restore if your hard drive crashes?
- Next by Date: Sharing a Printer on a Wireless Network
- Previous by thread: Re: Copy shortcut to desktop in a batch file
- Next by thread: Re: Copy shortcut to desktop in a batch file
- Index(es):
Relevant Pages
|