spk-logo-white-text-short2
0%
1-888-310-4540 (main) / 1-888-707-6150 (support) info@spkaa.com
Select Page

Trigger UAC to Ensure Scripts are run As Administrator in Windows 7

Written by SPK Blog Post
Published on April 10, 2014
I wanted to post this solution since we run into this problem all the time:

Often, our .bat scripts include making registry changes or copying files which require Administrative access. This code will cause the .bat file to trigger a UAC prompt before running AsAdministrator — allowing us to make those registry changes instead of getting permission errors.

Be careful, though – make sure you map network drives or make environment changes at the end of the file; relaunching a file as Administrator means you will not have the same Environment or Map Drives as the User in Windows 8.

Download our How-To Guide to Trigger UAC to Ensure Scripts are run As Administrator in Windows 7 below.

Latest White Papers

The Future of Government Work is Here

The Future of Government Work is Here

Are you ready to secure your mission, empower all teams, and serve every citizen? The future of government work is here, and it's called the Atlassian Government Cloud.What You Will Learn Legacy systems cannot compete with the capabilities of the cloud. In this eBook,...

Related Resources

Modern Test Management for Regulated Industry Software Teams

Modern Test Management for Regulated Industry Software Teams

Introduction to Appsvio Hello everyone, and welcome to this SPK and Associates video entitled Modern Test Management for Regulated Industry Software Teams. I’m Michael Roberts, Vice President of Sales and Marketing for SPK and Associates. Today we’re going to talk...

Is GitHub Costing More Than It Should?

Is GitHub Costing More Than It Should?

CI/CD is an important aspect of software engineering that directly impacts engineering velocity, release confidence, and total cost of ownership.  So, with the upcoming 2026 pricing changes to GitHub Actions, many teams are asking a fair question: Are we paying the...