Jump to content

Launch a URL from shellexecute in win8 (with elevated privileges)


Recommended Posts

I'v always been using ShellExecute("URL") to open a url in the default browser but today i found out that when win8 is in elevated privilege it dont work it just errors saying "Class not registered"

Posted Image

It works if a limited account

Been working fine in xp & 7 for years

I want it to open in the users default browser ,Any suggestions.

Thx all,Jack Dinn.

 

JD's Auto Internet Speed Tester

JD's Clip Catch (With Screen Shot Helper)

Projects :- AutoIt - My projects

My software never has bugs. It just develops random features. :-D

Link to comment
Share on other sites

If the _RunDOS does not work you can try in addition a trust level.

;possible trust levels, take the highest one.
runas /showtrustlevels

runas /trustlevel:<trustlevel> program

Edit :

;e.g:
runas /trustlevel:0x20000 "program.exe"

Br, FireFox.

Edited by FireFox
Link to comment
Share on other sites

ok thx all

@Firefox, your method wont run a url in the default browser , it needs a file to execute so you would have to use something like

runas /trustlevel:<trustlevel> Iexplorer.exe url

Turns out that it was only after the installer installs my app. The installer is elevated so it can write to programfiles then after the installation (or update) it runs the app again but now the app is elevated to because it was run by the installer !

Once the app has been closed and restarted it is then running in "normal" privileges

Is a little odd though cos this never caused a problem on win7 , no matter i can sort it i think :-/

Thx.

Thx all,Jack Dinn.

 

JD's Auto Internet Speed Tester

JD's Clip Catch (With Screen Shot Helper)

Projects :- AutoIt - My projects

My software never has bugs. It just develops random features. :-D

Link to comment
Share on other sites

Started less than 1 hour ago and already 1,706 views ? wtf.

Edit :

You get a visual error message? _RunDOS should be silent.

No, look at the image in the first post. Edited by FireFox
Link to comment
Share on other sites

_RunDOS never tells me anything :(

Indeed. The function is a RunWait, meaning that it waits for the process to terminate.

If you want to have the standard output, use run and StdOutRead/StdErrRead.

Br, FireFox.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...