Login | |
|
 |
Re: CTRL+ALT+DEL with VBS? - 1/7/2005 3:42:54 AM
|
|
 |
|
| |
Snipah
Posts: 1343
Score: 6
Joined: 11/1/2004
From: Netherlands
Status: offline
|
it is a Win2k security that only users behind the keyboard (physical) are allowed to do the combination of Ctrl Alt Delete. MCSE talks about this!
|
|
| |
|
|
|
 |
Re: CTRL+ALT+DEL with VBS? - 1/7/2005 4:48:08 AM
|
|
 |
|
| |
tnoonan
Posts: 364
Score: 0
Joined: 12/14/2004
From:
Status: offline
|
I also use it in my find user script Option Explicit const COMMAND_EXEC = "NETSH WINS SERVER \\10.0.3.18 show name " const COMMAND_VNC = "C:\Program Files\RealVNC\vncviewer.exe " 'const COMMAND_VNC = "C:\Program Files\ORL\VNC\vncviewer.exe " Dim objWshShell , objExec, strUserName, strOutput, intLine, oshell Dim intPosition, strIP, arrEntrySplit, strComputerName, intRemote strUserName = InputBox("Please enter a user name:" & vbCRLF & vbCRLF & _ "(Press [ENTER] or click [CANCEL] to exit...)", _ "Spoogenet", "") Do While strUserName <> "" Set objWshShell = CreateObject("WScript.Shell") Set objExec = objWshShell.Exec (COMMAND_EXEC & strUserName & " 03") For intLine = 1 To 4 objExec.StdOut.ReadLine Next If objExec.StdOut.ReadLine <> "The name does not exist in the WINS database." Then For intLine = 1 To 5 objExec.StdOut.ReadLine Next strOutput = objExec.StdOut.ReadLine If Left(strOutput,10) <> "IP Address" Then strOutput = objExec.StdOut.ReadLine End If intPosition = InStr(strOutput, ":") strIP = Right(strOutput, (Len(strOutput) - intPosition)) Set objExec = objWshShell.Exec("NBTSTAT -A " & strIP) Do While Not objExec.StdOut.AtEndOfStream strOutput = objExec.StdOut.ReadLine If InStr(strOutput,"<03>") <> 0 Then arrEntrySplit = Split(strOutput) If UCase(arrEntrySplit(4)) <> UCase(strUserName) And _ UCase(arrEntrySplit(4)) <> UCase(strComputerName) And _ UCase(arrEntrySplit(4)) <> strComputerName & "$" Then strComputerName = strComputerName & UCase(arrEntrySplit(4)) End If End If Loop If strComputerName <> "" Then MsgBox "The requested user '" & strUserName & _ "' is logged on to: " & strComputerName,,"User Computer Name Locator" Else MsgBox "The requested user '" & strUserName & _ "' doesn't appear to logged on to the network. " End If Else MsgBox "The user was not found in the WINS database. ",, _ "User Computer Name Locator" End If Set objExec = Nothing Set objExec = objWshShell.Exec (COMMAND_VNC & strComputerName) WScript.Sleep 1000 objwshshell.Sendkeys("password") WScript.Sleep 1000 objwshshell.SendKeys("{ENTER}") WScript.Sleep 1000 'Send ctrl + alt + del to vncviewer objwshshell.Sendkeys("%^+{DEL}") Set objExec = Nothing strComputerName = "" strUserName = InputBox("Please enter a user name:" & vbCRLF & vbCRLF & _ "(Press [ENTER] or click [CANCEL] to exit...)", _ "User Computer Name Locator", "") Loop
|
|
| |
|
|
|
| |
|
|
 |
|
 |
|
|