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 associate Edit for .BAT to open always with 'Run as Admin' rigt

18 Dec 2013   #1
Blacksmith

Windows 7 Ultimate x64
 
 
How to associate Edit for .BAT to open always with 'Run as Admin' rigt

I'm looking for a way to force 'Edit' in the Explorer context menu for .BAT files to always start my EdiPadPro.exe (just a programers editor) with 'Run as Admin' rights.

The best way I know up to now is creating a Shortcut and to add it to 'Send To'. This shortcut can be forced to start my editor with privileges.

I tried to make a file association to the shortcut, but windows is to clever and binds the .BAT extension directly to the .EXE. And I see no way to force a .EXE to execute only with 'Run as Admin' rights. This way I would be able to save the .BAT after having it edited.

I do understand, that I need to confirm during program start by means of the dialog box.


Any clever ideas?


My System SpecsSystem Spec
.
18 Dec 2013   #2
Brink

64-bit Windows 10 Pro
 
 

Hello Blacksmith,

If you like, you should be able to use OPTION FIVE in the tutorial below with the EdiPadPro.exe file to check the Run this program as an administrator box for this.

Run as Administrator

Hope this helps,
Shawn
My System SpecsSystem Spec
18 Dec 2013   #3
Blacksmith

Windows 7 Ultimate x64
 
 

Hi Shawn

Thank you for your answer. Tutorial OPTION 5 helped me to run the Editor in Admin-Mode. And no - it did not help, saving to \Windows\Bat. It seems writing to this location is protected by some other mechanism, that stops programs from writing to this location regardless whether they runs with Admin rights.

Your post made me realize, that there are two 'Run as Administrator' checkboxes for shortcuts. I always used (Properties --> Shortcut --> Advanced). Is there any recommended reading to understanding the differences between the checkboxes for 'Run as Administrator' in
- 'Properties --> Shortcut --> Advanced'
and
- 'Properties --> Compatibility'
?

Walter
My System SpecsSystem Spec
.

18 Dec 2013   #4
UsernameIssues

W7 Pro SP1 64bit
 
 

Let's say that you have two shortcuts to start notepad:

For shortcut #1, you set the run as admin via
'Properties --> Shortcut --> Advanced'

For shortcut #2, you do nothing special.

Shortcut #1 will run notepad as admin.

Shortcut #2 will not.


=============


Now change shortcut #1 to run notepad as admin via
'Properties --> Compatibility'

For shortcut #2, you do nothing special.

Shortcut #1 will run notepad as admin.

Shortcut #2 will also run notepad as admin because notepad has been added to a list of apps in the registry and it does not matter how you start notepad from then on - it will run as admin.

That said, notepad is a bad example since...
'Properties --> Compatibility'
...is greyed out.
My System SpecsSystem Spec
18 Dec 2013   #5
UsernameIssues

W7 Pro SP1 64bit
 
 

Quote   Quote: Originally Posted by Blacksmith View Post
...it did not help, saving to \Windows\Bat. It seems writing to this location is protected by some other mechanism, that stops programs from writing to this location regardless whether they runs with Admin rights....
I can write to that folder using W7's native notepad if notepad is running as admin.
My System SpecsSystem Spec
18 Dec 2013   #6
Brink

64-bit Windows 10 Pro
 
 

Walter,

If it doesn't have to be at C:\Windows\Bat, then you might test to see how it works to save to one of the C:\Users\Public folders instead since you should have full access rights to that location.
My System SpecsSystem Spec
Reply

 How to associate Edit for .BAT to open always with 'Run as Admin' rigt




Thread Tools Search this Thread
Search this Thread:

Advanced Search




Similar help and support threads
Thread Forum
Making the 'edit' option on batch files open in notepad++
Hello, Tonight it seems like I have really got myself into a pickle. As the title says I tried to change the default editor for batch files. I dinked around in the registry a bit, and I now have myself this. Any suggestions to actually making it work? http://i.imgur.com/3sqng8H.png Thanks...
General Discussion
Cannot associate 'Open with..' PowerDVD11.exe
Hello.:) No major problem here, but when I right click on a movie/Open with.../Choose default program.. /browse, select PowerDVD11.exe and click Open, it doesn't appear in my list of programs to use. Other programs that are in my default list are WMP, VLC, PotPlayer and some others. So no idea...
General Discussion
How do I set defaulta to EDIT with one program but OPEN with another?
All I want to do, as I have done in the past, is to default my browser to IE, and set my HTML editing tool to another program. I have wasted hours (as is always the case with Windwos 7) to try and do this, but none the Control Panel 'set default" optiona distinguish between OPENING and file and...
General Discussion
How to make Edit open up Photoscape in context menu?
I was looking for a free simple photo editor, and i found Photoscape, yay. What i'm trying to do is instead of right clicking, going to "Open With" and then clicking Photoscape, i just want to right click, and click "Edit" so that it opens with Photoscape. Right now, the Edit button opens up...
Software
I need a file to associate my CD drive to open blank
there is an error is telling me to associate my drive with a file in order to open a CD-RW this CD-RW worked at first but now everytime I try to use a CD-RW a second time I get this message this should not be the case and I am lost as far as what to download or even if I download a burning...
Software
Can't open Admin\Desktop\sfcdetails.txt
I've been having problems with windows 7 and I thought there might be something wrong with the windows 7 system files so I i did a system file checker scan. After the scan I tried to view the CBS.log file with sfcdetails.txt but it said "FINDSTR: Cannot open Admin\Desktop\sfcdetails.txt" Is...
BSOD Help and Support


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 09:21.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App