Jump to content
Sign in to follow this  
bestsmr

run as administrator

Recommended Posts

bestsmr

Hello

I tried this code to run an application as administrator , but it failed .

can someone correct my code ????????.

************

RunAs ( "administrator", @ComputerName , "password", 0, "C:\windows\notepad.exe" )

************

Share this post


Link to post
Share on other sites
Ramzes

Are you sure your password to Administrator is "password"?


Sorry for my bad English but nobody is perfect. [font=arial, helvetica, sans-serif]Ramzes[/font]

Share this post


Link to post
Share on other sites
jazzyjeff

What OS are you using?

Share this post


Link to post
Share on other sites
bestsmr

Ramzes : the pasword is "123456" and I write it in position "Password"

jazzyjeff : my Operating System is "microsoft windows 7"

I am waiting for help..............

Share this post


Link to post
Share on other sites
bestsmr

why ther is no one help me ???????????????

I am waiting.................................

.....................................

.................................... :graduated:;):);)

Share this post


Link to post
Share on other sites
MrVietA2

Run("Notepad") , why you don't select it :graduated: ?

You can R.Click -> Run as administrator or add "#RequireAdmin" to your script . I hope it work ;)

Share this post


Link to post
Share on other sites
bestsmr

thanks MrVietA2

really it is what I was searching for :graduated:;):)

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  

×