kerwin612 / PortableRunner

Mount the portable directory as a consistent user directory. Then, based on this user directory, run your program.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PortableRunner

Mount the portable directory as a consistent user directory. Then, based on this user directory, run your program.

Note, run with administrator privileges.

help

PortableRunner [Target Path] [Link Path] [Home Name]
        args:
                Target Path: Specifies the physical drive and path that you want to assign to a virtual drive.
                Link Path: Specifies the virtual drive and path to which you want to assign a path.
                Home Name: The subdirectory name of the <Link Path> directory, Will be specified as the value of %HOME%, which defaults to [.home].

example

  • No parameters, double click to open
    1

  • Input parameters
    2

  • Enter to enter the main window
    3

  • Enter the command and press Enter to execute it. The command running environment is based on:

HOME=X:\work\.home
HOMEDRIVE=X:
HOMEPATH=X:\work\.home
LOCALAPPDATA=X:\work\.home\AppData\Local
PORTABLE_RUNNER_ENV_LINK_PATH=X:\work
PORTABLE_RUNNER_ENV_TARGET_PATH=E:\test
TEMP=X:\work\.home\AppData\Local\Temp
TMP=X:\work\.home\AppData\Local\Temp
USERPROFILE=X:\work\.home
...

.profile

%HOME%/[.profile.cmd|.profile.bat]

One of these two files is automatically executed when the program starts (if the file exists)

.pd.json

%HOME%/.pd.json

Configuration file, currently supports shortcuts configuration

example

{
    "shortcuts": [
        {
            "label": "重启",
            "key": "reboot",
            "cmd": "shutdown /r /f /t 0"
        },
        {
            "label": "关机",
            "key": "shutdown",
            "cmd": "shutdown /s /f /t 0"
        },
        {
            "key": "open",
            "cmd": "explorer",
            "parametersRequired": true,
            "group": "open"
        },
        {
            "key": "open-home",
            "cmd": "explorer %HOME%",
            "group": "open"
        }
    ]
}

sample

About

Mount the portable directory as a consistent user directory. Then, based on this user directory, run your program.

License:MIT License


Languages

Language:Rust 31.3%Language:JavaScript 31.3%Language:CSS 10.6%Language:Batchfile 10.0%Language:HTML 9.5%Language:VBScript 7.3%