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: How to override UAC for a batch file?

11 Aug 2013   #1

Win 7 ultimate 64 bit
 
 
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 System SpecsSystem Spec
.

11 Aug 2013   #2

Microsoft Community Contributor Award Recipient

Windows 7 Home Premium x64 SP1
 
 

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

Elevated Program Shortcut without UAC Prompt - Create

A Guy
My System SpecsSystem Spec
11 Aug 2013   #3

Win 7 ultimate 64 bit
 
 

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 System SpecsSystem Spec
.


11 Aug 2013   #4

Microsoft Community Contributor Award Recipient

Windows 7 Home Premium x64 SP1
 
 

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

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

A Guy
My System SpecsSystem Spec
12 Aug 2013   #5

Win 7 ultimate 64 bit
 
 

Beauty, that fixed the issue, cheers mate.
My System SpecsSystem Spec
12 Aug 2013   #6

Microsoft Community Contributor Award Recipient

Windows 7 Home Premium x64 SP1
 
 

Great, my pleasure

A Guy
My System SpecsSystem Spec
Reply

 How to override UAC for a batch file?




Thread Tools




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 02:08 PM.
Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33