home hardware prices news articles forums photos user reviews
Go Back   Tech Support Forums - TechIMO.com > PC Hardware and Tech > Technical Support
Ask a Tech Support Question (free)!

Running .exe's with Run As in a .bat file

Reply
Get bargains at  »  Dealighted.com
 
Thread Tools Search this Thread
Currently Active Users: 2192
Discussions: 200,919, Posts: 2,379,033, Members: 246,286
Old December 3rd, 2003, 09:53 AM   Digg it!   #1 (permalink)
Junior Member
 
Join Date: Dec 2003
Posts: 2
Running .exe's with Run As in a .bat file

Ok chaps & chapesses,

I need some help with running .exe's in a normal .bat file.

We've recently got rid of all client Local Admin permissions on our Windows 2000 clients. However, I need to rollout a executable in the login scripts to install a new application. This used to be no problem as all domain users were menbers of the local admin group. This is no longer the case. So I need to know if any of you know the syntax for executing a .exe using an administrator userid and password.

My normal login script runs a .bat file which looks something like this:

start/wait \\server001\folder\setup.exe -s -f1\\server001\folder\answerfile.iss

How do I tell it to run this setup.exe under an admin userid?

Thanks
Sledgehammer is offline   Reply With Quote
Old December 3rd, 2003, 03:43 PM     #2 (permalink)
Ultimate Member
 
meese's Avatar
 
Join Date: Jun 2003
Location: NJ
Posts: 2,467
Check out this thread: Using the "AT" command to run a batch file
meese is offline   Reply With Quote
Old December 4th, 2003, 09:01 AM     #3 (permalink)
Junior Member
 
Join Date: Dec 2003
Posts: 2
Thanks meese. The Runas command prompts for a password, which is a problem as non of us wants to give out admin passwords to our users. But I found a way around that problem:

runas /user:domain\username \\server\folder\setup.exe | sanur password

The sanur command allows you to script in the password for the admin userid used in the runas command - pretty cool. Download the sanur.exe and place it in the same folder as the script. Check out http://www.commandline.co.uk/sanur for more details.

Sledge
Sledgehammer is offline   Reply With Quote
Old December 4th, 2003, 09:13 AM     #4 (permalink)
Retired mostly.
 
Join Date: Oct 2001
Location: Finland
Posts: 5,144
If you find out, do tell me too.
Because normal case is that when you access a network drive, you do so by a domain user name, and if you try to run it with runas local administrator, you can't, because local accounts do not have rights to network files.

Like this:
domus, has rights to share, but not to computer
locadm, has no rights to share, but full to computer

Makes it pretty hard to runas local admin a network file doesn't it
muno is offline   Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Most Active Discussions
Is It Just Me? (2842)
Why is Khalid Sheikh Mohammed even .. (9)
Obama the Muslim (9)
Is the PSU I received dead? (10)
windows vista security holes (7)
Install XP pro and a Vista laptop ?.. (9)
HIS HD5770 graphic card question (15)
Foreign voltage (8)
A good PSU? (10)
Dept. of HS: NSA 'Helped' Develop V.. (15)
Print spooler problem (10)
New Computer wont recognize XP disc (7)
Ideal cheap graph card for PC-Gamin.. (15)
EVGA 9800 gtx help with finding a g.. (8)
Recent Discussions
Browsers wont load websites (2)
Virus Doctor Popup? (1)
Help getting around port 80 for camer.. (1)
[F@H SPAM 11/16/09] ! 1/2 months to r.. (31)
Foreign voltage (8)
Dept. of HS: NSA 'Helped' Develop Vis.. (15)
windows vista security holes (7)
Install XP pro and a Vista laptop ?? (9)
EVGA 9800 gtx help with finding a goo.. (8)
Modern Warfare For the PC (32)
Problem with speed step/turbo boost? (1)
monitor will not turn on at all, (0)
Modern Warfare 2: Who Bought It? (61)
World's largest Monopoly Game using G.. (330)
Print spooler problem (10)
SIS 740 and Widescreen (8)
Baffling Problem with my CPU/MoBo's. .. (0)
Display shows 3x5 inch in middle of s.. (0)
HIS HD5770 graphic card question (15)
Best file format to play on Windows H.. (0)
PSP Go bought in Japan (0)
Asus P4G8X Mobo (3)
Need hard disk drivers (4)
windows 7 internet problem (4)
What OS for a home server? (other tha.. (1)


All times are GMT -4. The time now is 04:49 PM.
TechIMO Copyright 2009 All Enthusiast, Inc.



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28