Wäre super und was noch besser wäre wenn es möglich ist wäre den angemeldeten benutzer und die MHZ eines Rechners der im Netzwerk verbunden ist zu erfahren.. er hat z.B den Rechnernamen \\Ba119167\c$
Wäre wirklich Super !!
Vielen Dank Chris
Du hast es noch nicht getest User wäre ... Die Nummer ist mir grad entfallen (x2 = Environ("USERNAME") ) aber nur unter NT
zu den anderen Sachen kann ich keine Aussage machen. Hier mal meine Sammlung zu dem Problem.
Benutzernamen zu Autorisationzwecken abfragen
unter NT
x1 = Environ("COMPUTERNAME")
x2 = Environ("USERNAME")
MsgBox Environ("WINDIR") Windowsinstallationsphad
Username von Netzwerkanmeldung NT
und noch viele andere schöne Informationen (statt "yyy" mal hinter ENVIRON in der Klammer Zahlen eingeben. 1 bis xx
26 Standardverzeichnis ???
Public Sub Environ_abfragen()
i = 1
Do
Cells(i, 1) = i
Cells(i, 2) = Environ(i)
i = i + 1
Loop Until Environ(i) = ""
End Sub
von Thomas Ramel
oder andere Betriebsysteme
Dim BName As String
Declare Function GetUserName Lib "advapi32.dll" _
Alias "GetUserNameA" (ByVal lpBuffer As String, _
nSize As Long) As Long
Sub Benutzerfilter()
Dim Buffer As String * 100
Dim BuffLen As Long
BuffLen = 100
GetUserName Buffer, BuffLen
BName = Left(Buffer, BuffLen - 1)
If BName <> "Jürgen" Then Exit Sub
'--------------------------------------
' Andere Ausführungen, wenn Name stimmt
'--------------------------------------
End Sub
Von Jürgen Wenzel
computername
Private Const MAX_COMPUTERNAME_LENGTH As Long = 31
Private Declare Function GetComputerName Lib "kernel32" Alias "GetComputerNameA" (ByVal lpBuffer As String, nSize As Long) As Long
Private Sub Form_Load()
Dim dwLen As Long
Dim strString As String
'Create a buffer
dwLen = MAX_COMPUTERNAME_LENGTH + 1
strString = String(dwLen, "X")
'Get the computer name
GetComputerName strString, dwLen
'get only the actual data
strString = Left(strString, dwLen)
'Show the computer name
MsgBox strString
End Sub
Andi_Bln
Systemverzeichnis
'Windows
Declare Function GetWindowsDirectory Lib "kernel32" _
Alias "GetWindowsDirectoryA" (ByVal lpBuffer As String, _
ByVal nSize As Long) As Long
'System
Declare Function GetSystemDirectory Lib "kernel32" _
Alias "GetSystemDirectoryA" (ByVal lpBuffer As String, _
ByVal nSize As Long) As Long
Function WindowsDir() As String
Dim X As Long
Dim strPath As String
strPath = Space$(1024)
X = GetWindowsDirectory(strPath, Len(strPath))
strPath = Left$(strPath, X)
If Right$(strPath, 1) <> "\" Then strPath = strPath & "\"
WindowsDir = strPath
End Function
'To find the Windows\System directory path:
Function SystemDir() As String
Dim X As Long
Dim strPath As String
strPath = Space$(1024)
X = GetSystemDirectory(strPath, Len(strPath))
strPath = Left$(strPath, X)
If Right$(strPath, 1) <> "\" Then strPath = strPath & "\"
SystemDir = strPath
End Function
Von guenter bei Herber.de
so kannst du die Festplattenseriennummer auslesen:
http://xlfaq.herber.de/texte/063599h.htm
und so den Usernamen aus der Windows-Registry:
http://xlfaq.herber.de/texte/038298h.htm
betriensystem
=INFO("sysversion")
Application.International(1) - liefert für deutsch den Wert 49 zurück
Gruß Hajo