问题
I have a problem with windows UAC, scheduled tasks and a executable named "dbupdate.exe". I have full power over source code, manifests and so on, but not over user systems (short: normal software engineer ;-). Language is Delphi, but shouldn't be important I think.
I have a problem using an application in task scheduler in windows vista and windows 7. The program is named dbUpdate.exe. It has built in a xp/vista manifest, which configures that the program should be started "asInvoker".
Now, in vista and windows 7 I can start the program without any problem, but I have to be logged in to the system. If I am not logged in, the program is not executed (I use windows task scheduler, but I know the problem exists with other scheduling-programs too). But: If I rename the program to "dbBlaBla.exe" it is executed. Leads me to the point, that the UAC Installer Detection is thinking my program is an installer (which it's not, but I know it looks at filenames like update, setup and so on).
I searched the web, I could not find many helpful things. So I ask here
Do I have to create a special manifest to be able to execute it in a scheduled job? Or is there a way to disable UAC for scheduled jobs or just for my executables? Or do I realy have to choose another name (then it would work, like mentioned before) and take the risk that the costumers and my colleagues are not very satisfied about this?$
Thanks for any help, greetings
回答1:
In Windows 7, a program named "update.exe" apparently demands privilege. It's apparently the name, and it's just one of those wacky Microsoft things. Renaming it to "anythingUpdate.exe" will trigger the magic violation; "UpdateAnything.exe" also!
So I renamed mine to up7.exe and now Microsoft is calm and uncontentious. Same thing seems to happen in Vista.
So "updatedb.exe" won't work; "upd_task.exe" would...
回答2:
From http://social.msdn.microsoft.com/Forums/en-US/windowscompatibility/thread/1b316a7f-852e-4a71-89d3-090e45990f98
The User Account Control: Detect application installations and prompt for elevation setting must be enabled for installer detection to detect installation programs. This setting is enabled by default and can be configured with the Security Policy Manager snap-in (secpol.msc) or with Group Policy (gpedit.msc).
来源:https://stackoverflow.com/questions/2222217/exe-name-like-update-exe-blocked-by-uac-in-scheduled-task