![使用 AutoIt 创建计划任务时如何以 SYSTEM 权限运行进程](https://linux22.com/image/1563797/%E4%BD%BF%E7%94%A8%20AutoIt%20%E5%88%9B%E5%BB%BA%E8%AE%A1%E5%88%92%E4%BB%BB%E5%8A%A1%E6%97%B6%E5%A6%82%E4%BD%95%E4%BB%A5%20SYSTEM%20%E6%9D%83%E9%99%90%E8%BF%90%E8%A1%8C%E8%BF%9B%E7%A8%8B.png)
我有一个任务在系统启动时触发 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 过程