解决方法:
1。 sending a cntrl-alt-del with vnc, weather tightvnc or realvnc, is built into the software and works on all os's. 上面链接中的方法。
2。 你可以用Alt+F4代替么?
set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.SendKeys ("%(F4)")作者: lingxin5013 时间: 2008-7-31 16:07
Udon't understand what the means i support ,as u way can resolvetion this question but that's not the key result which i wanted.but also say Thank you for u!
i wanner to use the"wscript" meathod to finish the key-board combination operation!作者: Elephant_leg 时间: 2008-7-31 16:40 标题: 回复 3# 的帖子 Hi lingxin,
2。如果你想在local本地的情况下锁屏,请使用:
Set objShell = CreateObject("Wscript.Shell")
objShell.Run "%windir%\System32\rundll32.exe user32.dll,LockWorkStation"
//------------------------------
请参考Microsoft的官方说明: http://www.microsoft.com/technet ... /nov04/hey1115.mspx
您明显没有仔细阅读我前面回复中提供的链接内容,所以以防万一,我复制过来:
In fact, the only way we could figure out how to lock a computer using a script was to write a script that did nothing more than use Rundll32.exe to call the LockWorkStation method of user32.dll:
On Error Resume Next
Set objShell = CreateObject("Wscript.Shell")
objShell.Run "%windir%\System32\rundll32.exe user32.dll,LockWorkStation"
This works great for the local computer, but doesn’t do you much good if you’re trying to lock a remote computer; you can’t specify a remote computer name when running Rundll32.exe. But that’s OK: if this script only runs locally, then all we have to do is make sure it runs locally on the remote computer.
//----------------------------------------------------
3。 如果你的情况和这个人类似(local, 不使用VNC的情况下):
“I have a nocturne routine, but it's fully User Interface, everithing works
good, but at that hour (2 am) my server is Locked and doesn't Run this
routine, is there any way to put in the script a method to unlock the
computer... “
官方回复:
“can you write a script that unlocks a workstation? As far as we know, you can’t; in fact, as far as we know the only way to unlock a workstation is to have someone go to the computer, press Ctrl-Alt-Delete and log on.”
from http://www.microsoft.com/technet ... /nov04/hey1115.mspx