Windows 7 Do you want to allow the following program to make changes to this computer?

gppsoftware

New Member
We are in the process of modifying some applications to run under Windows 7, however, when we run them, we get the ""Do you want to allow the following program to make changes to this computer?" message from UAC.

I know how to turn UAC off to prevent this, but that is dealing with the symptoms rather than the problem. We would like to write our applications properly so that the error message does not appear in the first place.

Can anyone provide a definitive list of program actions which trigger the error message ?

Interestingly, when debugging our VC++ 2008 applications, the error message appears before any of the code actually runs, so evidently, it is not just the code which counts.
 
UAC automatically does that with ALL programs, it's the nature of the beast, so to speak. Regardless of what program it will do that. It has nothing to do with the application you're running.

Just turn off UAC and you won't see it.
 
UAC automatically does that with ALL programs, it's the nature of the beast, so to speak. Regardless of what program it will do that. It has nothing to do with the application you're running.

Just turn off UAC and you won't see it.

Hi Nubiru,

Thankyou for your reply, but unfortunately, we can't just turn UAC off - many of our clients mandate its use so we have to fit with it.
Microsoft manage to not trigger UAC as do many other software products, so evidently it can be done. What we want to know is how do the code for this ?

Regards
 
Won't cure the asking for elevation but it made it less annoying allowing me to do things I needed

Code:
'Verify we working with Win 7. I think Vista fits here also
Str1 = Reg_Read(HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Windows NT\CurrentVersion", "ProductName")
If InStr(Str1, "Windows 7") Then
   Str1 = Reg_Read(HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers", MyAppPath & "YOURAPP.exe")
 If Str1 <> "# RUNASADMIN" Then
   Reg_Write HKEY_CURRENT_USER, "Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers", MyAppPath & "YOURAPP.exe", "# RUNASADMIN", REG_SZ
   Reg_Write HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers", MyAppPath & "YOURAPP.exe.exe", "# RUNASADMIN", REG_SZ
 End If
End If

Edit: These keys are worth exploring.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\CaretTracking
 
Last edited:
Last edited:
Back
Top