Announcement

Collapse
No announcement yet.

Registry settings for MS Access

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Registry settings for MS Access

    Hi. I have moved to Setup Factory from another installer. In the past I could set up a Registry edit to turn off the VBA warnings in MS Access. I don't seem to have something right now as it won't write to the registry with the code I'm using. If I delete the registry line for MS Access Security and run the installer it does not create or set it.

    Any suggestions? This was pasted from the Pre-Intall Actions. It is line 01, and 02

    Registry.CreateKey(HKEY_CURRENT_USER, "Software\Microsoft\Office\12\Access\Security" );
    Registry.SetValue(HKEY_CURRENT_USER, "Software\Microsoft\Office\12\Access\Security" , "VBAWarnings", "1", REG_DWORD);

  • #2
    You need to escape backslashes. This is mentioned many times in these forums, and you can also find this in the documentation and example code. Please see Scripting Guide > Variables > Types and Values > String.

    Code:
    Registry.CreateKey(HKEY_CURRENT_USER, "Software[b][highlight]\[/highlight]\[/b]Microsoft[b][highlight]\[/highlight]\[/b]Office[b][highlight]\[/highlight]\[/b]12[b][highlight]\[/highlight]\[/b]Access[b][highlight]\[/highlight]\[/b]Security" );
    Registry.SetValue(HKEY_CURRENT_USER, "Software[b][highlight]\[/highlight]\[/b]Microsoft[b][highlight]\[/highlight]\[/b]Office[b][highlight]\[/highlight]\[/b]12[b][highlight]\[/highlight]\[/b]Access[b][highlight]\[/highlight]\[/b]Security" , "VBAWarnings", "1", REG_DWORD);
    Ulrich

    Comment


    • #3
      Thanks

      Thanks. I had tried adding the extra backslashes to the first part but from the example I looked at I didn't realize I needed them each time there was a backslash. Thanks for the link to the Scripting Guide.

      Comment

      Working...
      X