Copy a .lnk to a nother directory in the start menu

Questions or comments on the switchless installers? Want to create a new one? Talk about it here.
Post Reply
User avatar
UtCollector
Posts: 464
Joined: Sun Apr 09, 2006 8:31 pm
Contact:

Copy a .lnk to a nother directory in the start menu

Post by UtCollector » Tue Jul 11, 2006 9:05 am

Hej i would like to know how i can coppy a shortcut using a .cmd ore .bat file.

this link:
C:\Program Files\DVD Shrink\DVD Shrink 3.2.exe"
I need the shortcut to be coppy to
C:\Documents and Settings\Frank\Start Menu\Programs\DVD\

I did try this but i ant working yet:
copy /Y "%AllUsersProfile%\Start Menu\Programs\DVD Shrink\*.*" "%UserProfile%\Start Menu\DVD\*.*"

Any one a solution please :?:

Shark007
Posts: 326
Joined: Wed Nov 24, 2004 9:25 pm

Re: Copy a .lnk to a nother directory in the start menu

Post by Shark007 » Tue Jul 11, 2006 11:12 am

UtCollector wrote:Hej i would like to know how i can coppy a shortcut using a .cmd ore .bat file?
I copy/move links with batch files alot.

The problem is most likely in your command...
copy /Y "%AllUsersProfile%\Start Menu\Programs\DVD Shrink\*.*" "%UserProfile%\Start Menu\DVD\*.*"
the destination dir MUST exist .. possibly should be
"%UserProfile%\Start Menu\Programs\DVD\*.*"

shark

User avatar
UtCollector
Posts: 464
Joined: Sun Apr 09, 2006 8:31 pm
Contact:

Post by UtCollector » Tue Jul 11, 2006 12:38 pm

If have done it like this now:

Code: Select all

cmdow @ /HID
@echo off

md "%AllUsersProfile%\Start Menu\Programs\DVD

xcopy "%UserProfile%\Start Menu\Programs\DVD Decrypter\*.*" "%UserProfile%\Start Menu\Programs\DVD\*.*"
xcopy "%AllUsersProfile%\Start Menu\Programs\DVD Shrink\*.*" "%UserProfile%\Start Menu\Programs\DVD\*.*"

DEL /s /q "%AllUsersProfile%\Start Menu\Programs\DVD Shrink\*.*
rd /s /q "%AllUsersProfile%\Start Menu\Programs\DVD Shrink"
DEL /s /q "%UserProfile%\Start Menu\Programs\DVD Decrypter\*.*"
rd /s /q "%UserProfile%\Start Menu\Programs\DVD Decrypter"

DEL "%UserProfile%\Start Menu\Programs\DVD\Uninstall*.lnk"

EXIT
What is the difference between copy /Y and xcopy?
Than 1 of the programs i use in the addon makes the UserProfile%\Start Menu\Programs\DVD\ (Directory)

Is it still usefull to make a directory this way:

Code: Select all

md "%AllUsersProfile%\Start Menu\Programs\DVD
Greats and thank :!: :D

HiDefHusker
Posts: 14
Joined: Sat Jul 01, 2006 6:55 pm

Post by HiDefHusker » Fri Jul 14, 2006 1:43 pm

Remove the "*.*" from the destination directory.

User avatar
UtCollector
Posts: 464
Joined: Sun Apr 09, 2006 8:31 pm
Contact:

Post by UtCollector » Mon Jul 17, 2006 4:33 am

HiDefHusker wrote:Remove the "*.*" from the destination directory.
You right its not needed :D

Post Reply