Login Script: Programm starten
Hi,
Ich möchte in meinem VBS login script eine Anwendung starten und die Priorität ändern bzw. herrunter setzen.
Mache ich das mit shell.run "app.exe"?
Wie kann ich die Priorität des Prozesses ändern?
Thorsten
Ich möchte in meinem VBS login script eine Anwendung starten und die Priorität ändern bzw. herrunter setzen.
Mache ich das mit shell.run "app.exe"?
Wie kann ich die Priorität des Prozesses ändern?
Thorsten
Please also mark the comments that contributed to the solution of the article
Content-Key: 28308
Url: https://administrator.de/contentid/28308
Printed on: April 20, 2024 at 09:04 o'clock
1 Comment
Ich würde das mit WMI (Windows Management Instrumentation) machen.
Hier ein Beispiel-Code (setzt alle Prozesse von notepad.exe auf Prio Hoch)
Set wmi = GetObject("winmgmts:{(Security)}")
Set oProc = wmi.ExecQuery("select * from win32_process where name='notepad.exe'")
For each proc in oProc
call proc.SetPriority(128)
Next
Siehe auch bei MS: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk ...
Hier ein Beispiel-Code (setzt alle Prozesse von notepad.exe auf Prio Hoch)
Set wmi = GetObject("winmgmts:{(Security)}")
Set oProc = wmi.ExecQuery("select * from win32_process where name='notepad.exe'")
For each proc in oProc
call proc.SetPriority(128)
Next
Siehe auch bei MS: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk ...