{"id":23346358,"url":"https://github.com/tuckn/wshapplauncher","last_synced_at":"2026-05-09T10:10:40.240Z","repository":{"id":106923703,"uuid":"290607335","full_name":"tuckn/WshAppLauncher","owner":"tuckn","description":"The WSH (Windows Script Host) CLI that launches apps according to the schema defined in a JSON file.","archived":false,"fork":false,"pushed_at":"2024-01-25T22:11:32.000Z","size":200,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-13T19:39:18.326Z","etag":null,"topics":["cli","jscript","json","launcher","schema","windows","wsf","wsh"],"latest_commit_sha":null,"homepage":"https://tuckn.net/docs/WshAppLauncher/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tuckn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null},"funding":{"github":["tuckn"],"patreon":"tuckn","open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2020-08-26T21:21:05.000Z","updated_at":"2024-06-27T09:33:35.000Z","dependencies_parsed_at":"2024-01-25T23:37:23.729Z","dependency_job_id":"12277959-ad2e-47bf-b002-b80cbf937967","html_url":"https://github.com/tuckn/WshAppLauncher","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tuckn%2FWshAppLauncher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tuckn%2FWshAppLauncher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tuckn%2FWshAppLauncher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tuckn%2FWshAppLauncher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tuckn","download_url":"https://codeload.github.com/tuckn/WshAppLauncher/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247694882,"owners_count":20980733,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","jscript","json","launcher","schema","windows","wsf","wsh"],"created_at":"2024-12-21T07:13:32.878Z","updated_at":"2026-05-09T10:10:35.199Z","avatar_url":"https://github.com/tuckn.png","language":"JavaScript","funding_links":["https://github.com/sponsors/tuckn","https://patreon.com/tuckn"],"categories":[],"sub_categories":[],"readme":"# WshAppLauncher\n\nThe WSH (Windows Script Host) CLI that launches apps according to the schema defined in a JSON file.\n\n## Operating environment\n\nWorks on JScript in Windows.\n\n## Installation\n\nDownload this ZIP and unzip or Use the following `git` command.\n\n```console\nD:\\\u003e git clone https://github.com/tuckn/WshAppLauncher.git\nD:\\\u003e cd WshAppLauncher\n```\n\nNow suppose your directory structure looks like this.\n\n```console\nD:\\WshAppLauncher\\\n  ├─ .wsh\\\n  │ └─ settings.json\n  └─ dist\\\n     ├─ Run.wsf\n     └─ bundle.js\n```\n\n## Usage\n\n### Write Schema JSON\n\nThe JSON default path to load is _%CD%\\.wsh\\\\settings.json_.\nSee _.\\\\.wsh\\\\settings.json_ as example.\n\nWrite your app schema in the JSON file, for example,\n\n```json\n{\n  \"appLauncherSchema\": {\n    \"tasks\": {\n      \"main:Firefox\": {\n        \"app\": \"D:\\\\MyApps\\\\Firefox\\\\FirefoxPortable.exe\"\n      },\n      \"main:AutoHotkey\": {\n        \"app\": \"D:\\\\MyApps\\\\AutoHotkey\\\\AutoHotkeyU64.exe\",\n        \"args\": [\"D:\\\\MyConfs\\\\MyHotKey.ahk\"],\n        \"runsAdmin\": true\n      }\n    }\n  }\n}\n```\n\nYou can also define variables into `components` object.\nThe defined variable can be used as `${valName}` in `tasks`.\n\n```json\n{\n  \"appLauncherSchema\": {\n    \"components\": {\n      \"binDir\": \"D:\\\\MyApps\",\n      \"etcDir\": \"D:\\\\MyConfs\"\n    },\n    \"tasks\": {\n      \"main:Firefox\": {\n        \"app\": \"${binDir}\\\\Firefox\\\\FirefoxPortable.exe\"\n      },\n      \"main:AutoHotkey\": {\n        \"app\": \"${binDir}\\\\AutoHotkey\\\\AutoHotkeyU64.exe\",\n        \"args\": [\"${etcDir}\\\\MyHotKey.ahk\"],\n        \"runsAdmin\": true\n      }\n    }\n  }\n}\n```\n\nYou can also use a date code literal to define `app` and `args`.\n\n```json\n{\n  \"appLauncherSchema\": {\n    \"tasks\": {\n      \"main:mkTmpDir\": {\n        \"app\": \"mkdir\",\n        \"args\": [\"R:\\\\tmp_#{yyyyMMdd}\"],\n        \"shell\": true\n      }\n    }\n  }\n}\n```\n\nSee [WshUtil: parseDateLiteral](https://tuckn.net/docs/WshUtil/Wsh.Util.html#.parseDateLiteral) for the literal.\n\nAnd can also use launching options.\n\n```json\n  \"appLauncherSchema\": {\n    \"tasks\": {\n      \"dev:cmdAdmin\": {\n        \"available\": true,\n        \"app\": \"C:\\\\Windows\\\\System32\\\\cmd.exe\",\n        \"winStyle\": \"nonActiveMin\",\n        \"runsAdmin\": true\n      }\n    }\n  }\n```\n\nSee [WshAppLauncher: typeSchemaAppLauncherTask](https://tuckn.net/docs/WshAppLauncher/docs/global.html#typeSchemaAppLauncherTask) for the options.\n\n### Run with WSH\n\nRun all available tasks.\n\n```console\n\u003e cscript .\\dist\\Run.wsf schemaLaunch *\n```\n\nCan specify any tasks to run with property names.\n\n```console\n\u003e cscript .\\dist\\Run.wsf schemaLaunch main:*\n```\n\nShow the help.\n\n```console\n\u003e cscript .\\dist\\Run.wsf schemaLaunch --help\n\nUsage: schemaLaunch \u003ctaskName\u003e [overwriteKey:val...] [options]\n\nThe command to launch applications defined with a schema JSON\n\nOptions:\n  -V, --version          Output the version number\n  -D, --dir-path \u003cpath\u003e  The path name where the schema JSON is located. \u003cDirectory Path\u003e or \"cwd\", \"portable\", \"userProfile\". Default: \"cmd\" is \"%CD%\\.wsh\"\n  -F, --file-name \u003cname\u003e A JSON file name. (default: \"settings.json\")\n  -E, --encoding \u003cname\u003e  The JSON file encoding. (default: \"utf-8\")\n  -N, --prop-name \u003cname\u003e A property name of the schema object. (default: \"appLauncherSchema\")\n  -L, --logger \u003cval\u003e     \u003clevel\u003e/\u003ctransportation\u003e. e.g. \"warn/popup\".  (default: \"info/console\")\n  -R, --dry-run          No execute. Outputs the string of command. (default: false)\n  -h, --help             Output usage information\n```\n\nSee [Wsh.ConfigStore](https://tuckn.net/docs/WshConfigStore/) for the options `--dir-path` and `--file-name`.\nand see [Wsh.Logger](https://tuckn.net/docs/WshLogger/) for the options `--logger`.\n\n### Command examples\n\nUse to specify a task name and a schema JSON path.\n\n```console\ncscript //nologo .\\dist\\Run.wsf schemaLaunch main:AutoHotkey --dir-path \"C:\\My Settings\\\"\n```\n\n## Installation as Module\n\n(1) Create a directory of your WSH project.\n\n```console\nD:\\\u003e mkdir MyWshProject\nD:\\\u003e cd MyWshProject\n```\n\n(2) Download this ZIP and unzip or Use the following `git` command.\n\n```console\n\u003e git clone https://github.com/tuckn/WshAppLauncher.git ./WshModules/WshAppLauncher\nor\n\u003e git submodule add https://github.com/tuckn/WshAppLauncher.git ./WshModules/WshAppLauncher\n```\n\n(3) Include _.\\\\WshAppLauncher\\\\dist\\\\bundle.js_ into your .wsf file.\nFor Example, if your file structure is\n\n```console\nD:\\MyWshProject\\\n├─ Run.wsf\n├─ MyScript.js\n└─ WshModules\\\n    └─ WshAppLauncher\\\n        └─ dist\\\n          └─ bundle.js\n```\n\nThe content of the above _Run.wsf_ is\n\n```xml\n\u003cpackage\u003e\n  \u003cjob id = \"run\"\u003e\n    \u003cscript language=\"JScript\" src=\"./WshModules/WshAppLauncher/dist/bundle.js\"\u003e\u003c/script\u003e\n    \u003cscript language=\"JScript\" src=\"./MyScript.js\"\u003e\u003c/script\u003e\n  \u003c/job\u003e\n\u003c/package\u003e\n```\n\nI recommend this WSH file (.wsf) encoding to be UTF-8 [BOM, CRLF].\n\n### Together with another Apps\n\nIf you want to use it together with another Apps, install as following\n\n```console\n\u003e git clone https://github.com/tuckn/WshBasicPackage.git ./WshModules/WshBasicPackage\n\u003e git clone https://github.com/tuckn/WshSmbConnector.git ./WshModules/WshSmbConnector\n\u003e git clone https://github.com/tuckn/WshAppLauncher.git ./WshModules/WshAppLauncher\nor\n\u003e git submodule add https://github.com/tuckn/WshBasicPackage.git ./WshModules/WshBasicPackage\n\u003e git submodule add https://github.com/tuckn/WshSmbConnector.git ./WshModules/WshSmbConnector\n\u003e git submodule add https://github.com/tuckn/WshAppLauncher.git ./WshModules/WshAppLauncher\n```\n\n```xml\n\u003cpackage\u003e\n  \u003cjob id = \"run\"\u003e\n    \u003cscript language=\"JScript\" src=\"./WshModules/WshBasicPackage/dist/bundle.js\"\u003e\u003c/script\u003e\n    \u003cscript language=\"JScript\" src=\"./WshModules/WshSmbConnector/dist/module.js\"\u003e\u003c/script\u003e\n    \u003cscript language=\"JScript\" src=\"./WshModules/WshAppLauncher/dist/module.js\"\u003e\u003c/script\u003e\n    \u003cscript language=\"JScript\" src=\"./MyScript.js\"\u003e\u003c/script\u003e\n  \u003c/job\u003e\n\u003c/package\u003e\n```\n\n## Usage as Module\n\nNow _.\\\\MyScript.js_ (JScript ) can use `Wsh.AppLauncher`.\n\nBacking up and logging.\n\n```js\nvar apL = Wsh.AppLauncher; // Shorthand\n\napL.launchAppUsingLog('C:\\\\Windows\\\\System32\\\\net.exe', ['use'], {\n  runsAdmin: true,\n  winStyle: 'nonActive',\n  logger: 'info/console' // See https://github.com/tuckn/WshLogger\n});\n```\n\nWith Schema\n\n```js\nvar apL = Wsh.AppLauncher; // Shorthand\n\nvar schema = {\n  description: 'Example Schema WshAppLauncher',\n  components: {\n    binDir: 'D:\\\\MyApps',\n    etcDir: 'D:\\\\MyConfs',\n    wmLeftPath: null,\n    wmRightPath: null\n  },\n  tasks: {\n    'main:Claunch': {\n      app: '${binDir}\\\\CLaunch\\\\ClAdmin.exe'\n    },\n    'main:AutoHotkey': {\n      app: '${binDir}\\\\AutoHotkey\\\\AutoHotkeyU64.exe',\n      args: ['${etcDir}\\\\MyHotKey.ahk'],\n      runsAdmin: true\n    },\n    'main:FreeCommander': {\n      app: '${binDir}\\\\FreeCommander\\\\FreeCommander.exe',\n      args: ['/N', '/ini=${etcDir}\\\\FreeCommander.ini'],\n      winStyle: 'nonActiveMin'\n    },\n    'main:mkTmpDir': {\n      app: 'mkdir',\n      args: ['R:\\\\tmp_#{yyyyMMdd}'],\n      shell: true\n    },\n    'dev:cmdAdmin': {\n      available: false,\n      app: 'C:\\\\Windows\\\\System32\\\\cmd.exe',\n      runsAdmin: true\n    },\n    'dev:Vim': {\n      app: '${binDir}\\\\Vim\\\\gvim.exe',\n      args: ['-N', '-u', '${etcDir}\\\\_vimrc', '-U', '${etcDir}\\\\_gvimrc']\n    },\n    'app:WinMerge': {\n      app: '${binDir}\\\\WinMerge\\\\WinMergePortable.exe',\n      args: ['${wmLeftPath}', '${wmRightPath}'],\n      winStyle: 'activeMax'\n    }\n  }\n};\n\napL.launchAppsUsingSchema(schema, 'main:*', {\n  logger: 'info/console',\n});\n// Only process appLog:current. appLog:lastMonth is not processed because available is false.\n```\n\n### Dependency Modules\n\nYou can also use [tuckn/WshBasicPackage](https://github.com/tuckn/WshBasicPackage) functions in _.\\\\MyScript.js_ (JScript).\n\n## Documentation\n\nSee all specifications [here](https://tuckn.net/docs/WshAppLauncher/) and also [WshBasicPackage](https://tuckn.net/docs/WshBasicPackage/).\n\n## License\n\nMIT\n\nCopyright (c) 2020 [Tuckn](https://github.com/tuckn)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftuckn%2Fwshapplauncher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftuckn%2Fwshapplauncher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftuckn%2Fwshapplauncher/lists"}