Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBS Logon Script not working in Windows 7 64bit

Status
Not open for further replies.

sxmont

IS-IT--Management
Sep 25, 2003
46
US
Hello,

Through Group Policy, I have a VBS script that tracks users login times and then logoff times and writes it too an Access database. However, this script is not running in Windows 7 64bit. I have tried some "things" but nothing is working properly.

I receive the following error:

Error: Data Source name not found and no default driver specified.

Code: 80004005
Source: Microsoft OLE DB Provider for ODBC Drivers.

Someone please help... :(
 
I still don't understand. It is a simple VBS but I do not know where I need to make the change to get this too work on Windows 7 64Bit systems.

Everything works properly on XP.
 
I beleive you can't write to an access db with Win7 64bit with Jet as there is only a 32bit driver. I'm not 100% positive on that though.
 
similar issue with SCCM Task Sequence running under 32 bit context on a 64 bit OS. if you want access to a 32 bit COM object you have to make sure your script is launched under a 32 bit context (or it relaunches itself under that context)

I Hear, I Forget
I See, I Remember
I Do, I Understand

Ronald McDonald
 
TO MrMovie,

How do I do what you suggest?
 
No, I don't think that is what I need. I read that.

My login script runs perfect in Windows XP. I am trying to get it to run in Windows 7 without changing the script too much...

WHY DOES MICROSOFT CHANGE THE LITTLEST THINGS!!! LOL

Frustration is setting in with this...
 
you can check if you script is running under a 32 bit / 64 bit context by checking some wshshell.expandenvironmentstrings varaibles. these will show you which context you are running under.
if you want to relaunch your script under a 32 bit context then you could read the fullname of the script, do a

intReturn = wshshell.run (%windir%\syswow64\cscript.exe £myscriptname.vbs £myparams, 1, True)
Wscript.Quit intReturn

you can check these env variables, the values of the which should indicate if you are 64bit under 64bit etc
strTemp1 = WshShell.ExpandEnvironmentStrings("%PROCESSOR_ARCHITECTURE%")
strTemp2 = WshShell.ExpandEnvironmentStrings("%PROCESSOR_ARCHITEW6432%")


an alternative to that would be just to force the script to be started under the 32 bit context, this would be done by starting the cscript.exe which is lurking in the syswow64 folder

I Hear, I Forget
I See, I Remember
I Do, I Understand

Ronald McDonald
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top