RaggieScript v1.3.0
Browse Table of Contents (17 chapters)
Getting Started (2)
Language Reference (4)
Core Standard Library (3)
Windows, MSI SQL & Native FFI (3)
Wizard UI & Studio Sandboxes (3)
Diagnostics & Bytecode ISA (2)
Master Symbol Index
7 min read Module: raggiesoft.raggiescript F1: IDH_RSSC_NS_PROC_FFI (0x200B)

proc.*, ffi.*, rm.*, shortcut.*, shell.*, env.*, arp.*, svc.*, task.*, firewall.* & acl.*

This chapter documents every Windows process, 64-bit native DLL FFI, Restart Manager, shell integration, environment PATH, Installed apps (ARP), Windows Service, Scheduled Task, Defender Firewall, and NTFS ACL API in RaggieScript v1.0.

proc.* & rm.* — Process Execution, Explorer De-Elevation & Restart Manager (14 Methods)

MethodSignatureReturnMutating?Description
proc.isRunningproc.isRunning(exeName: string)boolRead-OnlySnapshots running processes (CreateToolhelp32Snapshot) to check if exeName is active.
proc.listRunningproc.listRunning(filterSubstr?: string)arrayRead-OnlyReturns array of { pid, name } maps for active processes.
proc.runproc.run(exe: path, args?: string, wait?: bool, hidden?: bool, token?: string, workDir?: path, timeoutMs?: int)intHostLaunches exe under Token.Current, Token.Elevated, or Token.Desktop; returns exit code when wait: true (or 0 when wait: false).
proc.execproc.exec(exe: path, ...)intHostAlias for proc.run(...).
proc.openproc.open(urlOrDoc: string, args?: string)boolHostOpens an https:// URL, custom URI (raggiesoft-books://...), or document via ShellExecuteExW.
proc.shellOpenproc.shellOpen(urlOrDoc: string, args?: string)boolHostAlias for proc.open(...).
proc.terminateproc.terminate(exeName: string, exitCode?: int)boolMutating (RSW701)Force-terminates matching processes (prefer proc.restartManagerShutdown first!).
proc.callDllIntproc.callDllInt(dllName: string, exportName: string, ...intArgs)intHostCalls a native 64-bit C ABI DLL export with integer arguments and returns int64.
proc.getLockingProcessesproc.getLockingProcesses(filePaths: array)arrayRead-OnlyQueries Windows Restart Manager (Rstrtmgr.dll!RmGetList) and returns { pid, appName, serviceShortName }[] locking filePaths.
proc.restartManagerShutdownproc.restartManagerShutdown(filePaths: array, forceUnresponsive?: bool)boolMutating (RSW701)Gracefully closes applications/services holding locks on filePaths via RmShutdown (saving WM_QUERYENDSESSION state!).
proc.restartManagerRestartproc.restartManagerRestart()boolMutating (RSW701)Restarts applications closed during the active Restart Manager session (RmRestart).
rm.getLockingProcessesrm.getLockingProcesses(filePaths: array)arrayRead-OnlyClean alias for proc.getLockingProcesses(filePaths).
rm.shutdownrm.shutdown(filePaths: array, force?: bool)boolMutating (RSW701)Clean alias for proc.restartManagerShutdown(filePaths, force).
rm.restartrm.restart()boolMutating (RSW701)Clean alias for proc.restartManagerRestart().

ffi.* — Native 64-Bit DLL Foreign Function Interface (1 Method)

ffi.call loads any native 64-bit (x64 or ARM64 matching host) DLL and marshals int/uint/ptr, UTF-8 str, and UTF-16 wstr arguments over the platform ABI (Microsoft x64 or AAPCS64 on ARM64):

MethodSignatureReturnDescription
ffi.callffi.call(dllName: string, funcName: string, returnType: string, args: array)anyreturnType: "int", "uint", "bool", "ptr", "str", "wstr", or "void". Strings inside args marshal automatically as wide UTF-16 pointers (LPCWSTR) when funcName ends with 'W', or UTF-8 (LPCSTR) otherwise!
const pid = ffi.call("kernel32.dll", "GetCurrentProcessId", "uint", []);

shortcut.* & shell.* — .lnk Shortcuts, File Types & URI Protocols (6 Methods)

