Run as.... troubles. - Techist - Tech Forum

Go Back   Techist - Tech Forum > Computer Software > Microsoft Windows and Software
Click Here to Login
Closed Thread
 
Thread Tools Display Modes
 
Old 08-08-2005, 01:22 PM   #1 (permalink)
Junior Techie
 
Join Date: Dec 2004
Posts: 77
Default Run as.... troubles.

I would like to be able to do a "Run as" to configure any network connections on any given WinXP Pro machine, obviously no "Run as" option is given when you right click that icon in your control panel, I have tried several options like running "runas /user:administrator control.exe" from the command prompt logged on as a user with a restricted account but that does not seem to work, even if I right click on the ncpa found within the System32 folder and specify the admin username and password still I cant configure these options without having Admin rights, and yes the secondary logon is started. Any suggestions on how to configure network connections without logging on as an admin?? Thanks.
__________________

scj6771 is offline  
Old 08-08-2005, 01:25 PM   #2 (permalink)
Call me Mak or K
Mod Emeritus
 
KSoD's Avatar
 
Join Date: Sep 2004
Location: C:\
Posts: 35,647
Default

As far as i know cant do it. Must have Admin privledges to do all that.
__________________

__________________
I do not accept support questions via EMail, PM, IM or my G+ page!

Phone: LG Optimus G Pro
Running: Stock JB from LG with Nova Launcher

KSoD is offline  
Old 08-08-2005, 01:39 PM   #3 (permalink)
Master Techie
 
Join Date: Oct 2003
Posts: 2,258
Default

This is somethign that I can help you with...
I have been working on RUNas for a while now. There is a Tool called CPAU.exe which you can find on www.joeware.net. hes a MS developer that is creating very nice tools for sysadmins. Then you need to learn about Rundll32.exe.
Here is a link for you:
http://www.dx21.com/SCRIPTING/RUNDLL....ASP?ISF=0&P=A
Now, all you need to do is create a job file from CPAU like this...

cpau.exe -u Domain\Username -p Password -ex "RunDLL32.EXE shell32.dll,Control_RunDLL ncpa.cpl" -enc -file "Filename.job"

This will create a job file that will run the Network Properties dialog under the specified user account. To use is, simply type this:
cpau.exe -dec -file Filename.job /profile

if you leave off /profile, the program uses the logged on user credentials. so if you want it to use the admin account, always use /profile.

Hope that helps.
Edit:
well since I don't like to leave things undone, I checked this out. Seems that you need to do a little more than just a rundll call. Not sure why, but I think it's the Shell32.dll, you can't call this function in RUNAS. well that menas you have to load something to view it. Iexplore.exe works. If you run iexplore.exe and then type control panel on the address line, that will open the control panel as the account you are using. Then you can launch the Network properties from there as your self. Also, you can do this wil CMD.exe
Inaris is offline  
Old 08-09-2005, 12:43 PM   #4 (permalink)
Junior Techie
 
Join Date: Dec 2004
Posts: 77
Default

Sounds good but not sure what you mean by "Newtoorp"??
scj6771 is offline  
Old 08-09-2005, 03:54 PM   #5 (permalink)
Master Techie
 
Join Date: Oct 2003
Posts: 2,258
Default

Network... Post fixed... Hope it works for you...
Inaris is offline  
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off




Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -5. The time now is 02:20 AM.


Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.