This feels like it should be so simple. But I think I must be doing something wrong.

I am trying to copy a shortcut from a network path to the public desktop folder on all of our desktops. I have tried the following scripts.

Both scripts are launched with


xcopy \\\root\OUTBOX\*.* C:\Users\Public\Desktop /y

xcopy \\\root\OUTBOX\*.* %userprofile%\Desktop /y

Can someone help me out. I am new to KBOX and don't understand what I am doing wrong.

Thank you!!
0 Comments   [ + ] Show Comments


Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.


Windows shortcuts are .lnk files, and sometimes they have the hidden attribute set.

XCOPY doesn't copy hidden (or system) files unless you add the /H switch.

But it couldn't be this simple... Sande
Answered 04/08/2011 by: snissen
Fourth Degree Green Belt

Please log in to comment
Doesn't look like its that simple : (

I tried running the script with a /H switch. On the test computer the cmd prompt quickly flashes but no Icon is copied to the desktop.

Launch “%WINDIR%\System32\cmd.exe” with params “xcopy \\\root\OUTBOX\*.* %userprofile%\Desktop /Y /H”.

I ran this from an administrative cmd prompt on a test computer manually and it successfully copied the shortcut. It fails to copy through KBOX though.
Answered 04/08/2011 by: tsg
Senior Yellow Belt

Please log in to comment

Try running this as a batch script instead of launching a program (cmd).

You can also try using shell scripts for simple stuff like this.

Just make sure you change the script name from to script.bat.

Hope this helps
Answered 04/11/2011 by: dchristian
Red Belt

Please log in to comment
Any time you use the Launch program step with cmd.exe, your parms should start with /c like this:
cmd.exe /c xcopy ....
That switch means "run this one command line and then exit". If you forget the /c (I do all the time), your script appears to hang.

Or you can Launch program xcopy.exe directly.

Over the years, I have had problems copying shortcut .lnk files too, so I now create and edit them on the fly using the free Shortcut.exe utility from . (A colleague uses this free utility's shortcut command: .) Sande
Answered 04/14/2011 by: snissen
Fourth Degree Green Belt

Please log in to comment
Answer this question or Comment on this question for clarity