meecrob
Goto Top

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

Content-Key: 28308

Url: https://administrator.de/contentid/28308

Printed on: April 18, 2024 at 05:04 o'clock

Member: AndreasHoster
AndreasHoster Mar 21, 2006 at 12:53:55 (UTC)
Goto Top
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 ...