How to override UAC for a batch file?


  1. Posts : 3
    Win 7 ultimate 64 bit
       #1

    How to override UAC for a batch file?


    Hey guys,

    I am trying to make a simple batch file, the idea behind it is i run the batch file and save my settings/configuration settings of my game to a folder called Backup with batch.

    Here is the issues:
    * The game is in program files(x86) - I wish for it to stay here.
    * Cannot create a folder called "Backup" due to User Account Control(UAC) - I don't want to turn off UAC either.
    * I cannot use hard-coded paths as i am making the batch for my mates too - But the game uses same configuration file-names and same sub-directories.

    So my question is, is their a way i can override UAC or turn UAC off to do this batch process and then re-enable UAC?

    Can someone post some ideas? Here is the current batch:
    Code:
    @echo off
    
    color 34
    
    Echo This will make a backup of all the cfg files
    Echo in a Backup directory to the root of the game:
    @pause
    
    
    MD "Backup/etpro"
    MD "Backup/etmain"
    MD "Backup/etpub"
    
    
    XCOPY "etmain\*.cfg" "Backup\etmain"
    XCOPY "etpro\*.cfg" "Backup\etpro"
    XCOPY "etpub\*.cfg" "Backup\etpub"
    Cheers for the help.

    -Burgo855
      My Computer


  2. Posts : 53,365
    Windows 10 Home x64
       #2

    Welcome to Seven Forums Burgo855. You might accomplish that with this:

    Elevated Program Shortcut without UAC Prompt - Create

    A Guy
      My Computer


  3. Posts : 3
    Win 7 ultimate 64 bit
    Thread Starter
       #3

    Cheers for the reply, i read that earlier when i did some googling. The thing is this means all my mates i give this batch to will have to do the same process...
      My Computer


  4. Posts : 53,365
    Windows 10 Home x64
       #4

    Ahhh, I did not know that was an issue Have a look here:

    https://sites.google.com/site/eneerg.../batchgotadmin

    A Guy
      My Computer


  5. Posts : 3
    Win 7 ultimate 64 bit
    Thread Starter
       #5

    Beauty, that fixed the issue, cheers mate.
      My Computer


  6. Posts : 53,365
    Windows 10 Home x64
       #6

    Great, my pleasure

    A Guy
      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 14:17.
Find Us