VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



RunAsUser

by BradleyS (3 Submissions)
Category: Windows API Call/Explanation
Compatability: VB 6.0
Difficulty: Advanced
Originally Published: Tue 24th May 2016
Date Added: Tue 9th February 2021
Rating: (1 Votes)

Whatdoesthisdo?RunAsUser/RunAsActiveUserisautilityIconceivedtorunprogramsorcommandsunderauseraccountloggedintoacomputer,withoutneedingtoknowtheirpassword.Whatdoesthatmean?Example:AssumeI'mloggedintoacomputerbuthavesincelockedmycomputer.Youlogintomycomputerwithyouraccount(whichmusthaveAdministratorpermissions),andopenanelevatedcommandpromptandtypeRunAsUser.exe"calc.exe"-u"bradley"--Thisassumesthatmyaccountnameis"bradley".Iftheaccountisfoundloggedintothemachine,calc.exewillopenuponthedesktopforthatuser.Iftheaccountisn'trunning,nothingwillhappen.Ifyouwouldliketowaitforaspecificaccount,youcanusethe-wswitch:RunAsUser.exe"calc.exe"-w-u"bradley"--thiswillcausetheprogramtorunsilently,checkingeveryfewsecondsuntiltheuser"bradley"isfound.Ifyouomit-u"bradley"itwillruninthebackgroundandwaitforanyactivesessiontobestartedonthecomputer.Or,youcouldgofurtherandrunyourdesiredprogramforeveryaccountthatlogsintothecomputeruntilithasbeenrestarted(ortheRunAsUserprocessisterminated):-pYoucanrunmuchmorethanjustacalculator.Youcanopenwebpages,orrunotherprogramslocaltothemachine,fromawebURL,orfromanetworkshare.Therearemanyotheruses.YoucancouplethiswitharemoteexecutionprogramlikePsExec.MoredetailsincludedintheReadme.htmlfilewithin.

Rate RunAsUser

Download RunAsUser

Download RunAsUser (36 KB)

RunAsUser Comments

No comments have been posted about RunAsUser. Why not be the first to post a comment about RunAsUser.

Post your comment

Subject:
Message:
0/1000 characters