Indigo Rose Software

Professional Software Development Tools

 
Page 1 of 2 1 2 LastLast
Results 1 to 15 of 19
  1. #1
    Join Date
    Oct 2001
    Location
    Norway
    Posts
    939

    REG_MULTI_SZ values

    The help doc tells: "For values of type REG_MULTI_SZ, a string will be returned where each registry entry string is separated by a "|" character."

    I have difficulties with reading these kinds of values; my SUF70 app (v7.0.2.0) only reads the first string. (I have WinXP Pros SP2).


  2. #2
    Join Date
    Oct 2001
    Location
    Norway
    Posts
    939
    BTW, the value I'm looking for is "PendingFileRenameOperations". When I try the 'Import Regystry value' feature, the same thing occurs: Only the first line of the data is imported. (I have always three lines after a reboot (one file and two directories).
    Last edited by csd214; 03-03-2005 at 09:18 AM.

  3. #3
    SUF6NEWBIE Guest
    I have tested the reading and writing of value 'PendingFileRenameOperations' and using the 'import registry value' advanced function or import reg file and all appears correct at my end..the full string is being read into action
    editor and correct registry entries are written OK when App is run.

    displaying in a dialogbox displays the full string as mentioned in the help docs.

    Not sure what\how you have attempted actions at your end


    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Contro l\Session Manager]

    "PendingFileRenameOperations"= yada|yada|yada
    Last edited by SUF6NEWBIE; 03-04-2005 at 11:16 AM.

  4. #4
    Join Date
    Oct 2001
    Location
    Norway
    Posts
    939
    Unbelievable!

    A Registry view displays:
    \??\C:\WINDOWS\System32\spool\drivers\W32X86\2\Old \1\ppbint.ini

    \??\C:\WINDOWS\System32\spool\drivers\W32X86\2\Old \1

    \??\C:\WINDOWS\System32\spool\drivers\W32X86\2\Old

    -------
    My app shows:

    To be deleted on reboot:
    \??\C:\WINDOWS\System32\spool\drivers\W32X86\2\Old \1\ppbint.ini
    LEN of string: 63
    Right 10 chars: ppbint.ini

    I use this
    Code:
    lsValue = "PendingFileRenameOperations";
    lsData = Registry.GetValue(HKEY_LOCAL_MACHINE, lsRegKey, lsValue, true);
    
    Debug.Clear();
    Debug.Print("To be deleted on reboot:\r\n");
    Debug.Print(lsData.."\r\n");
    Debug.ShowWindow(true);
    
    lnLen = String.Length(lsData);
    Debug.Print("LEN of string: "..lnLen.."\r\n")
    lsRight10 = String.Right(lsData, 10);
    Debug.Print("Right 10 chars: "..lsRight10.."\r\n");
    What's wrong with my computer (or me...)

  5. #5
    SUF6NEWBIE Guest
    Starting to wonder if there is something 'wrong' with your installation
    or settings in SUF7...

    If all else fails it may be worth the effort to Completely Uninstall SUF7..
    and allow the removal of 'preferences etc..Restart the Computor
    and fresh install Suf7..do not change any default settings..then install
    the 7020 update..then setup preferences etc, sounds dramatic however...
    Last edited by SUF6NEWBIE; 03-04-2005 at 11:37 AM.

  6. #6
    Join Date
    Oct 2001
    Location
    Norway
    Posts
    939
    Quote Originally Posted by SUF6NEWBIE
    Starting to wonder if there is something 'wrong' with your installation
    or settings in SUF7...
    Yes, I'm wondering... (Don't "ask" me to format the C-drive.)

    Problem#1: On Shutdown was skipped, caused me som hours of working; but was my own fault not observerving the error code #5.
    Problem#2: Screen.End() etc; an SUF70 internal incompability; but you solved the problem.
    Problem#3: The buttons in a multilingual app; I'm still not sure why.

    It is Friday evening local time; I have to pay some attention to my dear wife. Maybe tomorrow...

  7. #7
    SUF6NEWBIE Guest
    ..its past my bedtime...18 holes of golf to play tomorrow..

    Formula 1 GP in Melbourne this weekend ..gonna watch it !!!

  8. #8
    Join Date
    Oct 2001
    Location
    Norway
    Posts
    939
    I have NOT reinstalled SUF70. It has turned out that my problem #1-#3 was NOT caused by a faulty installation. My problem; or challenge; #4 is still unresolved:

    I ran a SUF70 setup with File.DeleteOnReboot. These lines were properly added to "PendingFileRenameOperations". Registry view:
    \??\C:\WINDOWS\Test Quick Launch\uninstall.exe

    \??\C:\WINDOWS\Test Quick Launch\Setup Log.txt

    \??\C:\WINDOWS\Test Quick Launch\Uninstall Log.txt

    \??\C:\WINDOWS\Test Quick Launch

    My SUF70 app "Reverse Delete On Reboot" still displayed the first line only. If I manually delete the "Test Quick Launch" lines, I get a system warning:

    Data of type REG_MULTI_SZ cannot contain empty strings. Registry Editor will remove all empty strings found.

    The registry view changes to
    \??\C:\WINDOWS\System32\spool\drivers\W32X86\2\Old \1\ppbint.ini
    \??\C:\WINDOWS\System32\spool\drivers\W32X86\2\Old \1
    \??\C:\WINDOWS\System32\spool\drivers\W32X86\2\Old


    Now my app reads
    To be deleted on reboot:
    \??\C:\WINDOWS\System32\spool\drivers\W32X86\2\Old \1\ppbint.ini|\??\C:\WINDOWS\System32\spool\driver s\W32X86\2\Old\1|\??\C:\WINDOWS\System32\spool\dri vers\W32X86\2\Old
    LEN of string: 167
    Right 10 chars: 2X86\2\Old

    but the delete on reboot will NOT be executed.

    To eliminate the effect of local settings, I changed the locale to English (US) (and I have WinXP Pro SP2 English). The same result occurred.

    I have no problem with other REG_MULTI_SZ values. "ObUnsecureGlobalNames" in HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\kernel shows up like this:
    netfxcustomperfcounters.1.0|SharedPerfIPCBlock|Cor _Private_IPCBlock
    LEN of string: 67
    Right 10 chars: e_IPCBlock
    The string separator is ASCII 124 as the help doc states.

    So far, SUF6NEWBIE is the only person who has told me about successful reading of "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager", Value "PendingFileRenameOperations". I should appreciate other reports from forum members out there. I have attached the sf7 project (you need to have the latest version of SUF70 v7.0.2.0 installed), or you can download a prebuild exe; ready to run; here (zip file).

    No registry modification is done; just reading.

    TIA.

    (I need the "File.ReverseDeleteOnReboot" action in this scenario:
    The user runs Uninstall (with delete on reboot). Without rebooting, he runs the Setup. The next day he has no uninstaller!)

    SUF6NEWBIE, what happened with Michael Schumacher?

  9. #9
    Corey is offline Indigo Rose Staff Alumni
    Join Date
    Aug 2002
    Posts
    9,746
    18 holes of golf to play tomorrow...
    Sounds awesome! You're a lucky guy...

  10. #10
    Join Date
    Oct 2001
    Location
    Norway
    Posts
    939
    I forgot to tell; the project in post #8 includes SUF6NEWBIE's function Hex2Asc() (previously published). The function is handy if you want to read a registry value of type REG_BINARY. (I have just added enumeration of availabled CD-ROM drives; the function gets info about the devices.)

  11. #11
    Join Date
    Oct 2001
    Location
    Norway
    Posts
    939
    No body?

  12. #12
    SUF6NEWBIE Guest
    Ok ..what is occurring is that only the first 'line' of the value can be read
    "pendingfilerenameoperations"..under the below condition.

    so two filedeleteonreboot(TempLaunchFolder.."\\irsetup.ex e" ....) actions

    because of the way they are written to the registry(new line and blank line)

    this is usually done to ensure there is no overwriting of a previous entry and
    to keep them separate (regedit ..states spaces must be removed)..normal
    behaviour.

    you would need to change the way the action is written..
    potentially dangerous for correct operation...

    it all depends on the way the data was originally written..
    so, if it is written in standard multi_sz then can be read fine.

    this particular 'value' is treated differently by the OS and programs
    that write to it..I would not recommend getting fancy with string manipulation
    to work around it..I have actually done this in the past, however just
    not worth the effort etc.

    HTH
    Last edited by SUF6NEWBIE; 03-12-2005 at 01:18 AM.

  13. #13
    Join Date
    Oct 2001
    Location
    Norway
    Posts
    939
    SUF6NEWBIE, Thanks! You seem to be the only person who responds to my cry of distress. I'm working with a generic subroutine I want to use in several of my installers. If I'm not able to read the data properly, I can never go through with my project.

    you would need to change the way the action is written..
    potentially dangerous for correct operation...

    it all depends on the way the data was originally written..
    so, if it is written in standard multi_sz then can be read fine.
    I don't really understand. I use the standard action File.DeleteOnReboot() (and it works properly as it always has). I don't want to perform some potentially dangerous hocus-pocus stuff.

    I only need to READ the data:
    Registry.GetValue(HKEY_LOCAL_MACHINE, "SYSTEM\\CurrentControlSet\\Control\\Session Manager", "PendingFileRenameOperations", true);
    I'm NOT going to modify anything.

    The help doc tells, "For values of type REG_MULTI_SZ, a string will be returned where each registry entry string is separated by a "|" character.", but that is not true when reading this "special" (?) value.

    (If I manually remove the blank lines the items are not deleted at all on reboot.)

    I was hoping for an answer from the I.R. team; I imagined that my question was of common interest. If nobody can state a solution here, I'm going to post a support ticket (Are you listening Adam? ).

    BTW, I'm happy with your confirmation, SUF6NEWBIE, that my computer isn't unhealthy…

  14. #14
    SUF6NEWBIE Guest
    Yep, the way the data is written in 'pendingfilerenameoperations'
    determines wether you can read all data in it,
    for every action deletefileonreboot(...
    if there is already an entry in the Value, the 'next data is wrtten
    with a blank line and then the actual reboot action code

    ..if this is the case ..you can not Reliably Read every line or ALL data in the Value...
    (registry.getvalue..will not return all the data.)

    if the data is written in this format ........|.........| then all can be read.

    I do believe that this Value is a 'special case',

    ..you will notice that if you export the reg data it is 'written in hex' with an
    id code at the beginning...I would imagine there would be another way to
    achieve what you want and to be honest I'm not sure I know what you are
    trying to achieve. ?
    Last edited by SUF6NEWBIE; 03-12-2005 at 02:54 AM.

  15. #15
    SUF6NEWBIE Guest
    To put it another way..if you don't want to make your own entries,
    why do you need to Read it in the first place, you should know if the
    actions are present..if the value does not exist when you start your
    on reboot actions, and then if the value exists, you know whats up..

    I know one issue is if the User does something that causes another entry
    entry to be written to this value, or cause 'Value to be 'created by the OS.

    just thinking out load..
    Last edited by SUF6NEWBIE; 03-12-2005 at 03:11 AM.

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Reading Registry/Hex Values
    By Tux in forum AutoPlay Media Studio 5.0
    Replies: 3
    Last Post: 02-10-2004, 04:06 PM
  2. Replies: 4
    Last Post: 12-06-2003, 01:17 PM
  3. Echo values and search folders
    By tawi in forum Setup Factory 6.0
    Replies: 7
    Last Post: 07-23-2003, 08:30 AM
  4. Echo values of variables and search for folders
    By tawi in forum AutoPlay Media Studio 4.0
    Replies: 2
    Last Post: 07-21-2003, 06:57 AM

Posting Permissions

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