You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
that should print either IsAdmin: False or IsAdmin: False depending on whether you are in a elevated position.
The following (dart code):
// Running in normal modeawait shell.run('powershell -c .\\test_admin.ps1');
should print IsAdmin: False
while the following ugly method (sorry I guess it can be simpler but I don't know powershell enough)
// Running as admin// dir should point to the full absolute pathawait shell.run(
'powershell -c ${shellArgument("Start-Process PowerShell -Verb RunAs ${shellArgument('-Command ${absolute(join(dir, 'test_admin.ps1'))}')}")}');
should ask for admin rights, spawn a new shell and print IsAdmin: True
Note that the full path is required for the script here.
I tried like this ..
The text was updated successfully, but these errors were encountered: