Logoff

遇到了问题?请先进行搜索(中文和英文),然后在此提问

Moderators: tmplinshi, arcticir

Marcosa1020
Posts: 168
Joined: 23 Sep 2015, 19:15

Logoff

15 Apr 2016, 02:30

Hi,

請問Logoff的寫法該怎麼寫呢? 感謝

Lock 的寫法:
Run, %windir%\system32\rundll32.Exe user32.dll LockWorkStation ; 成功
ExitApp

Run, %windir%\system32\logoff.exe ; 失敗
ExitApp
garry
Posts: 3770
Joined: 22 Dec 2013, 12:50

Re: Logoff

15 Apr 2016, 07:18

it's correct , depending what you want
( after exitapp or return the next command can't run )

Code: Select all

;- script example opens 2 DOS windows  : path-info  &  shutdown DOS-help

;- check path , usually not needs fullpath for  C:\WINDOWS\system32
run,%comspec% /k path
;run,%comspec% /k path >Path_test.txt
;run,Path_test.txt
;---C:\WINDOWS\system32
;-- C:\WINDOWS

;Run, logoff.exe                                 ;- logoff & close programs
;Run, rundll32.Exe user32.dll LockWorkStation    ;- logoff
;Run, shutdown /s /f /t 0, ,                     ;- shutdown
run,%comspec% /k shutdown /?                     ; -open DOS help for shutdown
return

;- when you want close computer :
;  can maybe use runwait,xy.exe ( do something )  and then shutdown
aamii
Posts: 47
Joined: 23 May 2014, 03:50

Re: Logoff

17 Apr 2016, 06:55

ahk内置了一个命令。

关闭、重启或注销系统。
Shutdown
Marcosa1020
Posts: 168
Joined: 23 Sep 2015, 19:15

Re: Logoff

17 Apr 2016, 18:28

Garry & aamii,

Thank you so much.

Return to “请求帮助”

Who is online

Users browsing this forum: No registered users and 33 guests