?
Solved

bat to install an exe file

Posted on 2011-03-04
12
Medium Priority
?
659 Views
Last Modified: 2012-05-11
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?
0
Comment
Question by:WellingtonIS
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 5
12 Comments
 
LVL 11

Expert Comment

by:Kruno Džoić
ID: 35039578
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
0
 
LVL 3

Expert Comment

by:Frank_Alphaserveit
ID: 35039608
what OS is this machine running?
0
 

Author Comment

by:WellingtonIS
ID: 35039660
OK I'll try the Psexec.  Thanks.
0
Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

 

Author Comment

by:WellingtonIS
ID: 35039663
The OS is windows XP pro
0
 
LVL 3

Expert Comment

by:Frank_Alphaserveit
ID: 35039691
you can include the "runas" command in the bat file

"runas /user:domain\username"
0
 

Author Comment

by:WellingtonIS
ID: 35039720
so do "runas /user:domain\username"  where is the password
Then run Start c:\...
0
 
LVL 3

Expert Comment

by:Frank_Alphaserveit
ID: 35039736
sorry

"runas /user:domain\username password"
0
 
LVL 3

Accepted Solution

by:
Frank_Alphaserveit earned 2000 total points
ID: 35039744
in total it would be

"
runas /user:domain\username password
xcopy /y fileformatconverters.exe "c:\:"
start c:\fileformatconverters.exe /passive.
"
0
 

Author Comment

by:WellingtonIS
ID: 35039770
ok one more question:
runas /user:wellington\administrator password?
0
 
LVL 3

Expert Comment

by:Frank_Alphaserveit
ID: 35039817
yes, replace "password" with the administrator password
0
 

Author Closing Comment

by:WellingtonIS
ID: 35039839
I had to put a : between the administrator and the password but it worked. Thanks!  You saved me so much time.
0
 
LVL 3

Expert Comment

by:Frank_Alphaserveit
ID: 35039852
bah, i knew i forgot something:)

glad it worked out!
0

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Recently, I got a requirement to zip all files individually with batch file script in Windows OS. I don't know much about scripting, but I searched Google and found a lot of examples and websites to complete my task. Finally, I was ab…
This article provides a convenient collection of links to Microsoft provided Security Patches for operating systems that have reached their End of Life support cycle. Included operating systems covered by this article are Windows XP,  Windows Server…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question