We’d like to remind Forumites to please avoid political debate on the Forum.

This is to keep it a safe and useful space for MoneySaving discussions. Threads that are – or become – political in nature may be removed in line with the Forum’s rules. Thank you for your understanding.

📨 Have you signed up to the Forum's new Email Digest yet? Get a selection of trending threads sent straight to your inbox daily, weekly or monthly!
The Forum now has a brand new text editor, adding a bunch of handy features to use when creating posts. Read more in our how-to guide

Creating a shortcut to a programme on a usb drive.

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
    10,000 Posts Fifth Anniversary Name Dropper Photogenic
    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: 5,043 Forumite
    Part of the Furniture 1,000 Posts Name Dropper Bake Off Boss!
    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!
  • DoaM
    DoaM Posts: 11,863 Forumite
    10,000 Posts Fifth Anniversary Name Dropper Photogenic
    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,450 Forumite
    Part of the Furniture 1,000 Posts Photogenic Name Dropper
    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: 5,043 Forumite
    Part of the Furniture 1,000 Posts Name Dropper Bake Off Boss!
    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...
  • grumpycrab
    grumpycrab Posts: 5,043 Forumite
    Part of the Furniture 1,000 Posts Name Dropper Bake Off Boss!
    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
  • 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: 5,043 Forumite
    Part of the Furniture 1,000 Posts Name Dropper Bake Off Boss!
    Why did you copy the exe? I suggested copying a shortcut.
  • [Deleted User]
    [Deleted User] Posts: 5,186 Forumite
    1,000 Posts Combo Breaker
    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
    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

🚀 Getting Started

Hi new member!

Our Getting Started Guide will help you get the most out of the Forum

Categories

  • All Categories
  • 353.7K Banking & Borrowing
  • 254.2K Reduce Debt & Boost Income
  • 455.1K Spending & Discounts
  • 246.8K Work, Benefits & Business
  • 603.2K Mortgages, Homes & Bills
  • 178.2K Life & Family
  • 260.8K Travel & Transport
  • 1.5M Hobbies & Leisure
  • 16K Discuss & Feedback
  • 37.7K Read-Only Boards

Is this how you want to be seen?

We see you are using a default avatar. It takes only a few seconds to pick a picture.