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

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

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?

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

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

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

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 01:30.
Twitter Facebook Google+