Dan_ATR Posted September 10, 2014 Posted September 10, 2014 Hia, I am looking to try and make a package which has the odbc connection in and also the client for CMIS. I am going to push this via SCCM 2012. Has anyone done a package with an odbc connection before?
Oaktech Posted September 10, 2014 Posted September 10, 2014 Mate, there is a vbs script for odbc on the Elm server, steal that, modify it, and run it as a targeted logon script.
Dan_ATR Posted September 11, 2014 Author Posted September 11, 2014 Well this is the VBS code i am using and it just will not write to the registry. Im looking about as to why its not doing anything. Mean while, could anyone just pass there eye over this as it should be working but its not. Const HKEY_LOCAL_MACHINE = &H80000002 strComputer = "." Set objReg=GetObject("winmgmts:\\" & strComputer & "\root\default:StdRegProv") strKeyPath = "SOFTWARE\ODBC\ODBC.INI\ODBC Data Sources" strValueName = "Oak Academy CMIS" strValue = "SQL Server" objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue strKeyPath = "SOFTWARE\ODBC\ODBC.INI\Oak Academy CMIS" objReg.CreateKey HKEY_LOCAL_MACHINE,strKeyPath strKeyPath = "SOFTWARE\ODBC\ODBC.INI\Oak Academy CMIS" strValueName = "Database" strValue = "DATABASENAME" objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue strValueName = "Description" strValue = "ODBC Connection to Server" objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue strValueName = "Driver" strValue = "C:\WINDOWS\System32\SQLSRV32.dll" objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue strValueName = "LastUser" strValue = "USERNAME" objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue strValueName = "Server" strValue = "CMIS" objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
Dan_ATR Posted September 12, 2014 Author Posted September 12, 2014 The reason why it will not write is due to no admin permissions.
Arthur Posted September 12, 2014 Posted September 12, 2014 Well this is the VBS code i am using and it just will not write to the registry. Im looking about as to why its not doing anything. Mean while, could anyone just pass there eye over this as it should be working but its not. Use GPP to set the registry values (in a computer GPO) or run the VBS as a startup script.
Oaktech Posted September 12, 2014 Posted September 12, 2014 Have a look at the set acl rising stars gpo at elm - this uses set acl to set permissions on an individual registry key so you can give write perms to staff for a specific key.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now