Link to home
Start Free TrialLog in
Avatar of WellingtonIS
WellingtonIS

asked on

bat to install an exe file

I'm trying to install fileformatconverters.exe via a bat file.  I need to do this with administrator rights.

So far I have
xcopy /y fileformatconverters.exe "c:\:"
start c:\fileformatconverters.exe /passive.  

It will not install unless the machine is logged in as administrator.  Can I get around this?
Avatar of Kruno Džoić
Kruno Džoić
Flag of Croatia image

start bat file with RunAs tool

or

You can use psexec tools ( free ) and start bat remotely from another computer

fileformat.bat - example, add in environment path

psexec \\computerIP_address -u Administrator -p password fileformat.bat
Avatar of Frank_Alphaserveit
Frank_Alphaserveit

what OS is this machine running?
Avatar of WellingtonIS

ASKER

OK I'll try the Psexec.  Thanks.
The OS is windows XP pro
you can include the "runas" command in the bat file

"runas /user:domain\username"
so do "runas /user:domain\username"  where is the password
Then run Start c:\...
sorry

"runas /user:domain\username password"
ASKER CERTIFIED SOLUTION
Avatar of Frank_Alphaserveit
Frank_Alphaserveit

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ok one more question:
runas /user:wellington\administrator password?
yes, replace "password" with the administrator password
I had to put a : between the administrator and the password but it worked. Thanks!  You saved me so much time.
bah, i knew i forgot something:)

glad it worked out!