Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have some portable apps and when I download them they extract to a normal directory structure, but the structure includes a version number, How do I create a start-up shortcut to the program so it doesn’t break when the application is updated?

For example:
I can create a shortcut to “D:\PortableApp\V1\prog.exe” and place the shortcut into Startup items and it works fine. Now the program is updated to V1.1. How do I get the shortcut to update to “D:\PortableApp\V1.1\prog.exe”without manually updating the shortcut?

Thanks in advance

mikeparkie

share|improve this question
    
When the program gets updated, does the old version folder (V1) and exe file (prog.exe) stay in the PortableApp folder or are they deleted? –  amiregelz Aug 3 '12 at 10:02
    
The existing folder "V1" is deleted and a new extracted folder "V1.1" is created. –  mikeparkie Aug 3 '12 at 10:23
    
I don't think updating a shortcut path automatically is possible, but you can extract the new V1.1 folder to the PortableApp folder and set the shortcut path to D:\PortableApp\prog.exe. I know it's not exactly what you're looking for, but except for the version folder not existing, it's more or less the same. You can also use a tool like that to recover broken shortcuts, but I'm not sure it's more efficient than reformatting the shortcut path manually. –  amiregelz Aug 3 '12 at 12:44
    
I think that may be the way to go. thanks for your input :) –  mikeparkie Aug 6 '12 at 7:42

1 Answer 1

You can create a custom Environment Variable and use that in the shortcut's path instead of hard coded version path.

Use the %MYCUSTOMPORTABLEPATH% in the shortcut path itself instead.

You can also keep part of the path fixed and just store the version in the Environment too.

D:\PortableApp\%MYLATESTVERSIONNUMBER%\prog.exe

Just like you can use %HOMEDRIVE%%HOMEPATH% in a shortcut path, you can also create your own vars.

Just update your environment variable when you upgrade and the shortcut should point to new stuff.

That said, having version-less paths may work fine too depending on your needs.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.