Тема: WSH: немножко работаем с advertised shortcuts
Option Explicit
Dim strGUID_ProductCode
Dim strGUID_ComponentCode
Dim srtShortcutPath
Dim strTargetPath
With WScript.CreateObject("WindowsInstaller.Installer")
srtShortcutPath = "C:\Documents and Settings\All Users\Главное меню\Программы\Microsoft Office\Microsoft Office Word 2003.lnk"
'srtShortcutPath = "C:\Documents and Settings\All Users\Главное меню\Программы\Microsoft Office\Microsoft Office Excel 2003.lnk"
'srtShortcutPath = "C:\Documents and Settings\All Users\Главное меню\Программы\Microsoft Office\Microsoft Office Access 2003.lnk"
'srtShortcutPath = "C:\Documents and Settings\All Users\Главное меню\Программы\Skype\Skype.lnk"
With .ShortcutTarget(srtShortcutPath)
strGUID_ProductCode = .StringData(1)
strGUID_ComponentCode = .StringData(3)
End With
strTargetPath = .ComponentPath(strGUID_ProductCode, strGUID_ComponentCode)
WScript.Echo "Target path: ", strTargetPath
WScript.Echo "File version:", .FileVersion(strTargetPath)
End With
WScript.Quit 0
