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.

API: Abfrage von VB ob Programm installiert ist?

Empfohlene Antworten

Moschee,

ich programmiere ein kleines Tool. Jetzt bin ich an einem Punkt angekommen, wo ich mich überhaupt noch nicht auskenne:

Ich will von VB 6 aus abfragen, ob ein bestimmtes Programm (Acrobat) installiert ist, und je nach dem, ob oder ob nicht es installieren oder den Schritt auslassen.

Ich nehme mal an, das das mit API geht, aber wie?

Vielleicht solltest mal in der Registry nachschaun, da kannst das dann ja erfahren.

So die richtige Sicherheit gibts dabei allerdings nicht, denn es soll ja auch Leute geben die ein Programm nicht deinstallieren, sondern einfach loeschen :)

Goos

Original geschrieben von Goos

Vielleicht solltest mal in der Registry nachschaun, da kannst das dann ja erfahren.

So die richtige Sicherheit gibts dabei allerdings nicht, denn es soll ja auch Leute geben die ein Programm nicht deinstallieren, sondern einfach loeschen :)

Goos

Danke Goos für Deine Antwort, aber wie machen das die Installationsprogramme? Die erkennen ob eine vorherige Version eines Programms installiert ist.

Die erkennen das auch anhand des Eintrags in der Registry.

....und wie schon gesagt....Probleme gibts immer dann, wenn einer die Programme von Hand loescht, weil dann die Eintraege in der Registry bestehenbleiben obwohl eigentlich kein Programm mehr da ist.

Goos

Ah, okay, jetzt ist es durchgedrungen.:D

Kannst Du mir einen kurzen Einstiegstip geben, wie ich bewerkstellige? Was die Registry betrifft, kenn ich mich genauso schlecht aus, wie in API.

Also ich muss gestehen, dass ich noch nie was direkt mit VB gemacht hab :D

Ich steh eigentlich mehr auf alles was mit C/C++ zutun hat.

Ich kenn mich da ansich nur mit Office/VBA aus, weil man dort ja nicht drumrum kommt.

Ich hab allerdings gerade was gefunden, dass dir helfen koennte :)

Ein kleines Beispiel um auf der Platte, bzw. in nem bestimmten Pfad nach einer Datei zu suchen.

Das sollte dich ansich auch weiterbringen.


option Explicit
private Declare Function SearchTreeForFile Lib "imagehlp" (byval RootPath as string, byval InputPathName as string, byval OutputPathBuffer as string) as Long
private Const MAX_PATH = 260
'
private Sub Command1_Click()
Dim tempIN as string, Ret as Long, pthIN as string, pthOut as string
Dim tempOut as string
tempIN = string(MAX_PATH, 0)
tempOut = string(MAX_PATH, 0)
Ret = SearchTreeForFile("C:\", "VB6.Exe", tempIN)
If Ret <> 0 then
pthIN = StripName(Left$(tempIN, InStr(1, tempIN, Chr$(0)) - 1))
MsgBox "Located file at " + StripName(pthIN)
else
MsgBox "input File not found!"
End If

End Sub

public Function StripName(path)
Dim x
x = InStrRev(path, "\")
StripName = Left(path, x - 1)
End Function

[/PHP]

Goos

Cool, dies ist genau das, was ich gesucht habe.

Herzlichen Dank!!!

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.