Go Back   Winamp Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 7th July 2009, 18:05   #1
balexis
Junior Member
 
Join Date: Jun 2007
Posts: 12
UAC and FindProcess problematic interaction

Hi,
I want to do the following:

1- Use the UAC plugin so that the installer can be run as an admin and still be able to start the application as the logged on user

2- Detect if the application is already running so I can tell the user to close it. I am using the FindProcess for this purpose (http://nsis.sourceforge.net/FindProcess)

The problem:
The process calling FindProcess is running as Administrator. The script needs to get a handle on the first module of each process in order to call GetModuleBaseName. This is done through a call to OpenProcess().

However, a given user (even Administrator) cannot open the process of another user. The OpenProcess call always return Access Denied.

I see that I should grant SeDebugPrivileges to the installer process, but this just seems so overkill. Heck I just want to see if some .exe file is running or not.

Any clues to help me?
balexis is offline   Reply With Quote
Old 7th July 2009, 20:24   #2
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 2,777
SeDebugPrivileges in the FindProcess plugin would be the way to go

IntOp $PostCount $PostCount + 1
Anders is online now   Reply With Quote
Reply
Go Back   Winamp Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump