1 Reply Latest reply: May 15, 2014 10:06 AM by Grant Perkins RSS

    Save your Runtime Parameter values

    Nick Osdale-Popa

      Here's a short bit of VBScript code that you can use to save your Runtime Parameter values to a .REG file that can easily be ported to another computer.

       

      Also helpful if you change computers and you have several saved parameters that you don't want to set up again.

      '===================

      Set objShell = CreateObject("WScript.Shell")

       

      strRegPath = Chr(34) & "HKCU\Software\Datawatch\Monarch Pro\Runtime Parameters" & Chr(34)

       

      strDate = Right("0" & DatePart("m",Now()),2) & Right("0" & DatePart("d",Now()),2) & DatePart("yyyy",Now())

       

      strFileName = Chr(34) & "U:\MonarchRegistry\" & strDate & "MonarchRuntime.reg" & Chr(34)

       

      strCommand = "cmd /c REG EXPORT " & strRegPath & " " & strFileName

       

      objShell.Run strCommand, 0, True

       

      MsgBox "Monarch Runtime Parameters saved to" & vbCrLf & strFilename,,"Monarch"

      '===================

      /code

       

      Just copy the above into notepad and save with the .VBS extension.

       

      It will datestamp the .REG file so if you need to restore old values, they can be easily imported.