Launch batch file from the context menu in admin mode

spiderplant0

New member
Local time
2:23 PM
Messages
14
Location
Scotland
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:
[INDENT]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\""
[/INDENT]
 

My Computer

Computer Manufacturer/Model Number
Packard Bell OneTwo X8020
OS
Windows 7 Home Premium (x64) (build 7600) English
CPU
2.33 gigahertz Intel Core2 Quad Q8200
Motherboard
Packard Bell ONETWO L5710
Memory
4094 Megabytes
Graphics Card(s)
ATI Mobility Radeon HD 4500 Series
Sound Card
Realtek High Definition Audio
Screen Resolution
1920x1080
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 Computer

Computer type
Laptop
Computer Manufacturer/Model Number
Employer provided Dell Latitude
OS
W7 Pro SP1 64bit
CPU
i7
Memory
8GB
Graphics Card(s)
Intel HD Graphics
Hard Drives
crappy SSD
Antivirus
Employer mandated Symantec Endpoint Protection
Browser
Pale Moon 64bit, IE11 64bit & Chrome 64bit
Back
Top