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.ex e /passive.
It will not install unless the machine is logged in as administrator. Can I get around this?
So far I have
xcopy /y fileformatconverters.exe "c:\:"
start c:\fileformatconverters.ex
It will not install unless the machine is logged in as administrator. Can I get around this?
what OS is this machine running?
ASKER
OK I'll try the Psexec. Thanks.
ASKER
The OS is windows XP pro
you can include the "runas" command in the bat file
"runas /user:domain\username"
"runas /user:domain\username"
ASKER
so do "runas /user:domain\username" where is the password
Then run Start c:\...
Then run Start c:\...
sorry
"runas /user:domain\username password"
"runas /user:domain\username password"
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
ok one more question:
runas /user:wellington\administr ator password?
runas /user:wellington\administr
yes, replace "password" with the administrator password
ASKER
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!
glad it worked out!
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