Tar
Tar

Reputation: 9015

EXE path in HKEY_LOCAL_MACHINE\...\Run doesn't launch

I added a string value in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run, called MyAppName, with its value of its full path, say C:\Temp\MyAppName.exe.

I restarted, but it wasn't started, and I have no idea why. When I use the same path from command-line it starts (after receiving the elevation approval).

As implied, this app asks for elevation when it starts, FWIW...

I use Win8.1 64 bit

Upvotes: 0

Views: 179

Answers (1)

MSalters
MSalters

Reputation: 179819

You need to create a non-UAC wrapper. This can show a simple dialog (e.g. "Start Acme.Inc Widgelator? Yes/No"). You should show the UAC shield on the Yes button.

The usual case for such a UAC-at-startup scenario is an version check. You should do the version check without admin rights and only prompt for elevation if an update is in fact available.

Upvotes: 2

Related Questions