ProcessPriority is a VB application that allows process priorities to be changed via scripts or events on W2K. It can be run out of the homeseer
startup script to change homeseer's priority to a higher level than normal. It can be run from within a script to cause applications/processes to be set at higher or lower priorities. Process priorities can be changed as often as desired.
Sample Event setup:
App/Sound/Email tab
Application Path: C:\Program Files\Homeseer\ProcessPriority.exe
Parameters: Homeseer|High
Sample Script use #1: use of Window title to identify process
sub main()
hs.launch "C:\Program Files\Homeseer\ProcessPriority.exe","hsphone|above_normal"
end sub
Sample Script use # 2: use of Process ID to identify the process & use of status feedback
sub main()
Set oExec = CreateObject("Wscript.Shell").Exec("SampleData.vbs")
ProcessId = cstr(oExec.ProcessId)
StatusDevice = hs.GetDeviceCode("Computer Process Status")
PriorityLevel = "low"
ProcessParameter = StatusDevice & "|" & PriorityLevel & "|" & StatusDevice
hs.launch "C:\Program Files\Homeseer\ProcessPriority.exe", ProcessParameter
hs.waitsecs 1
if hs.IsOffByName("Computer Process Status") Then
hs.writelog "Error","Process Priority for SampleData.vbs could not be lowered"
end if
end sub
V1.1 Improved the information feedback
1) If executed without parameters then an HTML page will be displayed showing
All the windows, their handle, owner's process id, and process priority
It is sorted three times, once by window title, once by process id, and
once by process priority / window title
This is useful to get a view of what is running on your PC as well as
find the title of the window so that that title can be used in the script
to change the priority
2) Added the following information in the homeseer device, if included in the
invocation call
a) Status contains "on" if successful in changing the priority
b) String contains error message or the new priority if no errors
c) Value contains the process id for the window. This could then be used
by other scripts that need to identify a process by it's ID
V1.3 Added application class to HTML display
[This message was edited by Michael McSharry on Saturday, 04 May 2002 at 05:47 PM.]
[This message was edited by Michael McSharry on Tuesday, 23 July 2002 at 03:43 AM.]
startup script to change homeseer's priority to a higher level than normal. It can be run from within a script to cause applications/processes to be set at higher or lower priorities. Process priorities can be changed as often as desired.
Sample Event setup:
App/Sound/Email tab
Application Path: C:\Program Files\Homeseer\ProcessPriority.exe
Parameters: Homeseer|High
Sample Script use #1: use of Window title to identify process
sub main()
hs.launch "C:\Program Files\Homeseer\ProcessPriority.exe","hsphone|above_normal"
end sub
Sample Script use # 2: use of Process ID to identify the process & use of status feedback
sub main()
Set oExec = CreateObject("Wscript.Shell").Exec("SampleData.vbs")
ProcessId = cstr(oExec.ProcessId)
StatusDevice = hs.GetDeviceCode("Computer Process Status")
PriorityLevel = "low"
ProcessParameter = StatusDevice & "|" & PriorityLevel & "|" & StatusDevice
hs.launch "C:\Program Files\Homeseer\ProcessPriority.exe", ProcessParameter
hs.waitsecs 1
if hs.IsOffByName("Computer Process Status") Then
hs.writelog "Error","Process Priority for SampleData.vbs could not be lowered"
end if
end sub
V1.1 Improved the information feedback
1) If executed without parameters then an HTML page will be displayed showing
All the windows, their handle, owner's process id, and process priority
It is sorted three times, once by window title, once by process id, and
once by process priority / window title
This is useful to get a view of what is running on your PC as well as
find the title of the window so that that title can be used in the script
to change the priority
2) Added the following information in the homeseer device, if included in the
invocation call
a) Status contains "on" if successful in changing the priority
b) String contains error message or the new priority if no errors
c) Value contains the process id for the window. This could then be used
by other scripts that need to identify a process by it's ID
V1.3 Added application class to HTML display
[This message was edited by Michael McSharry on Saturday, 04 May 2002 at 05:47 PM.]
[This message was edited by Michael McSharry on Tuesday, 23 July 2002 at 03:43 AM.]