我有一个任务在系统启动时触发 exe。任务以最高权限和 SYSTEM 权限创建,但实际进程以用户级权限运行。如何以系统权限运行进程
Local $taskName = 'test1'
_TaskExists($taskName)
If @error = 0 Then
_trace("Task " & $taskName & " exists: updating...")
RunWait("schtasks /DELETE /F /TN " & $taskName, $WORKING_DIR, @SW_HIDE)
RunWait("schtasks /CREATE /RU SYSTEM /F /TN " & $taskName & " /TR " & '"' &
@ScriptFullPath & '"' & " /SC ONSTART /RL HIGHEST ", $WORKING_DIR, @SW_HIDE)
Else
_trace("Task " & $taskName & " does not exist: creating...")
RunWait("schtasks /CREATE /RU SYSTEM /F /TN " & $taskName & " /TR " & '"' &
@ScriptFullPath & '"' & " /SC ONSTART /RL HIGHEST ", $WORKING_DIR, @SW_HIDE)
If @error Then
_error("Task " & $taskName & " was not created successfully: " & @error)
EndIf
EndIf
有没有什么办法可以让我们以 SYSTEM 权限运行该进程?
注意:这是一个 GUI 过程