Old 31st March 2006, 18:39   #1
Yathosho
Forum King
 
Yathosho's Avatar
 
Join Date: Jan 2002
Location: AT-DE
Posts: 3,366
change process priority?

is there a way an nsis installer can increase its own process priority? i'd like to add an option, so that the user can decide whether he wants to increase the process priority in order to speed up an time-consuming operation.
Yathosho is offline   Reply With Quote
Old 31st March 2006, 18:42   #2
Yathosho
Forum King
 
Yathosho's Avatar
 
Join Date: Jan 2002
Location: AT-DE
Posts: 3,366
i guess it could be a security feature of window not to allow an application to increase its own process priority? i hope, but then again it's windows
Yathosho is offline   Reply With Quote
Old 31st March 2006, 19:48   #3
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
You can use SetPriorityClass:
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})"


NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 2nd August 2006, 00:23   #4
Brummelchen
Major Dude
 
Join Date: May 2003
Posts: 681
how to use that class with another program?

Greets, Brummelchen
Brummelchen is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast 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