Support Request: Running app as admin via SiteKiosk Object Model

Description

I'm running an app via a script attached to SiteKiosk, here is the line:
"SiteKiosk.ExternalApps.RunElevated("C:\\Users\\SiteKiosk\\Desktop\\th_hardware\\delivery\\th-hardware-webapi\\th-hardware-webapi.exe");"

Which should run with elevated privilege, however it's not. It's running but i get insufficient rights, same result as using the Run method.

Am i missing something ? Because when runnning via SiteKiosk config (after disabling UAC and running it as another user) its running fine.

Answer: (5)

Re: Running app as admin via SiteKiosk Object Model 6/7/2018 12:16 PM
Hello,

The “RunElevated Method” is not for running the application as another user (there is no object model command for this) but just to run the application elevated (as if right clicking on the application and choosing “Run as administrator” on Windows).

But you can use “SiteKiosk.ExternalApps.Item(index).Run(bool)” to run the application you configured in the SiteKiosk configuration to run with another user (only possible when deactivating Windows UAC).
https://www.provisio.com/helpconsole/SiteKiosk%20Object%20Model%20Help/en-US/default.htm?externalappinfo_run_mth.htm


General note:
Please understand that our free support cannot offer any assistance with creating your own code or customizing the skin files (apart from the detailed SiteKiosk and SiteKiosk Object Model documentation).
http://www.provisio.com/helpconsole/SiteKiosk%20Help/en-US/default.htm?support.htm

Documentation:
- General Information about customizing SiteKiosk: http://www.provisio.com/web/us/features/siteskin
- SiteKiosk help: http://www.provisio.com/helpconsole/SiteKiosk%20Help/en-US/default.htm?customization_%28site_skin%29.htm
- SiteKiosk Object model help for IE based skins: http://www.provisio.com/helpconsole/SiteKiosk%20Object%20Model%20Help/en-US/default.htm?index.htm
- The SiteKiosk Object model help for Chrome Browser Skin can be requested via e-mail at support-europe(at)provisio.com

Further hints and suggestions can be found in our developer blog at http://devblog.provisio.com/

If you need further assistance in creating individual coding solutions you can contact us via e-mail that we may find a solution against payment for your needs.

In case you are interested in a solution against payment please write a detailed description to support-europe(at)provisio.com that we can check the technical feasibility and the amount of work to make a quotation.
The adjustment fees are depending on the complexity of the changes and in general it costs 120 Euro per hour.

Regards,
Michael Olbrich
Re: Running app as admin via SiteKiosk Object Model 6/7/2018 2:04 PM
Thanks for the quick reply.

I've got another problem, I want to loop throught the apps configured in SiteKiosk to check if they are running, but "SiteKiosk.External.Apps.Count" print 0 (i've got 3 external apps registered in the SiteKiosk).


Here is the code sample i'm using...

function CheckSiteKioskApps(){
	SiteKiosk.Logfile.Notification('Checking apps from sitekiosk...' + SiteKiosk.ExternalApps.Count);
	for (var i = 1; i <= SiteKiosk.ExternalApps.Count; ++i){
		SiteKiosk.Logfile.Notification(i + ' : ' + SiteKiosk.ExternalApps.Item(i).DisplayText + ' running : ' + SiteKiosk.ExternalApps.Item(i).Running);
	}
}
Re: Running app as admin via SiteKiosk Object Model 6/7/2018 2:47 PM
Hello,

Did you start the applications (EXE)?
The command “SiteKiosk.ExternalApps.Item(i).Running” just displays if the corresponding application is currently running.

When I e.g. add Notepad as fist application and WordPad as second application to the SiteKiosk configuration this SiteKiosk log output is displayed when both are started:
[SiteKiosk] Notification: 1 : running : true
[SiteKiosk] Notification: 2 : running : true

This when they are not started (I have used your code).
[SiteKiosk] Notification: 1 : running : false
[SiteKiosk] Notification: 2 : running : false

For further details please check the help:
https://www.provisio.com/helpconsole/SiteKiosk%20Object%20Model%20Help/en-US/default.htm?index.htm

If you use that code in a web page also make sure that you use an IE based skin (e.g. Metro IE), added “window.external.InitScriptInterface();” to your code and that you added the URL to the URLs with Script permission (or store the html file at “…\SiteKiosk\Html”).

Otherwise the item numbers of the applications are just in the order the applications are added to the SiteKiosk configuration.
The first one on top is item 1, the second one below is item 2…

Regards,
Michael Olbrich
Re: Running app as admin via SiteKiosk Object Model 6/7/2018 2:59 PM
Yes, the EXEs are running fine in SiteKiosk. The code is not in a web page, I've added it into the SiteKiosk config and it's running (other function are working fine, like keeping windows in the background etc...).
The problem is that "SiteKiosk.Logfile.Notification(SiteKiosk.ExternalApps.Count);" print 0 instead of 3, as if the apps i've added in the sitekiosk config where not accesible via code. (SiteKiosk run the apps at startup as i've specified it in the config)
Re: Running app as admin via SiteKiosk Object Model 6/7/2018 3:29 PM
Hello,

I am sorry but also that is not reproducible.
But in my test the EXE are running in the same user account.


When using the following code as external script and adding 2 applications to the configuration (Notepad and WordPad, UAC activated and running in the same user account)

SiteKiosk.Scheduler.AddPeriodicEvent(5000, CheckSiteKioskApps);
function CheckSiteKioskApps(){
	SiteKiosk.Logfile.Notification('Checking apps from sitekiosk...' + SiteKiosk.ExternalApps.Count);
	for (var i = 1; i <= SiteKiosk.ExternalApps.Count; ++i){
		SiteKiosk.Logfile.Notification(i + ' : ' + SiteKiosk.ExternalApps.Item(i).DisplayText + ' running : ' + SiteKiosk.ExternalApps.Item(i).Running);
	}
}

The log displays:

20 0000 2018-06-07 15:07:54 +0200 [SiteKiosk] Notification: Checking apps from sitekiosk...2
20 0000 2018-06-07 15:07:54 +0200 [SiteKiosk] Notification: 1 :  running : false
20 0000 2018-06-07 15:07:54 +0200 [SiteKiosk] Notification: 2 :  running : false


Regards,
Michael Olbrich
My Account
Login
Language (Tickets):