VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

RunAsUser

BradleyS  (3 Submissions)   Windows API Call/Explanation   VB 6.0   Advanced   Tue 24th May 2016   Tue 9th February 2021

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 (2(2 Vote))

Download RunAsUser

RunAsUser Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters