Enable portability with AdvancedRun

Share interesting information or links related to portable apps here.
Post Reply
Message
Author
User avatar
webfork
Posts: 10821
Joined: Wed Apr 11, 2007 8:06 pm
Location: US, Texas
Contact:

Enable portability with AdvancedRun

#1 Post by webfork »

I tested the following process on PySol Fan Club and was able to make it run portably. I have not yet tested it with other programs but hoping for similar results.

Steps:

1. Download AdvancedRun and extract the contents to the program folder you're trying to make portable

2. Launch AdvancedRun and enter the EXE name in the "Program to run" field (e.g. pysol.exe)

3. From the dropdown menu next to Environment Variables, select "Use only the following environment variables (Ignore the system variables)"

4. Click Fill Current Environmental Strings.

5. In the text that appears below, edit the following text:

from
APPDATA=C:\Users\username\AppData\Roaming
to
APPDATA=.

... and...

from
LOCALAPPDATA=C:\Users\username\AppData\Local
to
LOCALAPPDATA=.

Image


6. Click Save Config and save the result as AdvancedRun.cfg (should be the default option)

7. Create a text file in the same location and paste in the following text:

start "" "AdvancedRun.exe" \Run

8. Save the text file as program.bat

9. Launch program.bat


---

Note that this is not my idea -- I saw a notice in a thread discussing portability over in the Audacious forums:
You can solve your problem with a small utility from NirSoft (AdvancedRun).
Create a new folder 'Data', 'User' or another one in audacious folder. In AdvancedRun change the environment variable 'USERPROFILE' to point to the folder you have created and choose the option 'Merge the following e.v. with the system variables'. The config files will be stored in that folder and audacious wil leave no traces in system. You can also save that config file for further utilization with advancedrun.
---

Update: I tested this out with Magic Set Editor, Fast Mockup, and Ninja Download Manager without success. I thought I was on to something, but this function might be limited to only a few programs like Pysol.

User avatar
Midas
Posts: 6726
Joined: Mon Dec 07, 2009 7:09 am
Location: Sol3

Re: Enable portability with AdvancedRun

#2 Post by Midas »

webfork wrote: I tested this out with Magic Set Editor, Fast Mockup, and Ninja Download Manager without success. I thought I was on to something, but this function might be limited to only a few programs like Pysol.

Such a shame... :(

Most likely working with programs that accept the local environment as is, without bypassing it to directly query the underlying OS, IMHO.

Anyway, always good to have another option in the toolset. Thanks for testing. 8)

User avatar
webfork
Posts: 10821
Joined: Wed Apr 11, 2007 8:06 pm
Location: US, Texas
Contact:

Re: Enable portability with AdvancedRun

#3 Post by webfork »

Midas wrote: Mon Feb 17, 2020 5:01 am Such a shame... :(
Yeah I stayed up until 2 AM trying to make this work :)

Midas wrote: Mon Feb 17, 2020 5:01 am Most likely working with programs that accept the local environment
Very likely. And given that I imagine developers aren't fond of chasing weird issues when someone messes with environment variables, they hard-code it rather than asking the operating system.

Midas wrote: Mon Feb 17, 2020 5:01 am Anyway, always good to have another option in the toolset. Thanks for testing. 8)
Agreed :) and it's very easy to port the program to test it -- you just edit the "Program to Run entry" and rename the batch file.

TP109
Posts: 571
Joined: Sat Apr 08, 2006 7:12 pm
Location: Midwestern US

Re: Enable portability with AdvancedRun

#4 Post by TP109 »

Interesting use of AdvancedRun. Will come in handy. Good post.

Post Reply