Solved

bat to install an exe file

Posted on 2011-03-04
12
657 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
Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

 

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 500 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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

Ok I have been working on this for some time having learned and gained certification in XenDesktop 4 along came version 5 which was released last month. Since then I have been working to deploy XenDesktop 5 in a small environment with only 2 virt…
YESTERDAY YESTERDAY.BAT is inspired by a previous article I wrote entitled: TOMORROW.BAT (http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/MS_DOS/A_4196-Advanced-Batch-File-Programming-TOMORROW-BAT.html). The crux of this batch f…
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…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

696 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