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: Launch batch file from the context menu in admin mode

04 Dec 2012   #1
spiderplant0

Windows 7 Home Premium (x64) (build 7600) English
 
 
Launch batch file from the context menu in admin mode

Hi,
I found a registry script that creates an option on the windows explorer context menu that allows you to run a batch file.

The program that I use within the batch file is producing an access denied error which I dont get if I run the batch file normally. I wondered if this was something to do with privileges. So is there maybe some way to adjust this regedit script so it runs the command prompt with more privileges?


Code:
Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\Directory\shell\BackupFolderLocally] @="Backup Folder Locally" [HKEY_CLASSES_ROOT\Directory\shell\BackupFolderLocally\command] @="\"E:\\User\\tools\\BackupFolderLocally.bat\" \"%1\""



My System SpecsSystem Spec
.
12 Dec 2012   #2
UsernameIssues

W7 Pro SP1 64bit
 
 

Many people have tried this and many people have turned to other tools to get it done. You can try AutoIt or AutoHotkey or KiXtart or....

Instead of calling your batch file via that context menu option, you would call a script. The script can ask for elevated privileges. You can either have the script complete the backup of the folder or have the script start your batch file using elevated privileges.
My System SpecsSystem Spec
Reply

 Launch batch file from the context menu in admin mode




Thread Tools





Similar help and support threads
Thread Forum
How to run Batch File as Admin?
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...
General Discussion
Add Quick Launch Bar to Taskbar Context Menu
I already know how to add the quick launch bar to the taskbar. (new toolbar, "%USERPROFILE%\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch") But. . . What I want to know is, Whether there any way to add it to list of toolbars in the taskbar context menu like the address, links, and...
Customization
New Batch File - Add to Context Menu
How to Add "New Batch File" to the Context Menu in Windows This will show you how to add Windows Batch File to the right click "New" context menu to make creating a new BAT file easier for all users in Vista, Windows 7, and Windows 8. You will need to be logged in as an administrator to be...
Tutorials
Launch all programs in the start menu all at once possibly using batch
Launch all programs in the start menu all at once possibly using batch Yes, hey, hello well I came across this video a while ago and although what I'm after isn't linked to the main point of the video, for my own testing purposes I would like to be able to do this myself also the Office only one...
General Discussion
Run as administrator - Add to VBS File Context Menu
How to Add "Run as administrator" to VBS File Context Menu This will show you how to add Run as administrator to the context menu of all VBS files for all users in Vista, Windows 7 and Windows 8. You must be logged in as an administrator to be able to do this tutorial. EXAMPLE: "Run...
Tutorials
.inf file context menu
I want to right click on an inf-file and choose install. But i don't have it there. It's right after a fresh install of the Windows (because of other reasons). I remember that every time when i reinstall Windows this option is not available on the context menu but after i work on the Windows a...
General Discussion

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 23:03.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App