Don't restart after update

Cyann's profile image Cyann posted 7 years ago in General Permalink

I run HeidiSQL with a normal user account. When I update it, the installer asks for my admin account (UAC). The problem is that the installer restarts HeidiSQL with admin privileges (security issue) and obviously the connections are empty (annoying).

I propose that you prevent HeidiSQL to start itself after update.

ansgar's profile image ansgar posted 7 years ago Permalink

Yes, right. However, the automatic restart was implemented for convenience reasons. I'm quite sure people will complain when I remove that feature.

Cyann's profile image Cyann posted 7 years ago Permalink

Agreed.

One solution would be to add a check on the user's RID: if it's the same as the current interactive user then restart.

kalvaro's profile image kalvaro posted 7 years ago Permalink

I'm pretty sure that Windows APIs provide a way to restart without elevation. After all, almost all installers need to do so. How it's made, though, is something beyond my area of expertise. I can only link some random Google result ;-)

http://blogs.microsoft.co.il/sasha/2009/07/09/launch-a-process-as-standard-user-from-an-elevated-process/

Cyann's profile image Cyann posted 7 years ago Permalink

@kalvaro: No, I don't think you can start a process as another user without knowing its password, that would be a security bypass. Unless you want to flag the installer as malware by all antivirus ;-)

kalvaro's profile image kalvaro posted 7 years ago Permalink

@kalvaro: No, I don't think you can start a process as another user without knowing its password, that would be a security bypass. Unless you want to flag the installer as malware by all antivirus ;-)

"Launch an arbitrary program with an arbitrary user ID without asking for credentials" is not what we're talking about. Doesn't it make sense that the user that launches the installer in the first place can run a second program?

Almost all installers have an option to run the installed program.

Please login to leave a reply, or register at first.