| |

VerySource

 Forgot password?
 Register
Search
View: 976|Reply: 7

How to detect computer without specific software installed

[Copy link]

1

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-3-21 23:30:01
| Show all posts |Read mode
Use Vb as an interface. When loading, check whether the computer has matlab and other software installed in the background.

If yes, load the next show

No installation, prompting that the computer does not have matlab software installed

Thank you
Reply

Use magic Report

1

Threads

21

Posts

21.00

Credits

Newbie

Rank: 1

Credits
21.00

 Great Britain

Post time: 2020-6-30 09:30:01
| Show all posts
Check whether there is a corresponding key value in the registry, give you an example of detecting whether excel is installed

Public Const HKEY_LOCAL_MACHINE As Long =&H80000002
Public Declare Function RegOpenKey Lib "advapi32.dll" Alias ​​"RegOpenKeyA" (ByVal hKey As Long, ByVal lpSubKey As String, phkResult As Long) As Long
Public Declare Function RegCloseKey Lib "advapi32.dll" (ByVal hKey As Long) As Long


    Dim lRet As Long, hKey As Long
    lRet = RegOpenKey(HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Office\11.0\Excel", hKey)
   
    If lRet <> 0 Then
       'no excel instralled
    Else
        'excel installed
        lRet = RegCloseKey(hKey)
    End If

You can find the key value of Matlab after you have installed it and open the registry.

Another method is that you create a matlab object, if there is an error, it means that it is not installed on the machine
Reply

Use magic Report

0

Threads

10

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 United States

Post time: 2020-7-4 05:45:02
| Show all posts
It is said that we should start with the registration form.
Reply

Use magic Report

0

Threads

4

Posts

68.00

Credits

Credits
68.00

 China

Post time: 2020-7-4 09:55:44
| Show all posts
siyonggangpublished on 2020-6-30 09:30
Check whether there is a corresponding key value in the registry, give you an example of detecting whether excel is installed

Public Const HKEY_LOCAL_MACHINE As ...

Learned a trick, thank you!
Reply

Use magic Report

0

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-7-17 05:30:02
| Show all posts
According to the code on the second floor, if the system is installed with Excel, wouldn't it be considered that Excel is not installed?
Reply

Use magic Report

0

Threads

14

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

Post time: 2020-7-17 22:00:01
| Show all posts
Function install(ByVal exefilename As String) As String
On Error GoTo myerr
Dim WSH As Object
Set WSH = CreateObject("Wscript.Shell")
install = "<"&exefilename&"> was installed in "&WSH.RegRead("HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\App Paths\"&exepath&"\Path")
Set WSH = Nothing
Exit Function
myerr:
install = "<"&exefilename&"> was Not installed in my system"
End Function

Sub xxx()
MsgBox install("matlab.exe")
End Sub
Reply

Use magic Report

0

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-7-19 08:45:01
| Show all posts
The upstairs still doesn't solve the specific path problem in the registry. What if matlab.exe is a green software?
Reply

Use magic Report

0

Threads

6

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

Post time: 2020-7-20 11:15:01
| Show all posts
1 Check the registry entries of that program
2 Check the registry HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall for the anti-installation item of that program
3 View related items in the start menu
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list