7

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

warheart
  • 71
  • 1
  • 2
  • Customers and colleagues would be greatly unsatisfied if you name it updatedb.exe or upd_task.exe? Sounds more like you should just rename it, write it down to figure out when you have time (a SO question is good for that.. :P), and move on to important problems. (So you're halfway there.) –  Feb 08 '10 at 14:40
  • Well, the point with "move to important problems" sounds good ;-) but sadly it's a fact that the word "update" is very common in our company and makes sense for the things the program does. Thanks for your answer – warheart Feb 08 '10 at 15:14

2 Answers2

6

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...

sth
  • 222,467
  • 53
  • 283
  • 367
j.g. owen
  • 61
  • 1
  • 2
  • 1
    so called [Installer Detection](http://msdn.microsoft.com/en-us/library/windows/desktop/bb756960.aspx) checks if the filename _contains_ keywords like "install," "setup," "update," etc. (sadly they don't even specify all keywords). But `requestedExecutionLevel` mentioned by @warheart should override Installer Detection. – marcin Dec 11 '12 at 22:33
  • My update programs are now named *upda1e.exe. I also think it's rather stupid to detect the features based on the name, I wonder who came with that Idea... – nulleight Feb 21 '17 at 12:28
1

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).

Sheng Jiang 蒋晟
  • 15,125
  • 2
  • 28
  • 46