Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Mit VBS Rechnernamen ausgeben

Empfohlene Antworten

Veröffentlicht

Hi ich habe folgendes Problem :

Ich möchte per VBScript meinen Rechnernamen auslesen lassen und den Namen dann einer Variablen übergeben und diesen dann in einer MSG Box anzeigen lassen.

Wär klasse wenn mir jmd. weiterhelfen könnte.

Vielen Dank

ten13

Dim WSHShell, WSHNetwork

Set WSHShell = CreateObject("WScript.Shell")

Set WSHNetwork = CreateObject("WScript.Network")

strComputer = WSHNetwork.ComputerName

WScript.Echo strComputer

ComputerName steht übrigens weiters auch als variable im environment.

WScript.Echo WshShell.Environment("PROCESS").Item("COMPUTERNAME")

s'Amstel

Hallo,

mit dem Network-Objekt kannst du untrer anderem den Rechnernamen auslesen - Beispiel:


Dim oWshNw

Dim sComputerName

Set oWshNw = WScript.CreateObject("WScript.Network")

sComputerName = oWshNw.ComputerName

WScript.Echo sComputerName

Gruß

xmurrix

vl. wäre es sinnvoll, mal einen thread mit ressourcen zum thema (oder programmierthemen generell) hier sticky zu stellen - mir scheint, es fallen recht häufig fragen zum thema scripting an.

s'Amstel

so mal schnell noch ein DANKE da lasse und mich jetzt an die arbeit mache : )

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.