Jump to content
Sign in to follow this  
JackDinn

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

Recommended Posts

JackDinn

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

Share this post


Link to post
Share on other sites
allSystemsGo

Have you tried _RunDOS()?

Share this post


Link to post
Share on other sites
FireFox

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

 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites
JackDinn

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

Share this post


Link to post
Share on other sites
allSystemsGo

Nop sorry but no dice _RunDos() does the same thing i.e. error "class not registered"

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

Share this post


Link to post
Share on other sites
FireFox

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

 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites
allSystemsGo

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

Edit :

No, look at the image in the first post.

_RunDOS never tells me anything :(

Share this post


Link to post
Share on other sites
allSystemsGo

thats what my friend siad , yep same error box showing

The "Class not registered" makes me think of an ActiveX control like a ,OCX file...but what do I know,,

Share this post


Link to post
Share on other sites
FireFox

_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.


 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
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
Sign in to follow this  

×