MethodSignatureReturnMutating?Description
shortcut.createshortcut.create(location: any, name: string, target: path, args?: string, description?: string, iconPath?: path, workDir?: path)pathMutating (RSW701)Creates a COM IShellLinkW .lnk file in "Desktop", "StartMenu", "PublicDesktop", "CommonStartMenu", or an explicit folder path (rollback-tracked!).
shortcut.removeshortcut.remove(lnkPath: path)boolMutating (RSW701)Removes a .lnk shortcut file.
shell.registerFileTypeshell.registerFileType(ext: string, progId: string, description: string, target: path, iconPath?: path, verbArgs?: string)boolMutating (RSW701)Registers .ext + ProgID cleanly under Software\Classes (HKCU for Scope.User, HKLM for Scope.Machine—zero legacy pipe-delimited parsing bugs!).
shell.unregisterFileTypeshell.unregisterFileType(ext: string, progId: string)boolMutating (RSW701)Removes .ext and ProgID registration keys.
shell.registerProtocolshell.registerProtocol(scheme: string, description: string, targetExe: path)boolMutating (RSW701)Registers a custom scheme:// URL protocol (URL Protocol = "", shell\open\command).
shell.refreshshell.refresh()boolSafe NotifyBroadcasts SHChangeNotify(SHCNE_ASSOCCHANGED, SHCNF_IDLIST) so Explorer icons update immediately.

env.* & arp.* — Non-Clobbering PATH & Windows Installed Apps (7 Methods)

MethodSignatureReturnMutating?Description
env.getenv.get(name: string, scope?: string)stringRead-OnlyReads process, "user", or "machine" environment variable.
env.setenv.set(name: string, value: string, scope?: string)boolMutating (RSW701)Writes "user" or "machine" environment variable and broadcasts WM_SETTINGCHANGE("Environment") with timeout (SendMessageTimeoutW).
env.removeenv.remove(name: string, scope?: string)boolMutating (RSW701)Deletes environment variable (restored on rollback).
env.appendPathenv.appendPath(dirToAdd: path, scope?: string)boolMutating (RSW701)Reads raw REG_EXPAND_SZ Path, checks case-insensitively if dirToAdd is already present, appends only the new segment (preserving %SystemRoot%!), and records surgical single-entry removal for uninstall/rollback!
arp.registerarp.register(options?: map)boolMutating (RSW701)Writes CurrentVersion\Uninstall\<id>, generates <installDir>\Uninstall.exe + Uninstall.rswm, and computes EstimatedSize KB.
arp.setSystemComponentarp.setSystemComponent(productId: string, hidden: bool, scope?: string)boolMutating (RSW701)Sets SystemComponent = 1 (adopted by a Suite) or 0 (standalone visible in Installed apps).
arp.unregisterarp.unregister(productId: string, scope?: string)boolMutating (RSW701)Removes the CurrentVersion\Uninstall\<productId> entry.

svc.*, task.*, firewall.* & acl.* — Services, Tasks, Firewall & NTFS ACLs (13 Methods)

MethodSignatureReturnMutating?Description
svc.existssvc.exists(serviceName: string)boolRead-OnlyChecks SCM (OpenServiceW) for serviceName.
svc.statussvc.status(serviceName: string)stringRead-OnlyReturns "running", "stopped", "paused", or "missing".
svc.installsvc.install(serviceName: string, binPath: path, displayName?: string, startType?: string, description?: string)boolMutating (RSW701)Creates or updates a Win32 Service (CreateServiceW, rolled back automatically on install failure).
svc.configureFailureResetsvc.configureFailureReset(serviceName: string, restartDelayMs?: int, resetPeriodSec?: int)boolMutating (RSW701)Configures SERVICE_CONFIG_FAILURE_ACTIONS automatic recovery restart.
svc.startsvc.start(serviceName: string)boolMutating (RSW701)Starts serviceName and waits for SERVICE_RUNNING.
svc.stopsvc.stop(serviceName: string)boolMutating (RSW701)Sends SERVICE_CONTROL_STOP and waits cleanly.
svc.removesvc.remove(serviceName: string)boolMutating (RSW701)Stops and deletes serviceName (DeleteService).
task.existstask.exists(taskName: string)boolRead-OnlyChecks Windows Task Scheduler for taskName.
task.createWeeklytask.createWeekly(taskName: string, exePath: path, args?: string, dayOfWeek?: string, startTime?: string)boolMutating (RSW701)Registers an opt-in weekly Scheduled Task (rollback-tracked).
task.removetask.remove(taskName: string)boolMutating (RSW701)Deletes Scheduled Task taskName.
firewall.allowProgramfirewall.allowProgram(ruleName: string, exePath: path, direction?: string)boolMutating (RSW701)Adds a Windows Defender Firewall program rule via COM INetFwPolicy2 (removed automatically on rollback/uninstall).
firewall.removeRulefirewall.removeRule(ruleName: string)boolMutating (RSW701)Removes Defender Firewall rule ruleName.
acl.grantModifyacl.grantModify(targetDir: path, trusteeSidOrWellKnown?: string)boolMutating (RSW701)Grants NTFS FILE_GENERIC_MODIFY (`OICI) via SetNamedSecurityInfoW (defaults to "Users" / S-1-5-32-545`).

