5 Replies Latest reply on Jul 9, 2017 11:06 AM by Steve Wright

    Setting login account to 'User'

    tays01s

      This is a 2nd try (1st: Setting a Runtime to 'User' ) to finding an answer.

       

      I have a solution where, before converting to a Runtime, stripped of Admin account, I need to clear user details and zero the license duration. Obviously I need to do this in it's Admin account. I then go to file options and change the login from 'Admin' to 'User'. All works fine. However, when the Runtime is being setup by 'Inno', the account still has the 'Admin' name. I presume this is because it's the last used name, despite the preferential name being set to 'User'. If the user overwrites 'User' all is well...........but of course they forget.

       

      Catch 22: Because after I zero the license duration, I can't actually get in as a User without a license and that would un-zero the license duration so I'd go in a circle.

       

      Any ideas how to solve this? I've looked at the Inno Script and I don't see an obvious place to set the account name.

        • 1. Re: Setting login account to 'User'
          Steve Wright

          Are you referring to the first time a runtime is opened, where it asks for the username? 
          That can normally be changed via preferences, it is stored in the registry, so once set it will re-use it on the same machine, until you manually change it.

           

          If so, via Inno setup you could add the following:

           

          [Registry]

          Root: HKCU; Subkey: Software\Filemaker\YourAppNameHere\15.0\Preferences; ValueName: User Name; ValueType: string; ValueData: "User"


          Obviously, with the relevant version number you are using for creating the runtime.

          • 2. Re: Setting login account to 'User'
            tays01s

            Yes, it literally where Inno is setting up the Runtime for the first time.

             

            1. Where in the Inno script should I insert this syntax?

             

            2. My source is this:

            Source: "Y:\Documents\Projects_own\FM\RTS\NST 64\App.exe"; DestDir: "{app}"; Flags: ignoreversion

            What part of this would I substitute for what part of this?

             

            [Registry]

            Root: HKCU; Subkey: Software\Filemaker\YourAppNameHere\15.0\Preferences; ValueName: User Name; ValueType: string; ValueData: "User"

            • 3. Re: Setting login account to 'User'
              Steve Wright

              You would insert it after the [Files] section

               

              i.e

               

              [Files]

              Source: "Y:\Documents\Projects_own\FM\RTS\NST 64\App.exe"; DestDir: "{app}"; Flags: ignoreversion

              ....

              ....

               

              [Registry]

              Root: HKCU; Subkey: Software\Filemaker\YourAppNameHere\15.0\Preferences; ValueName: User Name; ValueType: string; ValueData: "User"

               

              YourAppNameHere refers to the name you give to the runtime via Specify Solutions Options under Developer Utilites in FileMaker and is unrelated to the actual files / file paths, as such. 

               

              15.0 refers to the version of FileMaker used to build the runtime, so 14.0, 15.0 or 16.0 etc.

               

              That's all, when installed, the default user that shows in the login dialog will then be "User" for the runtime.

               

              1 of 1 people found this helpful
              • 4. Re: Setting login account to 'User'
                tays01s

                Being a pessimist, I still need to test this on the 32-bit versions in work .............but it worked perfectly on my 64-bit version.

                 

                Brilliant ! Thanks, Stephen

                • 5. Re: Setting login account to 'User'
                  Steve Wright

                  You're welcome,

                   

                  It's not 32/64 bit specific, so will work the same regardless.