Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8094067
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T20:40:32+00:00 2026-06-05T20:40:32+00:00

Build.bat @echo off echo Disabling UAC, please wait… start DisableUAC.lnk echo UAC Disabled Successfully!

  • 0

Build.bat

@echo off
echo Disabling UAC, please wait...
start DisableUAC.lnk
echo UAC Disabled Successfully!
echo.
pause

DisableUAC.bat:

C:\Windows\System32\cmd.exe /k %windir%\System32\reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA /t REG_DWORD /d 0 /f

To run DisableUAC.bat with administrative privileges, I created a shortcut DisableUAC.lnk and checked properties > shortcut > advanced and checked “Run as administrator.” Then I call for it inside Build.bat

This all works, but how can I get the command prompt that shows up from DisableUAC.bat to close upon completing the task? (keep the main Build.bat open, close the DisableUAC.bat that pops up)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T20:40:36+00:00Added an answer on June 5, 2026 at 8:40 pm

    Change /k to /c:

    C:\Windows\System32\cmd.exe /c %windir%\System32\reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA /t REG_DWORD /d 0 /f
    

    See cmd /?:

    Starts a new instance of the Windows command interpreter

    CMD [/A | /U] [/Q] [/D] [/E:ON | /E:OFF] [/F:ON | /F:OFF] [/V:ON | /V:OFF]
    [[/S] [/C | /K] string]

    /C Carries out the command specified by string and then terminates
    /K Carries out the command specified by string but remains
    ..

    Although I don’t think you need to start a new cmd.exe at all here? I think this would also work, either directly as a shortcut or in DisableUAC.bat:

    %windir%\System32\reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA /t REG_DWORD /d 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following bat script: @echo off set JAVA_HOME=C:\Program Files\Java\jdk1.6.0_32 set JRE_HOME=C:\Program Files\Java\jdk1.6.0_32\jre
Off the bat, version information: Eclipse: Juno Release, build 20120614-1722 Android: 4.4 ADT: 20.0.0v201206242043-391819
I'm trying to get my commit-build.bat to execute other .BAT files as part of
I’m trying to build NopCommerce via the .BAT files that came with the project
I have a build.bat file which uses %1 internally... so you might call: build
example buil.bat script start /B webdev.webserver.exe /port:3234 /path:C:\projects\src\XYZWeb /VPATH:/XYZWeb when program run this script
During setup, I'm like missing vcvarsall.bat running build running build_py running build_ext building '_zope_interface_coptimizations'
I have a build script (.bat) that invokes MSBUILD ( C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\msbuild.exe ) that used
I am using rake to build my project and I have a build.bat file
The vcvarsall.bat that does setup de build environment let you choose between x86 |

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.