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: 1705
Discussions: 200,509, Posts: 2,374,410, Members: 245,832
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? (1635)
FT HOOD attack: 7 killed 12 injured (67)
Review My Build (6)
HELP!!! What do you think of this s.. (16)
Looking for a graphic card that wil.. (30)
Assosiations (21496)
My 1st pc build (40)
PC Modern Warfare 2: it's much wors.. (12)
Aero in Vista (7)
core i7 extreme 975, nvidia 9400gt (9)
How to Ship a PC (16)
Building my first computer (13)
[F@H SPAM 11/1/09]New month . . . n.. (33)
slaving laptop drive (7)
Recent Discussions
windows 7 retail and rtm (3)
boot from CD-ROM in chipset via P4M80.. (1)
Windows Experience Index is screwed u.. (3)
Review My Build (6)
FAT32 to NTFS file system in Win2kpro (4)
Internet very slow since updating AVG.. (8)
Motherboards and my curse... (25)
HELP!!! What do you think of this sys.. (16)
New Processor, Monitor will not turn .. (2)
2009 Build (4)
My 1st pc build (40)
Freezing During Music/Movies (1)
ext. sound card laptop to stereo syst.. (2)
Remote Desktop via SSH and error mess.. (2)
Help and Support disappeared from my .. (0)
[F@H SPAM 11/1/09]New month . . . new.. (33)
Basic applications needed for "r.. (1)
core i7 extreme 975, nvidia 9400gt (9)
hard drive problem (2)
Win7 TrustedInstaller Permissions (2)
Speed up Win 7 boot time a bit (1)
Hard Drive test program (2)
wireless westell versalink model 327w (1)
New build 10 second reboot cycle! Won.. (3)
New Linksys Routers (2)


All times are GMT -4. The time now is 08:07 AM.
TechIMO Copyright 2008 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