Results 1 to 7 of 7
  1. #1
    New Lounger
    Join Date
    Nov 2011
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    cmd commands to copy shortcut of word exe

    I write the following batch to put short cut of word.exe of office 2003 in quick launch
    it work but put the exe file itself not a short cut
    could you tell me what i do to put short cut

    cmdow @ /HID

    echo
    copy C:\"Program Files"\"Microsoft Office"\OFFICE11\WINWORD.EXE "%systemdrive%\Documents and Settings\Administrator\Application Data\Microsoft\Internet Explorer\Quick Launch\shortcut to WINWORD.EXE"

    many thanks

  2. #2
    4 Star Lounger
    Join Date
    Jun 2011
    Location
    Hampshire (the old one)
    Posts
    525
    Thanks
    21
    Thanked 72 Times in 62 Posts
    You're bound to get asked why on earth you'd want to do this, but I won't as it's none of my business lol.

    AFAIK there's no way to do it at the command prompt (and I'm happy to be corrected on that), but you could do it using some sort of script I should think.

  3. #3
    Super Moderator BATcher's Avatar
    Join Date
    Feb 2008
    Location
    A cultural area in SW England
    Posts
    3,421
    Thanks
    33
    Thanked 195 Times in 175 Posts
    First you have to make a shortcut (suggest you put it on the desktop).

    In My Computer or in Windows Explorer, right click on WinWord.exe (in your case navigate to C:\Program Files\Microsoft Office\OFFICE11\) and from the drop-down menu choose "Send to..." and then "Desktop (create shortcut)".

    Then I suppose you just drag and drop the shortcut to the QuickLaunch toolbar (I don't know for certain, because I never use QuickLaunch!)...
    BATcher

    Time prevents everything happening all at once...

  4. #4
    New Lounger
    Join Date
    Nov 2011
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by tonyl View Post
    You're bound to get asked why on earth you'd want to do this, but I won't as it's none of my business lol.

    AFAIK there's no way to do it at the command prompt (and I'm happy to be corrected on that), but you could do it using some sort of script I should think.
    Thanks Tony

  5. #5
    New Lounger
    Join Date
    Nov 2011
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by BATcher View Post
    First you have to make a shortcut (suggest you put it on the desktop).

    In My Computer or in Windows Explorer, right click on WinWord.exe (in your case navigate to C:\Program Files\Microsoft Office\OFFICE11\) and from the drop-down menu choose "Send to..." and then "Desktop (create shortcut)".

    Then I suppose you just drag and drop the shortcut to the QuickLaunch toolbar (I don't know for certain, because I never use QuickLaunch!)...

    I know this method but I want it done after installing new window automatically
    Many thanks BATcher

  6. #6
    5 Star Lounger
    Join Date
    Jan 2010
    Location
    Los Angeles, CA
    Posts
    828
    Thanks
    4
    Thanked 38 Times in 34 Posts
    Why not use PowerShell? Try something like this:

    $wshshell = New-Object -ComObject WScript.Shell
    $lnk = $wshshell.CreateShortcut("$SystemDrive\Documents and Settings\Administrator\Application Data\Microsoft\Internet Explorer\Quick Launch\Word.lnk")
    $lnk.TargetPath = "$ProgramFiles\Microsoft Office\OFFICE11\WINWORD.EXE"
    $lnk.Save()

    This makes use of Windows Scripting Host functionality, so you could write a WSH script or VBScript to do this also.

  7. #7
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts
    As noted above, if you don't have PowerShell, a similar approach is available in VBScript. Microsoft's documentation and sample code can be found here: Windows Script Host - CreateShortcut Method

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •