I have a client who has just emailed me a VBS and asked me to convert it into a GPO. My experience with VB is pretty much 0, so this looks chinese to me. Could someone give me a hand as to what would be required to translate this into a GPO?
Option Explicit
on error resume next
dim strEnviroNew, strEnviroOld
Dim WshShell, OsType, objReg
dim registry, strServer
dim result
Dim strComputer, OsResult
dim strKeyPath, strValueName, strValue
Const HKEY_LOCAL_MACHINE = &H80000002
const REG_KEY_PATH = "HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\ODBC\ODBC.INI\ODBC Data Sources"
strServer = "canauth\authority"
Set WshShell = CreateObject("WScript.Shell")
strServer = "adm-auth-test\authtest"
CreateOdbc("authcantest")
CreateOdbc("authcandev")
CreateOdbc("authcantrain")
CreateOdbc("authcanconv")
CreateOdbc("authngtest")
strServer = "canauth\authority"
CreateOdbc("authcanlive")
CreateOdbc("authnglive")
wscript.quit
Function CreateOdbc(strEnviroNew)
Dim objReg
Dim strComputer
dim strKeyPath, strValueName, strValue
strComputer = "."
Set objReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\default:StdRegProv")
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.
Hi All,
I have a client who has just emailed me a VBS and asked me to convert it into a GPO. My experience with VB is pretty much 0, so this looks chinese to me. Could someone give me a hand as to what would be required to translate this into a GPO?
Share this post
Link to post
Share on other sites