feature/IO-3205-Paint-Scale-Integrations: Pre Protocol Handler Keep ALive.
This commit is contained in:
@@ -7,8 +7,8 @@ const execPromise = promisify(exec);
|
||||
export async function setupKeepAliveTask(): Promise<void> {
|
||||
const taskName = "ImEXShopPartnerKeepAlive";
|
||||
const protocolUrl = "imexmedia://keep-alive";
|
||||
// Use PowerShell with -ExecutionPolicy Bypass to open the URL
|
||||
const command = `powershell.exe -ExecutionPolicy Bypass -Command "Start-Process '${protocolUrl}'"`;
|
||||
// Use rundll32.exe to silently open the URL as a protocol
|
||||
const command = `rundll32.exe url.dll,OpenURL "${protocolUrl}"`;
|
||||
// Escape quotes for schtasks /tr parameter
|
||||
const escapedCommand = command.replace(/"/g, '\\"');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user