Solved

bat to install an exe file

Posted on 2011-03-04
12
651 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
  • 6
  • 5
12 Comments
 
LVL 11

Expert Comment

by:M3rc74
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
 

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
Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

 
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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

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…
Issue: Unstable cursor in Windows XP and Windows runs extremely slow in that any click will bring up the Hour glass (sometimes for several seconds before giving you what you want) . Troubleshooting Process and the FINAL FIX: This issue see…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

707 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now