Sign in to follow this  
Followers 0
chiners_68

Script x64 issue

6 posts in this topic

Hi Guys,

ive got a vbs script i want to change to autoit but first i have a problem with the vbs script you might be able to help me on.

At present i pull inventory information from PC's to a central access DB. The script works on XP & windows 7 32 bit but will not write to the DB when run on windows 7 64Bit.

anyone have ideas on why?

Share this post


Link to post
Share on other sites



Not too sure what your pulling but if it has to do with the registry then that might be a problem. Windows 7 64 bit isolates the 32 bit programs from the 64 bit registry. It is possible to see the 32 bit registry from the 64 bit one but I don't remember the path off the top of my head. I do know in the 64 bit version you go down somewhere into the SYSWOW64 part somewhere.

Share this post


Link to post
Share on other sites

Not too sure what your pulling but if it has to do with the registry then that might be a problem. Windows 7 64 bit isolates the 32 bit programs from the 64 bit registry. It is possible to see the 32 bit registry from the 64 bit one but I don't remember the path off the top of my head. I do know in the 64 bit version you go down somewhere into the SYSWOW64 part somewhere.

"HKLM\Software\Wow6432Node", "HKCR\Software\Wow6432Node"

These are the registry redirection paths you mentioned. SysWow64 is actually a different beast (a folder on 64-bit Windows' folder containing 32-bit binaries).

Share this post


Link to post
Share on other sites

Share this post


Link to post
Share on other sites

"HKLM\Software\Wow6432Node", "HKCR\Software\Wow6432Node"

These are the registry redirection paths you mentioned. SysWow64 is actually a different beast (a folder on 64-bit Windows' folder containing 32-bit binaries).

Ah that's it I knew it has Wow in it but for some reason kept wanting to say syswow. Thanks danielkza and I remember the syswow folder now.

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

i can get the script to Echo the wmi queries but having troublei with it not writing to the DB.

would it be related to

Set oConn = CreateObject("ADODB.Connection")

oConn.Provider="Microsoft.Jet.OLEDB.4.0"

code for writing to DB.

Sub InventoryUpdate

    If blnRunInv = True Then

        Set oConn = CreateObject("ADODB.Connection")
        oConn.Provider="Microsoft.Jet.OLEDB.4.0"
        oConn.Open strInvDatabase
        Set oRS = CreateObject("ADODB.RecordSet")
        oRS.open "Select * From PC", oConn, 2, 3
        Rem oRS.movefirst
        blnFoundMe = False

        While not oRS.EOF

            If ucase(oRS("MAC")) = ucase(strNetMAC) Then

                blnFoundMe = True
                    oRS("Host") = strHostName & ""
                    oRS("GUID") = strGUID & ""
                    oRS("Manufacturer") = strManufacturer & ""
                    oRS("Model") = strModel & ""
                    oRS("Serial") = strSerial & ""
                    oRS("CPU") = strCPUDescription & ""
                    oRS("CPUSpeed") = strCPUMaxClockSpeed & ""
                    oRS("RAM") = strRAM & ""
                    oRS("RAMSpeed") = strRAMSpeed & ""
                    oRS("RAMBanks") = strRAMBanks & ""
'                   oRS("RAMBanks2") = strRAMBanks2 & ""
'                   oRS("RAMBanks3") = strRAMBanks3 & ""
'                   oRS("RAMBanks4") = strRAMBanks4 & ""
                    oRS("HD1") = strHD1 & ""
                    oRS("HD2") = strHD2 & ""
                    oRS("CD") = strCD & ""
                    oRS("Printer") = strPrinter & ""
                    oRS("OS") = right(strOS,len(strOS) - 18) & ""
                    oRS("IE") = strIE & ""
                    oRS("Monitor1ID") = strMonitor1ID & ""
                    oRS("Monitor1Model") = strMonitor1Model & ""
                    oRS("Monitor1Serial") = strMonitor1Serial & ""
                    oRS("Monitor1Date") = strMonitor1Date & ""
                    oRS("Monitor2ID") = strMonitor2ID & ""
                    oRS("Monitor2Model") = strMonitor2Model & ""
                    oRS("Monitor2Serial") = strMonitor2Serial & ""
                    oRS("Monitor2Date") = strMonitor2Date & ""
                    oRS("LastUpdate") = Now

                oRS.update

            End If

            oRS.movenext

        Wend

        If not blnFoundMe Then

            oRS.addNew

                oRS("MAC") = strNetMAC & ""
                oRS("Host") = strHostName & ""
                oRS("GUID") = strGUID & ""
                oRS("Manufacturer") = strManufacturer & ""
                oRS("Model") = strModel & ""
                oRS("Serial") = strSerial & ""
                oRS("CPU") = strCPUDescription & ""
                oRS("CPUSpeed") = strCPUMaxClockSpeed & ""
                oRS("RAM") = strRAM & ""
                oRS("RAMSpeed") = strRAMSpeed & ""
                oRS("RAMBanks") = strRAMBanks & ""
'               oRS("RAMBanks2") = strRAMBanks2 & ""
'               oRS("RAMBanks3") = strRAMBanks3 & ""
'               oRS("RAMBanks4") = strRAMBanks4 & ""
                oRS("HD1") =  strHD1 & ""
                oRS("HD2") = strHD2 & ""
                oRS("CD") = strCD & ""
                oRS("Printer") = strPrinter & ""
                oRS("OS") = right(strOS,len(strOS) - 18) & ""
                oRS("IE") = strIE & ""
                oRS("Monitor1Model") = strMonitor1Model & ""
                oRS("Monitor1Serial") = strMonitor1Serial & ""
                oRS("Monitor1Date") = strMonitor1Date & ""
                oRS("Monitor1ID") = strMonitor1ID & ""
                oRS("Monitor2Model") = strMonitor2Model & ""
                oRS("Monitor2Serial") = strMonitor2Serial & ""
                oRS("Monitor2Date") = strMonitor2Date & ""
                oRS("Monitor2ID") = strMonitor2ID & ""
                oRS("LastUpdate") = Now

            oRS.update

        End If

        oRS.close
        oConn.Close
        Set oRS = Nothing
        Set oConn = Nothing

    End If

End Sub

are these different for 64bit os.

Edited by chiners_68

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0