Launch batch file from the context menu in admin mode


  1. Posts : 14
    Windows 7 Home Premium (x64) (build 7600) English
       #1

    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 Computer


  2. Posts : 10,485
    W7 Pro SP1 64bit
       #2

    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


 

  Related Discussions
Our Sites
Site Links
About 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 03:40.
Find Us