Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.

REG_BINARY with srp_registry

Hey,
Is it possible to write a value to the registry of the type "REG_BINARY" with the srp_registry function?
Regards Ed Keeman

Comments

  • No. Only strings are supported right now. Supporting binary will require additional DLL stubs. The registry is also not the ideal place to store data these days. Microsoft asks developers to simply store files into the user's app data directory.
  • Thanks Kevin.
    We don't want to store data, we have OI.
    For automation we want to manage settings for office programs in the registry.
    In this case the settings are REG_BINARY type.

    Regards, Ed Keeman
  • I see. There should be a DLL_SRP_USER32 record in the SYSPROCS table with the DLL stubs we defined for the SRP_Registry module. You could use that to create new stubs that will allows you to pass raw binary data to the APIs. But it will require you to call all these APIs directly.

    If you would rather I added REG_BINARY support to SRP_Registry, then send me an email to make arrangements.
  • Hi Kevin,
    Sorry for late response.
    We made a workaround by importing a .reg file.
    But maybe in a new release it would be nice if SRP_REGISTRY could do the job.
    Our problem is/was with importing a big REG_BINARY

    [HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Common\MailSettings]
    "ComposeFontComplex"=hex:3c,68,74,6d,6c,3e,0d,0a,0d,0a,3c,68,65,61,64,3e,0d,0a,\
    3c,73,74,79,6c,65,3e,0d,0a,0d,0a,20,2f,2a,20,53,74,79,6c,65,20,44,65,66,69,\
    6e,69,74,69,6f,6e,73,20,2a,2f,0d,0a,20,73,70,61,6e,2e,50,65,72,73,6f,6f,6e,\
    6c,69,6a,6b,65,6f,70,6d,61,61,6b,73,74,69,6a,6c,0d,0a,09,7b,6d,73,6f,2d,73,\
    74,79,6c,65,2d,6e,61,6d,65,3a,22,50,65,72,73,6f,6f,6e,6c,69,6a,6b,65,20,6f,\
    70,6d,61,61,6b,73,74,69,6a,6c,22,3b,0d,0a,09,6d,73,6f,2d,73,74,79,6c,65,2d,\
    74,79,70,65,3a,70,65,72,73,6f,6e,61,6c,2d,63,6f,6d,70,6f,73,65,3b,0d,0a,09,\
    6d,73,6f,2d,73,74,79,6c,65,2d,6e,6f,73,68,6f,77,3a,79,65,73,3b,0d,0a,09,6d,\
    73,6f,2d,73,74,79,6c,65,2d,75,6e,68,69,64,65,3a,6e,6f,3b,0d,0a,09,6d,73,6f,\
    2d,61,6e,73,69,2d,66,6f,6e,74,2d,73,69,7a,65,3a,31,30,2e,30,70,74,3b,0d,0a,\
    09,6d,73,6f,2d,62,69,64,69,2d,66,6f,6e,74,2d,73,69,7a,65,3a,31,31,2e,30,70,\
    74,3b,0d,0a,09,66,6f,6e,74,2d,66,61,6d,69,6c,79,3a,22,43,61,6c,69,62,72,69,\
    22,2c,22,73,61,6e,73,2d,73,65,72,69,66,22,3b,0d,0a,09,6d,73,6f,2d,61,73,63,\
    69,69,2d,66,6f,6e,74,2d,66,61,6d,69,6c,79,3a,43,61,6c,69,62,72,69,3b,0d,0a,\
    09,6d,73,6f,2d,68,61,6e,73,69,2d,66,6f,6e,74,2d,66,61,6d,69,6c,79,3a,43,61,\
    6c,69,62,72,69,3b,0d,0a,09,6d,73,6f,2d,62,69,64,69,2d,66,6f,6e,74,2d,66,61,\
    6d,69,6c,79,3a,22,54,69,6d,65,73,20,4e,65,77,20,52,6f,6d,61,6e,22,3b,0d,0a,\
    09,6d,73,6f,2d,62,69,64,69,2d,74,68,65,6d,65,2d,66,6f,6e,74,3a,6d,69,6e,6f,\
    72,2d,62,69,64,69,3b,0d,0a,09,63,6f,6c,6f,72,3a,77,69,6e,64,6f,77,74,65,78,\
    74,3b,0d,0a,09,66,6f,6e,74,2d,77,65,69,67,68,74,3a,6e,6f,72,6d,61,6c,3b,0d,\
    0a,09,66,6f,6e,74,2d,73,74,79,6c,65,3a,6e,6f,72,6d,61,6c,3b,7d,0d,0a,2d,2d,\
    3e,0d,0a,3c,2f,73,74,79,6c,65,3e,0d,0a,3c,2f,68,65,61,64,3e,0d,0a,0d,0a,3c,\
    2f,68,74,6d,6c,3e,0d,0a
Sign In or Register to comment.