Sign in to follow this  
Followers 0
hiteshluthra

Help needed in opening control panel

5 posts in this topic

Help needed in opening control panel or ncpa.cpl with admin rights.

$RUNDLL32 = @SystemDir & "\rundll32.exe"

$cpl = 'ncpa.cpl'

$var=Run($RUNDLL32 & " shell32.dll,Control_RunDLL " & $cpl)

_RunAsAdmin($var)

OR

RunAs($adminuser, $admindomain, $adminpass, 0, @Comspec & ' /c ncpa.cpl ', @SystemDir)

None of them is working. can u all genius help me

Share this post


Link to post
Share on other sites



Use control or control.exe, ie., Run("control ncpa.cpl")


- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Share this post


Link to post
Share on other sites

The list here might be useful.


Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

Thanks snowmaker but your code is opening network connections but not with admin rights

i.e Run("control ncpa.cpl").............not working

Thanks martin the post u told did'nt help me

Can u all try anything else

Share this post


Link to post
Share on other sites

Actually I was just just trying to say 'use control or control.exe in front of the control panel applet'. Usually my fingers don't type what I'm trying to say. This is one of those cases..


- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

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