Yathosho
31st March 2006 18:39 UTC
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
31st March 2006 18:42 UTC
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 ;)
kichik
31st March 2006 19:48 UTC
You can use SetPriorityClass:
!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})"
Brummelchen
2nd August 2006 01:23 UTC
how to use that class with another program?