fbpx
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

A Foundation for PLM Best Practices eBook

A Foundation for PLM Best Practices eBook

Ready to supercharge your organization's success in the competitive manufacturing landscape? Our free eBook is the ultimate guide to building a solid foundation for Product Lifecycle Management (PLM) best practices.  PLM Best Practices eBook Effectively implementing...

Related Resources

Analyzing the SAFe Template In PTC Codebeamer

Analyzing the SAFe Template In PTC Codebeamer

This blog post will analyze the SAFe template provided by Codebeamer exploring how it can improve agile project management and delivery in the software development sector. Essentially, we’re aiming to showcase the advantages, practical uses, and potential hurdles of...

Expert Tips for a Tidy Confluence

Expert Tips for a Tidy Confluence

Confluence, powered by Atlassian, is an essential tool for teams to collaborate, share knowledge, and manage projects efficiently. However, without regular maintenance, Confluence can become cluttered. This can lead to decreased productivity and system performance....