WinBatch® Technical Support Forum

All Things WinBatch => WinBatch => Topic started by: Tech710 on December 27, 2017, 07:12:52 AM

Title: Program Compatibility Assistant Windows 10
Post by: Tech710 on December 27, 2017, 07:12:52 AM
Hello All,
Is there a way with WinBatch to bypass the Program Compatibility Assistant? I am not adding reg keys with a batch file to launch a WinBatch application. There has to be a better way...

REG ADD "HKCU\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" /v %InstLocation% /t REG_SZ /d "$ ElevateCreateProcess" /f InstLocation is the name & path of the app...
Title: Re: Program Compatibility Assistant Windows 10
Post by: td on December 27, 2017, 07:31:21 AM
You should never need to use the Program Compatibility Assistant with a compiled WinBatch script.   If you need to execute a compiled script with elevated administrator privileges then set the appropriate manifest settings when you compile the script.

If you using Program Compatibility Assistant because you are starting a second executable from your compiled script then use the WinBatch ShellExecute function instead of one of the "Run*" functions.

If you are starting a compiled script from a third-party application then that third-party application either needs to be fixed or you need to use a different technique to start the script assuming the third-party application provides one.