{"id":16227659,"url":"https://github.com/el3um4s/run-vbs","last_synced_at":"2026-04-18T11:02:58.185Z","repository":{"id":57711361,"uuid":"513296524","full_name":"el3um4s/run-vbs","owner":"el3um4s","description":"Run .vbs script with node","archived":false,"fork":false,"pushed_at":"2023-01-09T01:56:57.000Z","size":869,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-08T15:46:33.285Z","etag":null,"topics":["cscript","cscripts","node","node-js","nodejs","vbs","vbscript","vbscript-script","windows"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/el3um4s.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},"funding":{"github":["el3um4s"],"patreon":"el3um4s","open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":["https://www.paypal.me/el3um4s"]}},"created_at":"2022-07-12T21:24:19.000Z","updated_at":"2022-07-13T15:41:36.000Z","dependencies_parsed_at":"2023-02-08T08:15:33.782Z","dependency_job_id":null,"html_url":"https://github.com/el3um4s/run-vbs","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":"el3um4s/typescript-npm-package-starter","purl":"pkg:github/el3um4s/run-vbs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/el3um4s%2Frun-vbs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/el3um4s%2Frun-vbs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/el3um4s%2Frun-vbs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/el3um4s%2Frun-vbs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/el3um4s","download_url":"https://codeload.github.com/el3um4s/run-vbs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/el3um4s%2Frun-vbs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31966217,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T00:39:45.007Z","status":"online","status_checked_at":"2026-04-18T02:00:07.018Z","response_time":103,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["cscript","cscripts","node","node-js","nodejs","vbs","vbscript","vbscript-script","windows"],"created_at":"2024-10-10T12:53:27.757Z","updated_at":"2026-04-18T11:02:58.145Z","avatar_url":"https://github.com/el3um4s.png","language":"TypeScript","funding_links":["https://github.com/sponsors/el3um4s","https://patreon.com/el3um4s","https://www.paypal.me/el3um4s"],"categories":[],"sub_categories":[],"readme":"# Node RunVbs\n\nA simple package to run VBS scripts from NodeJs.\n\nNPM link: [@el3um4s/run-vbs](https://www.npmjs.com/package/@el3um4s/run-vbs)\n\n### Install and use the package\n\nTo use the package in a project:\n\n```bash\nnpm i @el3um4s/run-vbs\n```\n\nand then in a file:\n\n```ts\nimport { runVbs, runVbsFile } from \"@el3um4s/run-vbs\";\n\nconst vbs = `Wscript.Echo \"hello world\"`;\nconst result = await runVbs({ vbs });\nconsole.log(result); // hello world\n\nconst file = \"./test.vbs\";\nconst fromFile = await runVbsFile({ vbs: file });\nconsole.log(fromFile); // hello world\n```\n\n### API: runVbs\n\n- `runVbs(data: { vbs: string; args?: string[]; }): Promise\u003cstring\u003e` Run a VBS script and return the result.\n- `runVbsBuffer(data: { vbs: string; args?: string[]; }): Promise\u003cstring[]\u003e` Run a VBS script and return the result as a buffer.\n\n```ts\nimport { runVbs } from \"@el3um4s/run-vbs\";\n\nconst vbs = `\nset args = Wscript.Arguments\n\nDim name, surname\n\nDim count\ncount = WScript.arguments.count\n\nif count = 0 then\n    name = \"\"\n    surname = \"\"\n    Wscript.Echo \"hello world\"\nend if\n\nif count = 1 then\n    name = args(0)\n    surname = \"\"\n    Wscript.Echo \"hello\" \u0026 \" \" \u0026 name \u0026 \"!\"\nend if\n\nif count = 2 then\n    name = args(0)\n    surname = args(1)\n    Wscript.Echo \"hello\" \u0026 \" \" \u0026 name \u0026 \" \" \u0026 surname  \u0026 \"!\"\nend if\n`;\n\nconst result = await runVbs({\n  vbs,\n});\nconsole.log(result); // hello world\n\nconst result2 = await runVbs({\n  vbs,\n  args: [\"John\", \"Doe\"],\n});\nconsole.log(result2); // hello John Doe!\n```\n\n### API: runVbsFile\n\n- `runVbsFile(data: { vbs: string; args?: string[]; }): Promise\u003cstring\u003e` Run a VBS script and return the result.\n- `runVbsFileBuffer(data: { vbs: string; args?: string[]; }): Promise\u003cstring[]\u003e` Run a VBS script and return the result as a buffer.\n\n```ts\nimport { runVbsFile } from \"@el3um4s/run-vbs\";\n\nconst result = await runVbsFile({\n  vbs: \"./src/__tests__/test_no_output.vbs\",\n});\nconsole.log(result); // hello world\n\nconst result2 = await runVbsFile({\n  vbs: \"./src/__tests__/test_no_output.vbs\",\n  args: [\"John\", \"Doe\"],\n});\nconsole.log(result2); // hello John Doe!\n```\n\n### Known Issues\n\nThere can be issues when the file path has a space.\n\n### Acknowledgments\n\nTo create this package I was inspired by:\n\n- [windows-shortcut-vbs](https://www.npmjs.com/package/windows-shortcut-vbs)\n- [el3um4s/deno-adodb](https://github.com/el3um4s/deno-adodb)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fel3um4s%2Frun-vbs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fel3um4s%2Frun-vbs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fel3um4s%2Frun-vbs/lists"}