spk-logo-tm-2023
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

windchill features best plm software
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

Replacing DOORS with Next Generation ALM

Replacing DOORS with Next Generation ALM

IBM DOORS has remained a consistent tool for managing software requirements. However, it has not kept up with the modern landscape. Explore options such as DOORS NG and other next-generation ALM tools in this eBook.What You Will Learn In this eBook, you will discover:...

Related Resources

Fail Fast or Think Lean? What acceleration really means

Fail Fast or Think Lean? What acceleration really means

In this episode of All About Accelerating Products, we sit down with Charles Hardin, Senior Director of Software Engineering at RedoxBlox, a company pioneering renewable energy management solutions for industrial applications. With over 20 years of experience scaling...

Unlocking Developer Productivity with Atlassian Compass

Unlocking Developer Productivity with Atlassian Compass

When companies develop software, speed and scalability are everything.  Yet, as organizations grow, complexity creeps in. Microservices multiply, ownership becomes unclear, and development slows.  Atlassian Compass is changing that.  Designed to bring visibility,...