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.

VBS Dateianhaengsel?

Empfohlene Antworten

Hallo,

ich habe ein kleines VB-Skript.

On Error Resume Next

Strproduct = InputBox("Product Name")

Err.Clear


Const HKEY_LOCAL_MACHINE = &H80000002

strComputer = "."

Set WshShell = CreateObject("wscript.Shell")

Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &_

strComputer & "\root\default:StdRegProv")

strKeyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"

oReg.EnumKey HKEY_LOCAL_MACHINE, strKeyPath, arrSubKeys

For Each subkey In arrSubKeys

  strDisplayName = WshShell.RegRead ("HKLM\" & strKeyPath & "\" & subkey & "\DisplayName")

  If  strDisplayName = Strproduct Then

   WshShell.Run "msiexec.exe /norestart /X " & SubKey & " /qn", 7, True

  End If

Next 

bisher gebe ich den Produktnamen ueber die InputBox ein. Nun wuerde ich das aber gerne ueber das Dateianhaengsel machen also in der Command Prompt z.B.

C:/code.vbs Microsoft Office 2003

eingeben und dieses "Microsoft Office 2003" dann in der Variable Strproduct haben.

Wie mache ich soetwas? Vielen Dank vorab fuer eure Hilfe.

Mit freundlichen Gruessen,

Christian S., 20, B.

Arguments ist das zauberwort ;)

If WScript.Arguments.Count = 1 Then

    Produktname = WScript.Arguments.Item(0)

Else

    MsgBox("die parameter korrekt eingeben musst du, junger jedi!")

End If

s'Amstel

Hallo,

funktioniert super, Vielen Dank!

Mfg

Christian, 20, B.

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.