Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Results 1 to 8 of 8
  1. #1
    Join Date
    Jul 2009
    Posts
    11

    Trying to get ProductID value from Windows Registry

    I am evaluating Setup Factory. We need to get the ProductID value from the Windows registry for use in our registration routines. The following code works fine in Windows 32 but not for Vista 64:

    winreg = Registry.GetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion", "ProductId", true);

    What is the workaround to pull in this value on Win 64 systems?

    thanks,

    Howard

  2. #2
    Join Date
    Jan 2001
    Location
    Anderson Island, WA, USA
    Posts
    2,863
    This is a basic issue of x86 applications on x64 OS's. There are some things the applications imply does not have access to; even if you disable syswow redirection.

    Search the forums for "Registry64" -- I uploaded a script file that is a near drop in replacement for the built in Registry. object.


    (Click here to contact me)
    Providing Independent Professional Consulting Services for
    IndigoRose products, World Wide.
    Located in -8:00 (-7:00 DST) GMT Timezone (Western United States)

  3. #3
    Join Date
    Jul 2009
    Posts
    11

    Thanks, will give that a try!

    I will give that a try. Our employee with the 64 bit test system is off today...

    thanks!

    Howard

  4. #4
    Join Date
    Jul 2009
    Posts
    11

    I get an arror running the script

    On a 64bit system I get an error running the script (Registry64).

    It is from the line:

    cParam = AddBS( cParam ) .. cLine;

    The error message is:

    on startup, line 291, attempt to call global 'addBS' (a nil value)

    I assume it can't find the addBS function? Am I missing a script library or something?

    thanks,

    Howard

  5. #5
    Join Date
    Jan 2001
    Location
    Anderson Island, WA, USA
    Posts
    2,863
    Bummer, guess no one else has used it.
    Code:
    function AddBS( cPath )
      String.TrimRight(cPath,nil);
    	if String.Length(cPath) > 0 and String.Right(cPath,1) ~= "\\" then
      	cPath = cPath .. "\\"
    	end
      return cPath
    end


    (Click here to contact me)
    Providing Independent Professional Consulting Services for
    IndigoRose products, World Wide.
    Located in -8:00 (-7:00 DST) GMT Timezone (Western United States)

  6. #6
    Join Date
    Jul 2009
    Posts
    11

    Thanks, that worked

    I guess I am the tester than. That function worked.

    Howard

  7. #7
    Join Date
    Jan 2001
    Location
    Anderson Island, WA, USA
    Posts
    2,863
    That "AddBS()" function is part of a larger "toolkit" library I draw from.
    The Registry64.lua has seen some minor changes; but basically is used by several very well tested installers and used world wide.


    (Click here to contact me)
    Providing Independent Professional Consulting Services for
    IndigoRose products, World Wide.
    Located in -8:00 (-7:00 DST) GMT Timezone (Western United States)

  8. #8
    Join Date
    Jul 2009
    Posts
    11

    Great thanks,

    I appreciate your posting the registry64 code. I am evaluating Setup Factory and one of our requirements is to read/write from the registry to get the ProductID from the Windows install. Overall, I like what I see with the product! Much nicer to use than the Java based Installshield MultiPlatform I used before. Plus, I don't have to bundle a JVM with our install.

    Howard

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts