Avatar billede nyholm Novice
09. december 2007 - 14:00 Der er 6 kommentarer og
1 løsning

Om program ær installerat

Kan jag med en kod få svar på om ett visst program ær installerat på datorn, eller om en fil finns på datorn?
Avatar billede terry Ekspert
09. december 2007 - 14:11 #1
You might be able to read in the registry if a program is installed and if you know wher a file shoul dbe then you can check if it exists. Can you give an example of what you want?
Avatar billede nyholm Novice
09. december 2007 - 15:34 #2
Let's say I want to know if Acrobat (not just Acrobat Reader) is installed on a pc where my db is installed, or if a PDF Writer is installed?
Also, is it possible to find out if an AktiveX is registered? The AktiveX I'm looking for is MSCOMCT2.OCX.
Avatar billede terry Ekspert
09. december 2007 - 16:20 #3
Avatar billede terry Ekspert
09. december 2007 - 17:29 #4
Here's a piece of code will test if any reference you have a broken. (not registered)

Dim MyRef As Reference

For Each MyRef In Application.References
  Debug.Print "Reference Name: " & MyRef.Name
  Debug.Print "Is the Reference Built-In: " & IIf(MyRef.BuiltIn = True, "Yes", "No")
  Debug.Print "Full Path of reference: " & MyRef.FullPath
  Debug.Print "Version Number: " & MyRef.Major & "." & MyRef.Minor
  Debug.Print "Kind of Reference: " & MyRef.Kind
  Debug.Print "Is the Reference Broken?: " & IIf(MyRef.IsBroken = True, "Broken", "Intact")
  Debug.Print vbCrLf
Next MyRef


You could use this to test if you need to installed/register
Avatar billede nyholm Novice
09. december 2007 - 17:52 #5
Thanks Terry, this will do the trick.
Avatar billede terry Ekspert
09. december 2007 - 17:57 #6
Found this link which writes a file of all software products installed. If you know what your looking for then I'm sure you could use this (Adobe) but ther must be many PDF writers so I wouldnt think it would be easy to fin dout if one is installed.
Unless ther is a general way to do it.


If you distributed your applictation as a setup kit you could show a list of products which you intened installin and let the user chose those they wanted
Avatar billede terry Ekspert
09. december 2007 - 17:58 #7
thanks
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Dyk ned i databasernes verden på et af vores praksisnære Access-kurser

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester