Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 6 of 6
  1. #1
    Join Date
    Nov 2003
    Posts
    35

    Registry.SetValue not working (Windows 98 & ME)

    We do a lot of development here which means we have to support older platforms, unfortunately. Registry.SetValue is not working in Windows 98 and Windows ME, at all (I havent' tested NT, but 2000 & XP are fine). SF 7.0.3.0

    %Customer% is a session variable set to: Software\\ABYC_2005_test


    Debug.SetTraceMode(true);
    Debug.ShowWindow(true);
    AcrobatReader="C:\\Program Files\\Adobe\\Acrobat 5.0\\Reader\\AcroRd32.exe";
    Registry.SetValue(HKEY_CURRENT_USER, SessionVar.Expand("%Customer%"), "AcrobatExe", AcrobatReader, REG_SZ);
    Error=Application.GetLastError();
    Debug.Print("Error code output to debug window: "..Error);
    result = Registry.GetValue(HKEY_CURRENT_USER, SessionVar.Expand("%Customer%"), "AcrobatExe", true);
    Debug.Print("Registry entry: "..result);
    Last edited by markczajka; 07-01-2005 at 07:39 AM.

  2. #2
    Join Date
    Nov 2003
    Posts
    35

    Registry.CreateKey doesn't work either.

    Registry.CreateKey doesn't work either. It's not a permission problem under Win 98, as I can go in and manually create the key. All of the registry actions need to be looked at.

  3. #3
    Join Date
    Oct 2001
    Location
    Norway
    Posts
    939
    I tried a 7.0.2.0 installer on my old Win98 machine (4.10.2222A). Registry.SetValue worked as it should; both with existing key/value and with non-existing key/value.

    What error number do you get?

  4. #4
    Join Date
    Nov 2003
    Posts
    35
    error 1600 (when I try to create key) and 1608 (when I try to set value)

    Windows 98 ver. 4.10.222A SE - Setup Factory 7.0.3.0

    Tested on Windows NT (4.00.1381) - I can set values but I can't get them - I get an error.

    I am running these OS's on Vmware, but I never had problems with this with SF6. All logins are administrator.

    No problems on Windows 2000 & XP.



    Quote Originally Posted by csd214
    I tried a 7.0.2.0 installer on my old Win98 machine (4.10.2222A). Registry.SetValue worked as it should; both with existing key/value and with non-existing key/value.

    What error number do you get?

  5. #5
    Join Date
    Nov 2003
    Posts
    35

    workaround

    I've found a workaround, but the problem appears to be when I use SessionVar.Expand("%Customer%") within a Registry action, it's not working for these older operating systems. It doesn't work if if set this to a local variable then pass the local variable in either. It only works when I hard code the value "Software\\ABYC_2005_test" into the action.

  6. #6
    Join Date
    May 2000
    Location
    Indigo Rose Software
    Posts
    2,150
    One other thing to watch out for is backslashes in Windows 98. Lets say you had a script like this:

    MyFolder = "C:\\Folder\\";
    MyFile = "\\File.ext";

    And you did this:
    File.Open(MyFolder..MyFile, ect ect);

    Then this string would actually expand at runtime to:
    C:\\Folder\\\\File.ext";

    Which when you remove the double backslashes is:
    C:\Folder\\File.ext";

    NT based systems will simply ignore the extra backslash and the action would succeed. But a Windows 98 machine will error out on this because it does not recognize the \\ part.

    Adam Kapilik

Similar Threads

  1. INFO: JET and MDAC (Complete) Runtime Notes
    By Desmond in forum Setup Factory 6.0 Knowledge Base
    Replies: 0
    Last Post: 11-28-2003, 08:35 AM
  2. INFO: JET 4.0 SP7-SP8 Runtime Notes
    By Desmond in forum Setup Factory 6.0 Knowledge Base
    Replies: 0
    Last Post: 11-28-2003, 08:34 AM
  3. INFO: Setup Factory and the Windows Installer
    By Support in forum Setup Factory 6.0 Knowledge Base
    Replies: 0
    Last Post: 10-22-2002, 10:38 AM
  4. HOWTO: Install Files to the Windows Directory
    By Support in forum Setup Factory 6.0 Knowledge Base
    Replies: 0
    Last Post: 09-18-2002, 02:33 PM

Posting Permissions

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