com.*, font.*, sign.*, cert.*, mutex.* & activesetup.* — v1.3 Windows Packaging Power Tools (16 Methods)

MethodSignatureReturnMutating?Description
com.inspectTypeLibcom.inspectTypeLib(dllOrOcx: path)mapWizard-SafeReads COM ITypeLib metadata via REGKIND_NONE ({ found, libId, version, libraryName, coclasses }) without touching the Registry.
com.generateRegFreeManifestcom.generateRegFreeManifest(exePath: path, comFiles: array, outManifest: path)boolMutating (RSW701)Generates a Side-by-Side .exe.manifest (<file>, <typelib>, <comClass>) for zero-Registry ActiveX/VB6 isolation (rollback-tracked).
com.registerInproccom.registerInproc(dllOrOcx: path)boolMutating (RSW701)Invokes DllRegisterServer on an in-process COM server when global registration is explicitly required.
com.unregisterInproccom.unregisterInproc(dllOrOcx: path)boolMutating (RSW701)Invokes DllUnregisterServer on an in-process COM server.
font.isInstalledfont.isInstalled(fontFileName: path, scope?: string)boolWizard-SafeChecks %LOCALAPPDATA%\Microsoft\Windows\Fonts ("user") or C:\Windows\Fonts ("machine").
font.installfont.install(fontFile: path, scope?: string, displayName?: string)pathMutating (RSW701)Copies .ttf/.otf, registers CurrentVersion\Fonts, calls AddFontResourceExW, and broadcasts WM_FONTCHANGE with zero reboot!
font.uninstallfont.uninstall(fontFileName: path, scope?: string, displayName?: string)boolMutating (RSW701)Calls RemoveFontResourceExW, deletes font entry, and broadcasts WM_FONTCHANGE.
sign.inspectsign.inspect(peFile: path)mapWizard-SafeExtracts X.509 / PKCS#7 Authenticode details via crypt32.dll ({ signed, trusted, subject, issuer, thumbprintSha1 }).
cert.isInstalledcert.isInstalled(thumbprintSha1: string, store?: string, scope?: string)boolWizard-SafeChecks CertStore.TrustedPublisher / CertStore.Root for a matching SHA-1 certificate thumbprint.
cert.importTrustedPublishercert.importTrustedPublisher(cerFile: path, scope?: string)boolMutating (RSW701)Imports a DER or Base64 PEM .cer certificate into TrustedPublisher.
cert.removecert.remove(thumbprintSha1: string, store?: string, scope?: string)boolMutating (RSW701)Deletes a certificate by SHA-1 thumbprint from the target Windows certificate store.
mutex.isHeldmutex.isHeld(mutexName: string)boolWizard-SafeProbes OpenMutexW(SYNCHRONIZE) for "Global\\..." or "Local\\..." single-instance application locks.
mutex.waitReleasemutex.waitRelease(mutexName: string, timeoutMs?: int)boolWizard-SafeWaits up to timeoutMs (default 5000) for a running application mutex to close cleanly.
activesetup.isRegisteredactivesetup.isRegistered(componentId: string)boolWizard-SafeChecks Active Setup\Installed Components\<componentId>.
activesetup.registeractivesetup.register(id: string, stubPath: string, version?: string, title?: string)boolMutating (RSW701)Registers per-machine Active Setup StubPath so every Windows user profile hydrates per-user settings on next sign-in!
activesetup.unregisteractivesetup.unregister(componentId: string)boolMutating (RSW701)Removes Active Setup Installed Components registration.
Indexed API Calls & Symbols on This Page (23):