Sign in to follow this  
Followers 0
hiteshluthra

Help needed with function send

9 posts in this topic

Help needed with function send, basically i want to send ("#r") with admin rights,means to open run dialog box with admin previleges.

RunAs($adminuser, $admindomain, $adminpass, 4, @SystemDir)

Send("#r")

But this code is not working with admin rights. Can u all genius help in this.

Share this post


Link to post
Share on other sites



Thanks for the reply but i need that (run dialog box) to complete my script.

help is appreciated

Share this post


Link to post
Share on other sites

I need it because some commands does not work in cmd but works in Run dialog box, its just to provide ease to the user through script.

And also curious to know wheather Function Send () can be used with admin right or not.And if yes then how.

Help is appreciated.

Share this post


Link to post
Share on other sites

I need it because some commands does not work in cmd but works in Run dialog box, its just to provide ease to the user through script.

Run uses shell execute while cmd uses run. To use shell execute from cmd, then type:

start commandhere

And also curious to know wheather Function Send () can be used with admin right or not.And if yes then how.

It can't. And Google doesn't show any means at all of opening a run box with admin privileges through user interaction.

Share this post


Link to post
Share on other sites

Thanks a lot for letting me know

Share this post


Link to post
Share on other sites

This is my answer to my own question

RunAs($adminuser, $admindomain, $adminpass, 4, 'c:\WINDOWS\system32\rundll32.exe shell32.dll,#61', @SystemDir)

it is possible to open standard Run dialog window from command line

c:\WINDOWS\system32\rundll32.exe shell32.dll`,#61

Thanks anyway for the help

Share this post


Link to post
Share on other sites

This is my answer to my own question

RunAs($adminuser, $admindomain, $adminpass, 4, 'c:\WINDOWS\system32\rundll32.exe shell32.dll,#61', @SystemDir)

Thanks anyway for the help

Very nice! Wonder why I couldn't find this on Google ... :mellow:

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  
Followers 0