Ticket ID: 24251
|
Creation Date: 5/16/2018 4:28 PM
|
Product: SiteKiosk Classic Windows
|
Attachment: -
|
TicketType: Support Request
|
Version: 9.6.4409
|
Language: English
|
Views: 23197
|
Last Modification Date: -
|
Platform:
|
|
Level: Closed
|
Modified By: -
|
|
|
Support Request: Run Powershell Script Through Object Model
Hey,
i am trying to run a powershell script. The script works, however i am struggling to execute the powershell.exe through the sitekiosk object model.
I followd the instructions here:
http://www.provisio.com/helpconsole/SiteKiosk%20Object%20Model%20Help/en-US/default.htm?externalapps_run_mth.htm
This results in the followig function:
function setupAutologon() {
window.external.InitScriptInterface();
SiteKiosk.ExternalApps.RunElevated("c:\\windows\\system32\\windowspowershell\\v1.0\\powershell.exe -file 'C:\\Program Files (x86)\\SiteKiosk\\HtmlRegistryAutoAdminLogon.ps1'", false);
SiteKiosk.Logfile.Notification("Setup Registry for AutoAdminLogon");
}
I am calling the function with the AddDelayedEvent() function, in the logfile i get the following error though:
40 03f5 2018-05-16 16:12:59 +0200 [SiteKiosk] Laufzeitfehler in Microsoft JScript: "'window' ist undefiniert" at line 60, char 4
Which is german and basically tells me there is a "runtime error" in my script, at the line " window.external.InitScriptInterface();"
What am i doing wrong?
Kind Regards,
Finn.