[wpkg-users] Copying a shortcut from a network share to desktop?

Frank Lee rl201 at cam.ac.uk
Thu Feb 5 11:09:12 CET 2009


Hi Chris,

> <package id="CH4EnvChangeShortcut" name="CH4 Environmental Change 
> Shortcut" revision="1" reboot="false" priority="0"> <install cmd='net 
> use x: \\10.251.193.3\MMedia\Shortcuts' /> <install cmd='copy "x:\CH4 
> Environmental Change.lnk" "C:\Documents and Settings\All Users\Desktop"' 
> /> <install cmd='net use x: /delete /yes' /></package>

I think the problem here is that "copy" is a command built in to the 
command interpreter CMD, not an executable program.

Two ways around this:
1) Start a CMD session to run the command: cmd /c copy x:\path\go.lnk 
"%AllUsersProfile%\Desktop"
or
2) Use the 'xcopy' command, which is provide by a separate program: xcopy 
x:\path\go.lnk "%AllUsersProfile%\Desktop"

As an aside, I think the following commands are built-in to the CMD shell 
and therefore will need the 'cmd /c' treatment if anyone is to use them.

ASSOC BREAK CALL CD CHCP CHDIR CLS COLOR COPY DEL DISKCOMP DISKCOPY 
ENDLOCAL ERASE EXIT FOR FORMAT FTYPE GOTO GRAFTABL IF MD MODE MOVE PATH 
PAUSE POPD PROMPT PUSHD RD REM REN SET SETLOCAL SHIFT START TIME TITLE 
TREE TYPE VER VERIFY VOL

Yours,

Frank



More information about the wpkg-users mailing list