»
 

Go Back   ResellerRatings Store Ratings > ResellerRatings Forums > Tech Support

Reply
 
LinkBack Thread Tools Display Modes
Old 12-03-2003, 06:53 AM   #1 (permalink)
Registered User
 
Join Date: Dec 2003
Posts: 2
Sledgehammer is on a distinguished road
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 12-03-2003, 12:43 PM   #2 (permalink)
Registered User
 
meese's Avatar
 
Join Date: Jun 2003
Location: NJ
Posts: 1,096
meese is on a distinguished road
Check out this thread: http://www.techimo.com/forum/showthr...ighlight=runas
meese is offline   Reply With Quote
Old 12-04-2003, 06:01 AM   #3 (permalink)
Registered User
 
Join Date: Dec 2003
Posts: 2
Sledgehammer is on a distinguished road
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 12-04-2003, 06:13 AM   #4 (permalink)
Registered User
 
muno's Avatar
 
Join Date: Oct 2001
Location: Finland
Posts: 3,838
muno is on a distinguished road
Send a message via Yahoo to muno
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




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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 On


Most Active Discussions

Recent Discussions

All times are GMT -6. The time now is 10:12 AM.