fbpx
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

Understanding Manufacturing Engineering in Windchill

Understanding Manufacturing Engineering in Windchill

When working in the manufacturing industry, using a PLM solution like Windchill helps prevent issues like market delays, poor quality, and additional costs. Explore how Windchill’s manufacturing engineering capabilities can help your business in this eBook.What You...

Related Resources

Understanding Manufacturing Engineering in Windchill

Understanding Manufacturing Engineering in Windchill

When working in the manufacturing industry, using a PLM solution like Windchill helps prevent issues like market delays, poor quality, and additional costs. Explore how Windchill’s manufacturing engineering capabilities can help your business in this eBook.What You...

The 7-Step Guide to Effective Application Lifecycle Management

The 7-Step Guide to Effective Application Lifecycle Management

Application Lifecycle Management is vital to high-quality software delivery. In this eBook, we will explore seven best practices to ensure ALM success.  What You Will Learn Explore these 7 steps for effective ALM: Planning Requirements  Managing Workflows Risk...

Engineering Excellence: Real Results, Not Just Resources

Engineering Excellence: Real Results, Not Just Resources

Engineering Excellence Hello and welcome to Engineering Excellence: Real Results, Not Just Resources. My name is Michael Roberts, Vice President of SPK and Associates, and I'm here with Edwin Chung. Ed, feel free to introduce yourself. Hey, please call me Ed. I'm VP...