| |
snoorkle29
Posts: 1
Score: 0
Joined: 5/23/2001
From: USA
Status: offline
|
i'm a newbe to vbscripting. My problem is that a network of computers need to change some settings without going to each computer manually. here is the code to do it in vb, but how can i get this to work if the network sysop doesn't want unfamilier executables running? Can it be done in vbscript? Here is some code that changes the regional settings through api calls in visual basic: '******************************************************** Private Const LOCALE_SSHORTDATE = &H1F Private Const WM_SETTINGCHANGE = &H1A Private Const HWND_BROADCAST = &HFFFF& Private Declare Function SetLocaleInfo Lib "kernel32" Alias "SetLocaleInfoA" (ByVal Locale As Long, ByVal LCType As Long, ByVal lpLCData As String) As Boolean Private Declare Function PostMessage Lib "user32" Alias "PostMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long Private Declare Function GetSystemDefaultLCID Lib "kernel32" () As Long Public Sub ConvertSysDate() Dim dwLCID As Long dwLCID = GetSystemDefaultLCID() If SetLocaleInfo(dwLCID, LOCALE_SSHORTDATE, "MM/dd/yyyy") = _ False Then Exit Sub End If PostMessage HWND_BROADCAST, WM_SETTINGCHANGE, 0, 0 End Sub
|
|