<<Please correct me if I have posted this in the wrong place>>
The following is part of a GPO Login script that to creates a
new DSN connection for a SQL database, it goes to PCs in
a WAN, that are either XP Pro SP2 or Win2000 SP?.
It seems to error out on the 5th line, for some users, but when the
HelpDesk remotes in with admin account they can run the VBS fle
from explore and it works fine. The error says something about the
driver location, which I have checked on some Failed PCs, and it's there,
but hidden.
Can someone tell me a better way to write that line, or the whole
process??
and what might be the cause of an error like this, that only happens for
some users,
and then works for admin..
ALSO how can I create an IF THEN so that this wont attempt to run on PCs
where the DSN already exists???
THANK YOU !!!
Dim oWshShell
Const cRegKey1 = "HKLM\Software\ODBC\ODBC.INI\NewSQL\"
Const cRegKey2 = "HKLM\Software\ODBC\ODBC.INI\ODBC Data Sources\"
Set oWshShell = CreateObject ("WScript.Shell")
oWshShell.RegWrite cRegKey1 &
"Driver","C:\%systemroot%\System32\sqlsrv32.dll"