jsrt-clawAutomate Windows system tasks by generating and running a single JavaScript file using Microsoft JsRT with COM objects and fallback support.
Install via ClawdBot CLI:
clawdbot install gnh1201/jsrt-clawJSRT enables control of a Windows system using the built-in Microsoft JsRT (JavaScript Runtime).
Depending on the execution environment, Microsoft JsRT may be referred to as:
WSHWindows Scripting Hostcscriptjscript.dllOn classic Windows systems, the JScript engine is implemented in jscript.dll (JScript 5.x). When running via cscript or wscript, this engine is typically used unless hosted by another environment.
This skill generates and executes a single .js file that interacts with Windows using COM objects and built-in scripting capabilities.
cscript YOUR_JS_FILE.js
COM objects:
Scripting.FileSystemObjectADODB.StreamTypical usage:
COM objects and functions:
WScript.ShellWbemScripting.SWbemLocatorGetObjectExample:
GetObject("winmgmts:{impersonationLevel=impersonate}!\\\\"
+ this.computer + "\\" + this.namespace);
Use cases:
Possible COM objects (availability depends on installed MSXML/WinHTTP components):
Microsoft.XMLHTTPWinHttp.WinHttpRequest.5.1Msxml3.XMLHTTPMsxml2.XMLHTTPMsxml2.XMLHTTP.7.0Msxml2.XMLHTTP.6.0Msxml2.XMLHTTP.5.0Msxml2.XMLHTTP.4.0Msxml2.XMLHTTP.3.0Msxml2.XMLHTTP.2.6Msxml2.ServerXMLHTTPMsxml2.ServerXMLHTTP.6.0Msxml2.ServerXMLHTTP.5.0Msxml2.ServerXMLHTTP.4.0Msxml2.ServerXMLHTTP.3.0Fallback loading is strongly recommended.
Excel.ApplicationPowerPoint.ApplicationWord.ApplicationOutlook.ApplicationAll COM objects must be instantiated using the following CreateObject function.
It supports:
if (typeof CreateObject === "undefined") {
var CreateObject = function(progId, serverName, callback) {
var progIds = (progId instanceof Array ? progId : [progId]);
for (var i = 0; i < progIds.length; i++) {
try {
var obj = CreateObject.make(progIds[i], serverName);
if (typeof callback === "function") {
callback(obj, progIds[i]);
}
return obj;
} catch (e) {
// Try next ProgID
}
}
throw new Error("Unable to create COM object from provided ProgIDs.");
};
CreateObject.make = function(p, s) {
if (typeof WScript !== "undefined") {
if ("CreateObject" in WScript) {
return WScript.CreateObject(p, s);
} else {
throw new Error("Built-in loader not available.");
}
} else if (typeof ActiveXObject !== "undefined") {
return new ActiveXObject(p);
} else {
throw new Error("Could not find a loader");
}
};
}
var xhr = CreateObject([
"Msxml2.XMLHTTP.6.0",
"Msxml2.XMLHTTP.3.0",
"Msxml2.XMLHTTP",
"Microsoft.XMLHTTP",
"WinHttp.WinHttpRequest.5.1"
]);
The loader attempts each ProgID in order until one succeeds.
Use the following function to determine the runtime:
function getProcessVersion() {
var getIEVersion = function() {
var rv = -1;
if (navigator.appName == 'Microsoft Internet Explorer') {
var ua = navigator.userAgent;
var re = new RegExp("MSIE ([0-9]{1,}[\\.0-9]{0,})");
if (re.exec(ua) != null)
rv = parseFloat(RegExp.$1);
}
return rv;
};
if (typeof WScript !== "undefined") {
return "Microsoft JScript " + WScript.Version;
} else if (typeof navigator !== "undefined") {
return (function(rv) {
return "MSIE" + (rv < 0 ? '' : (' ' + rv));
})(getIEVersion());
}
}
Because jscript.dll (JScript 5.x) does not support modern ECMAScript features, polyfills may be required.
| JScript Version | Introduced with IE | Example User-Agent |
| --------------- | -----------------: | ----------------------------------------------------------------- |
| 5.6.x | IE 6.0 | Mozilla/5.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) |
| 5.7.x | IE 7.0 | Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) |
| 5.8.x | IE 8.0 | Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0) |
Available polyfills can be checked at:
https://cdnjs.cloudflare.com/polyfill/
features Parameter FormatThe features parameter must be a comma-separated list of feature keywords:
features=feature1,feature2,feature3
In URL query strings, commas must be URL-encoded:
features=feature1%2Cfeature2%2Cfeature3
Example:
features=default,es2015
features=default%2Ces2015
GET https://cdnjs.cloudflare.com/polyfill/v3/polyfill.min.js?version=4.8.0&features=default%2Ces2015
User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0)
The User-Agent must match the detected JScript compatibility level.
getProcessVersion()featuresjscript.dllA real open-source project that applies this environment in practice is WelsonJS.
WelsonJS:
jscript.dll)If you need concrete usage examples, implementation patterns, or real source code references, use a search function to look up:
Reviewing the WelsonJS project will provide practical references that can help when implementing JSRT-based automation code.
JSRT provides:
jscript.dllIt is optimized for legacy Windows scripting environments while maintaining cross-version compatibility through structured fallback and polyfill strategies.
Generated Feb 24, 2026
Automates file management and data extraction in older Windows environments where modern scripting tools are unavailable. Uses COM objects like Scripting.FileSystemObject to read logs, generate reports, and clean up directories, ideal for maintaining aging infrastructure without upgrading software.
Monitors Windows systems by querying WMI via WbemScripting.SWbemLocator to collect performance metrics, hardware status, and event logs. Generates automated alerts or reports, useful for IT teams managing servers or workstations in enterprise settings.
Facilitates data transfer between legacy applications and modern systems by leveraging HTTP communication with COM objects like Microsoft.XMLHTTP. Reads data from files or databases, transforms it, and sends it to web APIs, supporting business process automation.
Automates Microsoft Office tasks such as generating Excel spreadsheets, Word documents, or PowerPoint presentations using COM objects like Excel.Application. Useful for batch processing reports, invoices, or presentations in administrative or financial roles.
Enhances JavaScript functionality in JScript environments by fetching and applying polyfills from CDN sources. Ensures compatibility with modern ECMAScript features, allowing legacy scripts to run updated code without system changes, beneficial for software maintenance.
Offers ongoing automation scripts as a service for businesses with legacy Windows systems. Clients pay a monthly fee for custom script development, maintenance, and support, generating recurring revenue from IT departments or small businesses.
Provides bespoke scripting solutions for specific tasks like file system cleanup or Office automation. Charges a fixed project fee based on complexity, targeting clients with immediate, short-term needs without long-term commitments.
Generates income by training IT professionals on using JSRT and COM objects for Windows automation. Includes workshops, documentation, and consulting sessions, appealing to organizations upgrading skills or integrating legacy systems.
💬 Integration Tip
Ensure COM objects are available on target Windows systems by testing fallback chains, and use polyfills to handle JScript limitations for smoother integration with modern code.
A fast Rust-based headless browser automation CLI with Node.js fallback that enables AI agents to navigate, click, type, and snapshot pages via structured commands.
Automate web browser interactions using natural language via CLI commands. Use when the user asks to browse websites, navigate web pages, extract data from websites, take screenshots, fill forms, click buttons, or interact with web applications.
Advanced desktop automation with mouse, keyboard, and screen control
Manage n8n workflows and automations via API. Use when working with n8n workflows, executions, or automation tasks - listing workflows, activating/deactivating, checking execution status, manually triggering workflows, or debugging automation issues.
Design and implement automation workflows to save time and scale operations as a solopreneur. Use when identifying repetitive tasks to automate, building workflows across tools, setting up triggers and actions, or optimizing existing automations. Covers automation opportunity identification, workflow design, tool selection (Zapier, Make, n8n), testing, and maintenance. Trigger on "automate", "automation", "workflow automation", "save time", "reduce manual work", "automate my business", "no-code automation".
Browser automation via Playwright MCP server. Navigate websites, click elements, fill forms, extract data, take screenshots, and perform full browser automation workflows.