Jump to content

Program Compatibility Assistant


Recommended Posts

Hi all

Finally got myself to a just about finished script and everytime i test on a different machine, i get the Program Compatibility Assistant popping up when i exit.

It happens when i use either the File Close menu or the cross in the corner.

Its very annoying and i dont want it doing it when i roll this one out because i will get loads of mails

Does this happen because the script ended wrong?

I currently have this in the While loop

Case $GuiMsg = $Gui_Event_Close
    Exit

Should i be doing this different to stop the PCA kicking in?

Any thoughts?

Edited by Chimaera
Link to comment
Share on other sites

Hi all

Finally got myself to a just about finished script and everytime i test on a different machine, i get the Program Compatibility Assistant popping up when i exit.

It happens when i use either the File Close menu or the cross in the corner.

Its very annoying and i dont want it doing it when i roll this one out because i will get loads of mails

Does this happen because the script ended wrong?

I currently have this in the While loop

Case $GuiMsg = $Gui_Event_Close
    Exit

Should i be doing this different to stop the PCA kicking in?

Any thoughts?

I'm not sure if this will help but replace Exit with Exit(0).

My UDFs are generally for me. If they aren't updated for a while, it means I'm not using them myself. As soon as I start using them again, they'll get updated.

My Projects

WhyNotWin11
Cisco FinesseGithubIRC UDFWindowEx UDF

 

Link to comment
Share on other sites

Hi all

Finally got myself to a just about finished script and everytime i test on a different machine, i get the Program Compatibility Assistant popping up when i exit.

It happens when i use either the File Close menu or the cross in the corner.

Its very annoying and i dont want it doing it when i roll this one out because i will get loads of mails

Does this happen because the script ended wrong?

I currently have this in the While loop

Case $GuiMsg = $Gui_Event_Close
    Exit

Should i be doing this different to stop the PCA kicking in?

Any thoughts?

I am not sure whether your Exit process causes the problem. Anyway also try with ExitLoop.. There may be some thing else causing the issue! like checking the OS version by hard coding or something else... if you want you can also have a look here Edited by Syed23

Thank you,Regards,[font="Garamond"][size="4"]K.Syed Ibrahim.[/size][/font]

Link to comment
Share on other sites

What does the rest of the code do?

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Link to comment
Share on other sites

What does the rest of the code do?

Its an installer for some software, quite a few variables , very little array, 3 button loops, not much too it really few bits of extra code like the _FileHippoDownload from storme and your _IsInternetConnectedEx()and the _GetUpdates() by GeoSoft.

Apart from that nothing unusual just normal if this happens do this etc stuff

Typical i get right near the finishing post for the first time and get problems like this :mellow:

I noticed this in the link Syed23 gave

Another option to exclude applications from PCA is to add the list of executable files with full path under the following registry key: HKEY_LOCAL_MACHINE\ Software\Microsoft\Windows NT\CurrentVersion\Compatibility Assistant. The value name is ExecutablesToExclude, which is type REG_MULTI_SZ.

How could i add a line to the top of the script so it excludes my program from the attention?

RegWrite("HKEY_LOCAL_MACHINE\ Software\Microsoft\Windows NT\CurrentVersion\Compatibility Assistant", "ExecutablesToExclude", "REG_MULTI_SZ", "1")

Would that be right?

Link to comment
Share on other sites

That gives me an invalid directive when i run the script m8

and the text is black not purple

EDIT

Updated from 1.79 to latest and its ok now

ill test when im at work next

Thx JFX

ps mine dosent but the ones im installing thru the script do

Edited by Chimaera
Link to comment
Share on other sites

  • Developers

That gives me an invalid directive when i run the script m8

and the text is black not purple

what version of autoit3wrapper are you running because this directive is good and added to the latest release?

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

I was on Version 1.79

And ive now updated to Version 2.27

Ive not been updating because of all the beta testing and stuff going on around here, i didnt want to mess up my Autoit (if you see what i mean)

As i have no idea whats safe to use and whats not

Edited by Chimaera
Link to comment
Share on other sites

  • 1 year later...

The Microsoft documentation is wrong. Here is the correct key to exclude a program from PAC:

HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionAppCompatFlagsCompatibility AssistantExecutablesToExclude

If you use both 32-bit and 64-bit operating systems, you may need to do something like this:

If @OSArch = "X86" Then

RegWrite("HKEY_LOCAL_MACHINESoftwareMicrosoftWindows NTCurrentVersionAppCompatFlagsCompatibility Assistant", "ExecutablesToExclude", "REG_MULTI_SZ", "C:WindowsMyProgram.exe")

Else

RegWrite("HKEY_LOCAL_MACHINE64SoftwareMicrosoftWindows NTCurrentVersionAppCompatFlagsCompatibility Assistant", "ExecutablesToExclude", "REG_MULTI_SZ", "C:WindowsMyProgram.exe")

EndIf

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...