Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: How to run Batch File as Admin?

01 Dec 2009   #11

Windows 7 Ultimate 64 bit
 
 

Quote   Quote: Originally Posted by AlexRD View Post
Quote   Quote: Originally Posted by Captain Zero View Post
Make a shortcut to the bat?
Tried that, but the Run as Admin still greyed.
Right click on the shortcut and select the 'shortcut' tab (not the compatibility tab), then click Advanced. Here you will find ANOTHER Run as Administrator option that is just for shortcuts. :-)

My System SpecsSystem Spec
.

01 Feb 2011   #12

Win 7 Ultimate 32bit
 
 

this works...thanks a lot
My System SpecsSystem Spec
08 Mar 2011   #13

Windows 7 32bit
 
 

I wrote a bat script example which prompts for admin access and then continues. I hope it helps some... jagaroth: admin access prompt for batch files
My System SpecsSystem Spec
.


26 Oct 2011   #14

Windows 7 Pro 64bit
 
 

Quote   Quote: Originally Posted by TimStitt View Post
Quote   Quote: Originally Posted by AlexRD View Post
Quote   Quote: Originally Posted by Captain Zero View Post
Make a shortcut to the bat?
Tried that, but the Run as Admin still greyed.
Right click on the shortcut and select the 'shortcut' tab (not the compatibility tab), then click Advanced. Here you will find ANOTHER Run as Administrator option that is just for shortcuts. :-)

this one worked. thanks a lot.
My System SpecsSystem Spec
27 Apr 2012   #15

Windows 7 Ultimate 64-bit
 
 

Quote   Quote: Originally Posted by AlexRD View Post
Hello,

I want to know how can i run a Batch File (.bat) as administrator since the Run as Administrator Checkbox in Compatibility tab is gray (can't check)?
This is the Batch File:
@echo off
cd /d "C:\Program Files (x86)\Ubisoft\Far Cry 2\bin"
start /realtime FarCry2.exe

Should i put something like Start as admin /realtime ???

Thanks,
Alex.
Make a shortcut to the .bat, right click, go to properties, in the "Shortcut" tap click on advanced, then you can check off "Run As Administrator". Your Welcome.
My System SpecsSystem Spec
10 May 2012   #16

Windows 7 Professional x64
 
 
Just what I had been looking for

After reading this thread I kept going because I didn't want to make a shortcut. I came across a solution that worked well for me and thought I would pass it on. You may put a bit of code at the top of the batch file and it will prompt UAC for admin elevation. The code and explanation of how it works can be found here.

I hope this helps someone as much as it helped me.
My System SpecsSystem Spec
Reply

 How to run Batch File as Admin?




Thread Tools




Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 05:43 PM.
Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33