Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Results 1 to 10 of 10
  1. #1
    Join Date
    Apr 2005
    Location
    São Paulo, Brazil
    Posts
    2,440

    Wow64 Actions plugin

    Hello,

    I finished a new actions plugin, which can be used with AutoPlay Media Studio 7, Setup Factory 8, TrueUpdate 3 and Visual Patch 3. The purpose of this plugin is to access folders controlled by the File System Redirector and to read and write registry keys that are subject to Registry Redirection, on 64-bit operating systems. These functions can also be used on 32-bit operating systems.

    The following actions are included:
    • DisableFsRedirection: Disables file system redirection for the calling thread;
    • RevertFsRedirection: Restores file system redirection for the calling thread;
    • RegistryCreateKey: Creates a "key" in the user's Registry;
    • RegistryDeleteKey: Deletes a "key" from the user's Registry;
    • RegistryDeleteValue: Deletes a "value" from the user's Registry;
    • RegistryDoesKeyExist: Determines whether or not a particular Registry key exists;
    • RegistryGetKeyNames: Returns a table containing the names of all of the sub keys for a particular key;
    • RegistryGetValue: Returns a specific Registry value's data;
    • RegistryGetValueNames: Returns a table containing all the values within a specific sub key;
    • RegistryGetValueType: Returns a specific Registry value's type;
    • RegistrySetValue: Sets the data of a specific Registry value.
    All registry operations feature the RegistryView parameter, which allows to set KEY_WOW64_64KEY for operating on the 64-bit registry view, and KEY_WOW64_32KEY for operating on the 32-bit registry view.

    Documentation is included in the installer (here), but can also be downloaded separately from here. The source code for this plugin can be acquired for a very reasonable fee.

    Should there be any kind of trouble, please let me know.

    Ulrich
    Last edited by Ulrich; 07-24-2010 at 11:28 AM.

  2. #2
    Join Date
    Jan 2009
    Posts
    172
    Bug?

    On RegistrySetValue... if subkey not exist this action fail (not automatically create the subkey).

  3. #3
    Join Date
    Mar 2005
    Location
    WA 'wait a while' - Australia
    Posts
    864
    it should be standard coding practise to check for the Existance of a Key
    BEFORE any value manipulation my friend...

    if key path does not exist..create it, then do your value assignments
    Last edited by Eagle; 08-07-2010 at 04:55 PM.

  4. #4
    Join Date
    Mar 2005
    Location
    WA 'wait a while' - Australia
    Posts
    864
    Ulrich, cool plugin and thanks for your efforts and making it free for developers,

    however 'restricting' the 'development environment' with your latest installer
    will limit access to this plugin by a large number of IR software users.

    perhaps you could lift the installer restriction and have a notice screen stating
    the plugin can only be tested-used on WinXP x64 - Server 2003 (sp1) or later
    32\x64 OSs.

    Many still 'develop' create code on Win XP 32 bit.

    Will this cause issues for you ?
    tks for your time.
    Last edited by Eagle; 08-07-2010 at 05:12 PM.

  5. #5
    Join Date
    Jul 2009
    Posts
    5
    Quote Originally Posted by Ulrich View Post
    This plugin will not load on 32-bit Windows XP and earlier. Ulrich
    Really nothing you can think of for х32 OS?
    Such a convenient Installer, and so bad situation with x64 OS ...

  6. #6
    Join Date
    Apr 2005
    Location
    São Paulo, Brazil
    Posts
    2,440
    Update 1.0.1.0

    The plugin now features dynamic loading of API functions Wow64DisableWow64FsRedirection and Wow64RevertWow64FsRedirection, as well as replacement of the functions RegDeleteKeyEx and RegGetValue so the plugin can now be loaded on old operating systems like Windows 2000 and 32-bit Windows XP.

    Download here (or using the direct links in the original post).

    Ulrich
    Last edited by Ulrich; 08-09-2010 at 04:48 PM.

  7. #7
    Join Date
    Jan 2009
    Posts
    172
    Tested version 1.0.1.1 THANKS for update

    Works fine on Windows XP 32 and Windows 7 64.

    --Wow64.RevertFsRedirection() function not work corretly.

    Test with dialog.FolderBrowse.

    --Wow64.RegistrySetValue function fail if subkey not exist (for why not create automatically the subkey, like as AMS8?).

    --Wow64.RegistryDeleteKey ...with Registry view 64 bits-- always fail on delete specific keys, for example this:

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Curr entVersion\Installer\UserData\S-1-5-18\Products\09DC66AEECE5FF740A33F59A20E7CCCA

    This key is easy deleted manually (not is bloqued or acces denied).

    Thanks Ulrich

  8. #8
    Join Date
    Apr 2005
    Location
    São Paulo, Brazil
    Posts
    2,440
    Quote Originally Posted by Tomasin View Post
    --Wow64.RevertFsRedirection() function not work corretly.
    Test with dialog.FolderBrowse.
    The function works as intended. See the Lua code mentioned in the help fle that you can use as a skeleton for testing, where you can deploy a file into System32 when the file system direction is disabled, and upon repeating the same action afterwards with the direction restored, the file is deployed into SysWOW64 instead. This is what file direction does, and that is the only purpose of this function. It should be used for single operations, and should always be restored immediately. From Microsoft's documentation:

    To avoid these problems, disable file system redirection immediately before calls to specific file I/O functions (such as CreateFile) that must not be redirected, and re-enable file system redirection immediately afterward using Wow64RevertWow64FsRedirection.
    This plugin was designed to be used in installers build with Setup Factory, and updaters made with TrueUpdate or Visual Patch. Although it works with AutoPlay Media Studio, this is not the target audience, as end user applications should obey the file system restrictions, not work around them.

    Quote Originally Posted by Tomasin View Post
    --Wow64.RegistrySetValue function fail if subkey not exist (for why not create automatically the subkey, like as AMS8?).
    This is by design - and how the Windows API works. By using proper programming practices, you won't face any problem.

    Quote Originally Posted by Tomasin View Post
    --Wow64.RegistryDeleteKey ...with Registry view 64 bits-- always fail on delete specific keys, for example this:

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Curr entVersion\Installer\UserData\S-1-5-18\Products\09DC66AEECE5FF740A33F59A20E7CCCA
    This was fixed in release 1.0.1.2.

    Ulrich
    Last edited by Ulrich; 08-10-2010 at 07:36 PM.

  9. #9
    Join Date
    Jan 2009
    Posts
    172
    Hi

    It's possible add the function Wow64.RegistryGetAccess??

    This is very important because 64-bit systems the vast majority of keys are blocked.

    Please include this action.

    Thank you so much

  10. #10
    Join Date
    Jan 2009
    Posts
    172
    Hi

    Sorry but, not is possible add the function Wow64.RegistryGetAccess
    (¿RegGetKeySecurity?, ¿GetNamedSecurityInfo?, or ¿GetSecurityInfo?)

    Thanks!

Posting Permissions

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