Windows Vista reading vista registry...urgent

Discussion in 'Programming and Scripting' started by Unregistered, Mar 26, 2008.

  1. hello,
    i am facing a problem ad need an urgent solution....i wrote a shell script to read the registry to detect whether an activex control has been installed on a vista machine. the script is as follows:
    -------
    Option Explicit
    Dim WshShell, datePickerFileName,fso
    Const ForRead = 1
    On Error Resume Next

    Set WshShell = CreateObject("WScript.Shell")

    datePickerFileName = WshShell.RegRead("HKEY_CLASSES_ROOT\CLSID\{20DD1B9E-87C4-11D1-8BE3-0000F8754DA1}\InprocServer32\")

    If Err.number = 0 Then
    Set fso = CreateObject("Scripting.FileSystemObject")
    if Not fso.FileExists(datePickerFileName) Then
    MsgBox "Date Picker component is not found...Please install one.."
    Else
    MsgBox "Date picker Component exists ... No need to do anything"
    End if
    Set fso = Nothing
    Else
    MsgBox "Date Picker component is not found...Please install one.."

    End If

    Set WshShell = Nothing

    ------

    The problem that i am facing is that on reading the registry, Vista comes to know that i am reading the value of the activex component and it give me the pop up message: "". i dont want this pop up message to appear and i want to do it programmatically....how do i do the same?
     
  2. kemical

    kemical Windows Forum Admin
    Staff Member Premium Supporter Microsoft MVP

    Joined:
    Aug 28, 2007
    Messages:
    31,789
    Likes Received:
    1,563
    To be honest I haven't got a clue.. I think your just showing off myself :rolleyes:... Have you tried 'googling'?
     
  3. superbill

    superbill New Member

    Joined:
    Feb 6, 2008
    Messages:
    774
    Likes Received:
    1
    Hi



    Found this on a Google!


    After having a look at the code, I find that the Create member function of CLogin tries to create an ActiveX control with CLSID “{20DD1B9E-87C4-11D1-8BE3-0000F8754DA1}â€Â￾, thus, you should make sure that this ActiveX control is properly registered on the system.

    All registered ActiveX control CLSIDs are stored under “HKEY_CLASSES_ROOT\CLSIDâ€Â￾, if this ActiveX control is registered, there will be a register key “HKEY_CLASSES_ROOT\CLSID\ {20DD1B9E-87C4-11D1-8BE3-0000F8754DA1}â€Â￾.

    Because this ActiveX control has been registered on your Windows 2000 system, thus, it works well. However, it hasn’t been registered on your Windows XP System, thus, it won’t work well.

    The project seems to act as an ActiveX container, thus, I suggest you modify the clsid member of CLogin to any existing ActiveX control CLSID.

    On the usage of CreateControl function, you can refer to
    http://msdn2.microsoft.com/en-us/library/2wyzh77w.aspx

    Hope this helps! Didn't understand any of it!!!!!!!!!!!!
     
  4. kemical

    kemical Windows Forum Admin
    Staff Member Premium Supporter Microsoft MVP

    Joined:
    Aug 28, 2007
    Messages:
    31,789
    Likes Received:
    1,563
    Nice find superbill!
     
  5. Celestra

    Celestra Former Moderator

    Joined:
    Jan 15, 2008
    Messages:
    2,468
    Likes Received:
    14
    Hi!! I personally wouldn't go to all that trouble to find an Active X. Usually my security finds anything wandering around in my system. I installed a program to clean out things like that, along with bad file paths and assorted etc. Just hit a button and all that stuff is taken care of.
     
  6. asta-la-vista

    asta-la-vista New Member

    Joined:
    Mar 29, 2008
    Messages:
    8
    Likes Received:
    0
    Simple antidote...beg, borrow, steal (suggest pay) for UniBlue PowerSuite. It is the ultimate in system maintenance apps. If something has been changed, added or corrupted on your PC, this cerebrally-oriented prog will not only detect it, but fix it. Check this link: www.UniBluesoftware.com
     

Share This Page

Loading...