How to RunProgram() as admin ?

Just starting out? Need help? Post your questions and find answers here.
User avatar
Bisonte
Addict
Addict
Posts: 1305
Joined: Tue Oct 09, 2007 2:15 am

Re: How to RunProgram() as admin ?

Post by Bisonte »

Psychophanta wrote:May be Norris is too old to Rock'n'Roll :|
Ouch.... Famous last words ... says Chuck and throw his teeth :mrgreen:
PureBasic 6.21 (Windows x64) | Windows 11 Pro | AsRock B850 Steel Legend Wifi | R7 9800x3D | 64GB RAM | RTX 5080 | ThermaltakeView 270 TG ARGB | build by vannicom​​
English is not my native language... (I often use DeepL.)
User avatar
ar-s
Enthusiast
Enthusiast
Posts: 344
Joined: Sat Oct 06, 2007 11:20 pm
Location: France

Re: How to RunProgram() as admin ?

Post by ar-s »

The code is working great.
i try with the "cmd" console; we can see that it was lauch by admin;

Thks TS-SOFT
~Ar-S~
My Image Hoster for PB users
My webSite (french) with PB apps : LDVMULTIMEDIA
PB - 3.x / 5.7x / 6 - W11 x64 - Ryzen 7 3700x / #Rpi4

Code: Select all

r3p347 : 7ry : un71l d0n3 = 1
tj1010
Enthusiast
Enthusiast
Posts: 716
Joined: Mon Feb 25, 2013 5:51 pm

Re: How to RunProgram() as admin ?

Post by tj1010 »

It helps if you pass credentials. This should work still all the way up to the latest "inner ring" beta of 10 since it's just the RunAs way of doing it.

Something else you'll be interested in at some point is checking your own PID privilege against ACL lists for file and folders or other processes so you can r/w safely on the file system, dll inject, r/w remote PID memory, drag and drop, and set up friendly pipes or alternate streams.

There is also a know 'hack' with Windows services that allows you to bypass UAC with new process launching from a guest process token.
Post Reply