获取EXE文件安装后的路径

'WINRAR安装路径 Sub GetWINRARPath() Dim WSH As Object Set WSH = CreateObject("Wscript.Shell") MsgBox "WINRAR安装路径:" & WSH.RegRead("HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\App Paths\winrar.EXE\Path") End Sub 'EXCEL安装路径 Sub GetEXCELPath() Dim WSH As Object Set WSH = CreateObject("Wscript.Shell") MsgBox "EXCEL安装路径:" & WSH.RegRead("HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\App Paths\EXCEL.EXE\Path") End Sub

你可能感兴趣的:(windows,Excel,Microsoft)