WINAMP.COM | Forums : Powered by vBulletin version 2.3.9 WINAMP.COM | Forums > Developer Center > NSIS Discussion > Raise process priorty
  Last Thread   Next Thread
Author
Thread Post New Thread    Post A Reply
secured2k1
Junior Member

Registered: Nov 2009
From:

Raise process priorty

Hello,

I want the "installer.exe" to find a Windowless process named "BLAH.EXE" that was started by the installer and raise BLAH.EXE process priorty to Above Normal? When I say Window-less process, I mean a program like "SVCHOST.EXE" that has no user interface or window name.

Ideally this would be through the System dll. Is this possible?

Quick Link | Report this post to a moderator | IP: Logged

secured2k1 is offline Old Post 11-08-2009 06:46 PM
Click Here to See the Profile for secured2k1 Click here to Send secured2k1 a Private Message Click Here to Email secured2k1 Find more posts by secured2k1 Add secured2k1 to your buddy list Edit/Delete Message Reply w/Quote
Wizou
Senior Member

Registered: Aug 2007
From: Paris, France

A few Google searches :
http://www.google.fr/search?hl=fr&a...08&ie=UTF-8

http://www.google.fr/search?hl=fr&a...mp;aq=f&oq=

__________________
My NSIS plug-ins: http://wizou.fr

Quick Link | Report this post to a moderator | IP: Logged

Wizou is offline Old Post 11-12-2009 10:14 AM
Click Here to See the Profile for Wizou Click here to Send Wizou a Private Message Visit Wizou's homepage! Find more posts by Wizou Add Wizou to your buddy list Edit/Delete Message Reply w/Quote
secured2k1
Junior Member

Registered: Nov 2009
From:

I was hoping there was a way to do it without a third-party plugin. Here is what I'm using for the parent process.

code:
!define NORMAL_PRIORITY_CLASS 0x00000020 !define IDLE_PRIORITY_CLASS 0x00000040 !define HIGH_PRIORITY_CLASS 0x00000080 !define REALTIME_PRIORITY_CLASS 0x00000100 System::Call "kernel32::GetCurrentProcess() i .s" System::Call "kernel32::SetPriorityClass(i s, i ${HIGH_PRIORITY_CLASS})"


I guess all I need is a way to find the handle to process blah.exe.

Quick Link | Report this post to a moderator | IP: Logged

secured2k1 is offline Old Post 11-12-2009 09:25 PM
Click Here to See the Profile for secured2k1 Click here to Send secured2k1 a Private Message Click Here to Email secured2k1 Find more posts by secured2k1 Add secured2k1 to your buddy list Edit/Delete Message Reply w/Quote
Wizou
Senior Member

Registered: Aug 2007
From: Paris, France

yup, this is the hard part.. can't be done easily with NSIS except with a plugin..

mmh I just realize the Processes plug-in doesn't return the ID of the target process... and then you would need to OpenProcess by ID to get the HANDLE and change priority...

I guess using the PrcView command-line tool is the easiest solution

__________________
My NSIS plug-ins: http://wizou.fr

Quick Link | Report this post to a moderator | IP: Logged

Wizou is offline Old Post 11-13-2009 09:04 AM
Click Here to See the Profile for Wizou Click here to Send Wizou a Private Message Visit Wizou's homepage! Find more posts by Wizou Add Wizou to your buddy list Edit/Delete Message Reply w/Quote
All times are GMT. The time now is 04:39 AM. Post New Thread    Post A Reply
  Last Thread   Next Thread
WINAMP.COM | Forums : Powered by vBulletin version 2.3.9 WINAMP.COM | Forums > Developer Center > NSIS Discussion > Raise process priorty
Show Printable Version
 | 
Email this Page
 | 
Subscribe to this Thread

Forum Jump:
 

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is off
vB code is ON
Smilies are ON
[IMG] code is ON