This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- How to get server time zone?
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Jan 30, 2013
11:37 PM
How to get server time zone?
Hi, I am now making an installer which needs to provide the UI for user input a server IP. And the request is to check the server time zone if is consistent with the local time zone.
How can I do that?
How can I do that?
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Feb 02, 2013
11:27 AM
hi you can write an custom action to retrive the time zone and then use it for further use.
Dim oWMIService, oComputer, colComputer
Dim strComputer
strComputer = “.”
Set oWMIService = GetObject(“winmgmts:” _
& “{impersonationLevel=impersonate}!\\” _
& strComputer & “\root\cimv2″)
Set colComputer = oWMIService.ExecQuery _
(“Select * from Win32_TimeZone”)
For Each oComputer in colComputer
msgbox oComputer.Description
Exit For
Next
Set oComputer = Nothing
Set colComputer = Nothing
Set oWMIService = Nothing
Dim oWMIService, oComputer, colComputer
Dim strComputer
strComputer = “.”
Set oWMIService = GetObject(“winmgmts:” _
& “{impersonationLevel=impersonate}!\\” _
& strComputer & “\root\cimv2″)
Set colComputer = oWMIService.ExecQuery _
(“Select * from Win32_TimeZone”)
For Each oComputer in colComputer
msgbox oComputer.Description
Exit For
Next
Set oComputer = Nothing
Set colComputer = Nothing
Set oWMIService = Nothing
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Feb 17, 2013
11:25 PM
CHANDINATHREDDY wrote:
hi you can write an custom action to retrive the time zone and then use it for further use.
Dim oWMIService, oComputer, colComputer
Dim strComputer
strComputer = “.”
Set oWMIService = GetObject(“winmgmts:” _
& “{impersonationLevel=impersonate}!\\” _
& strComputer & “\root\cimv2″)
Set colComputer = oWMIService.ExecQuery _
(“Select * from Win32_TimeZone”)
For Each oComputer in colComputer
msgbox oComputer.Description
Exit For
Next
Set oComputer = Nothing
Set colComputer = Nothing
Set oWMIService = Nothing
Is it using a vbs? How can I reference it?
![](/skins/images/D60DF682EA37BF37032955CE10F3F0BB/responsive_peak/images/icon_anonymous_message.png)