How can I make my portable app run on a different computer?

Jim September 23, 2011
Pinterest Stumbleupon Whatsapp

Sometimes I have to work out of two or three different desktop computers. For this, I carry my own portable apps on a thumb drive. This works for me 90 percent of the time.

However, some applications refuse to run on a different desktop if the program was set up originally through a specific drive port (a, g, k, or M drive, for example) and they recorded a file as installed on a specific drive. When I go to a different computer, the app cannot find the file needed to run (a database file, for example) because now it is running through drive K instead of the original G drive.

Is there a way around this issue that you know? Thanks for your advice in advance.

Ads by Google

  1. Anonymous
    September 24, 2011 at 1:11 pm

    maybe you need Portable XML Editor
    http://www.stdutility.com/articles/portable-xml-editor.html
    •Settings are stored with the program and can be used for the next launch (they are saved to the same directory as the program). If an application saves your settings in the registry, it isn't portable and must be set up on every PC it is used on.

  2. Mike
    September 24, 2011 at 12:22 pm

    If and what you can do depends mostly on the programs you are using and how they were made portable. 
    One of the key points for truly portable apps is the use of relative paths. For example if your App is located in "drive:/Software/PortableApp/some.exe" and the file to open was "drive:/Data/database.xyz" the relative path would be "../../Data/database.xyz". 

    Obviously this is not always an option to set manually. If your program doesn't have allow to set relative paths I would try to work around the issue using a batch file which not only opens the program but also tells it to open the appropriate file. 

    In the above case you could put a batch file into the thumb drives root directory containing something like this: 

    start Software/PortableApp/some.exe   "../../Data/database.xyz"

    The way to pass along a file to open may vary from program to program but in general this should do. 

    • Mike
      September 24, 2011 at 12:27 pm

      Sorry, I have to correct myself - using the root directory it would actually be:

      start Software/PortableApp/some.exe   "Data/database.xyz"