Creating a shortcut to a programme on a usb drive.

Options
hey folks,

I want to be able to create a shortcut to launch a programme that is stored in a folder on a usb drive and have that shortcut on the actual usb drive itself, not on windows desktop as that way is easy enough to do, just send to desktop.

I use a few different computers and drive letter will change for the usb drive that is why I need the start shortcut on the actual usb drive itself, where the programme is stored.

Would save a lot of time actually searching for the icon that will start the programme in the drive.

Thanks
«1

Comments

  • DoaM
    DoaM Posts: 11,863 Forumite
    First Post First Anniversary Name Dropper Photogenic
    Options
    Does the USB drive have a name? If yes (and it's possible to do so) you could try creating a shortcut using the drive name. Example:

    \\USBName\Path\Application.exe
    

    Hopefully the drive will always have the same "network" name regardless of the drive letter assigned on various computers.

    Scratch that - I don't think it works.
  • grumpycrab
    grumpycrab Posts: 4,989 Forumite
    Name Dropper First Anniversary First Post Bake Off Boss!
    Options
    Find the program, right-mouse-click and create the shortcut (IE in same folder as executable). Move shortcut to root folder. Try it - you may be surprised!
    If you put your general location in your Profile, somebody here may be able to come and help you.
  • DoaM
    DoaM Posts: 11,863 Forumite
    First Post First Anniversary Name Dropper Photogenic
    Options
    grumpycrab wrote: »
    Find the program, right-mouse-click and create the shortcut (IE in same folder as executable). Move shortcut to root folder. Try it - you may be surprised!

    When you create the shortcut, the Target Path includes the drive letter. So unless this stays constant across all machines the drive is plugged in to then it won't work.

    I'll be pleasantly surprised if the Target Path auto-adjusts to the drive letter. :)
  • unforeseen
    unforeseen Posts: 7,284 Forumite
    First Anniversary Name Dropper First Post
    Options
    Small batch file placed in the same directory as the the program you want to run

    CD /d %~dp0
    Program.Exe

    The first line changes the working directory to the current drive and directory of your batch file. The second one runs your program


    I use this quite often to run programs off USB where you can't guarantee the drive letter.
  • grumpycrab
    grumpycrab Posts: 4,989 Forumite
    Name Dropper First Anniversary First Post Bake Off Boss!
    Options
    DoaM wrote: »
    I'll be pleasantly surprised if the Target Path auto-adjusts to the drive letter. :)
    Really odd. I don't really believe it myself. The path appears to auto-adjust. Tried it with "send shortcut to desktop" and then copying that to USB root - din't work - din't expect it too!
    But creating the shortcut in the same USB folder as source, then moving that to root appears to work.
    This is so weird, I'm videoing it...
    If you put your general location in your Profile, somebody here may be able to come and help you.
  • grumpycrab
    grumpycrab Posts: 4,989 Forumite
    Name Dropper First Anniversary First Post Bake Off Boss!
    Options
    grumpycrab wrote: »
    Really odd....
    But creating the shortcut in the same USB folder as source, then moving that to root appears to work.
    This is so weird, I'm videoing it...
    Video.
    USB drive is E: and the properties of the shortcut points to I:
    As soon as I open the file location the shortcut path changes from I: to E: (best if you try this yourself)

    https://youtu.be/1WGK5HCKpD8
    If you put your general location in your Profile, somebody here may be able to come and help you.
  • justaquestion
    Options
    grumpycrab wrote: »
    Really odd. I don't really believe it myself. The path appears to auto-adjust. Tried it with "send shortcut to desktop" and then copying that to USB root - din't work - din't expect it too!
    But creating the shortcut in the same USB folder as source, then moving that to root appears to work.
    This is so weird, I'm videoing it...

    Thanks for trying to help me. I did make a copy of the exe that starts the program within the program directory and then moved it to the root but didn't work, a dll wasn't found.

    as regards the

    …………………………………..

    Small batch file placed in the same directory as the the program you want to run

    CD /d %~dp0

    Program.Exe

    …………………………………………..

    Well thing is I don't want it in the folder that program is in, I want it in root of the drive.

    But thanks all the same, appreciate it.
  • grumpycrab
    grumpycrab Posts: 4,989 Forumite
    Name Dropper First Anniversary First Post Bake Off Boss!
    Options
    Why did you copy the exe? I suggested copying a shortcut.
    If you put your general location in your Profile, somebody here may be able to come and help you.
  • [Deleted User]
    [Deleted User] Posts: 5,186 Forumite
    Combo Breaker First Post
    Options
    Thanks for trying to help me. I did make a copy of the exe that starts the program within the program directory and then moved it to the root but didn't work, a dll wasn't found.

    as regards the

    …………………………………..

    Small batch file placed in the same directory as the the program you want to run

    CD /d %~dp0

    Program.Exe

    …………………………………………..

    Well thing is I don't want it in the folder that program is in, I want it in root of the drive.

    But thanks all the same, appreciate it.

    Then surely you just put the batch file in the root of the drive and point it at the folder the .exe is in since the working directory is already set to the root of the drive.

    /TargetFolder/Program.exe
  • that
    that Posts: 1,532 Forumite
    Options
    you could modify the path settings to include the location of the usb, put a batch file in that path like 1.bat

    you can run it by typing start > run > 1 it is quicker than running a mouse winkey + R 1
This discussion has been closed.
Meet your Ambassadors

Categories

  • All Categories
  • 343.3K Banking & Borrowing
  • 250.1K Reduce Debt & Boost Income
  • 449.7K Spending & Discounts
  • 235.3K Work, Benefits & Business
  • 608.1K Mortgages, Homes & Bills
  • 173.1K Life & Family
  • 248K Travel & Transport
  • 1.5M Hobbies & Leisure
  • 15.9K Discuss & Feedback
  • 15.1K Coronavirus Support Boards