vbscript для WiX

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
'Получение текущего разрешения экрана
'и запись в SCREENWIDTH и SCREENHEIGHT
Function GetScreenWidth()
Set objWMIService = GetObject("Winmgmts:\\.\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * From Win32_DesktopMonitor where DeviceID = 'DesktopMonitor1'",,0)
For Each objItem in colItems
intHorizontal = objItem.ScreenWidth
intVertical = objItem.ScreenHeight
Next
Session.Property("SCREENWIDTH") = "" & intHorizontal
Session.Property("SCREENHEIGHT") = "" & intVertical
End Function