Solved

run logon script elevated privileges

Posted on 2011-09-08
2
744 Views
Last Modified: 2012-05-12
i'm looking for an easy way to run our log in script with elevated privileges, our users are set to low local privileges im running an ipconfig /registerdns in the login script and this is failing.  
0
Comment
Question by:pridemarketing
2 Comments
 

Accepted Solution

by:
ryanjones earned 125 total points
ID: 36506891
Try using runas.

runas /user:domain\username cmd.exe
runas /user:domain\username "C:\path_to_Script"

Problem is it will prompt for a password everytime unless you use the /savecred switch then it will ask just the once.

There is a VBscript that automates it with a password here.

http://gallery.technet.microsoft.com/scriptcenter/9bda53d7-ec2e-4bc2-8e97-4487233bc55b

0
 
LVL 14

Expert Comment

by:Don Thomson
ID: 36509998
You could alway create domain user that has Admin privs with no password  but doesn't have access to any of the server shares. That would allow you to run the scripts above that ryanjones suggested

0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Using dates in 'DOS' batch files has always been tricky as it has no built in ways of extracting date information.  There are many tricks using string manipulation to pull out parts of the %date% variable or output of the date /t command but these r…
TOMORROW TOMORROW.BAT is inspired by a question I get asked over and over again; that is, "How can I use batch file commands to obtain tomorrow's date?" The crux of this batch file revolves around the XCOPY command - a technique I discovered w…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question