This script allows you to create a portable version of any app that uses local user data. It copies the specified application into a new folder and configures it to store user data locally, making the app portable.
- Creates a portable version of your app.
- Stores all app data in a subfolder called
UserDatainside the portable app directory. - Allows launching the app with user-specific data stored locally.
- Works with any app that has a standalone
.exefile.
- A Windows machine (This script uses batch scripting).
- The app you want to make portable must have a main
.exefile that you can point to.
-
Prepare the app:
- Ensure you have the application you want to make portable and know the full path to its folder.
- The folder must contain the main executable (
.exefile) for the app.
-
Run the script:
- Save the script as
build_portable.bat. - Double-click
build_portable.batto run the script.
- Save the script as
-
Enter the required information:
- App Name: Enter a name for your portable app. This will be the name of the folder where the portable version is stored.
- App Folder Path: Provide the full path to the folder where the app's
.exefile is located. - Executable Name: Enter the name of the app's main
.exefile (e.g.,app.exe).
-
Folder Creation:
- The script will check if the folder exists. If it does, you will be asked if you want to overwrite it. If you choose to overwrite, the old folder will be deleted, and a new folder will be created.
-
Final Output:
- The script will copy the app's files to a new folder.
- It will create a
launch_app.batscript that you can use to run the portable app. - The portable app's data will be stored in a
UserDatafolder inside the new directory.
-
Launch the App:
- To launch the app, go to the new portable folder and run the
launch_app.batfile.
- To launch the app, go to the new portable folder and run the
Here’s an example of how the script works:
Enter the name of your portable app (e.g., MyPortableApp): MyCoolApp
Enter the full path to the app folder (where the main .exe is): C:\Programs\MyCoolApp
Enter the name of the executable (e.g., app.exe): MyCoolApp.exe