Announcement

Collapse
No announcement yet.

Is program run as adminator?!

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

  • Is program run as adminator?!

    How can I Understand my Program run as program or run Normal?!


    Thanks in advance

  • #2
    AdminCheck.zip

    Comment


    • #3
      Originally posted by herrin View Post
      [ATTACH]n307215[/ATTACH]
      wow!
      it's interacting!

      if you have any time, please explain it!

      Comment


      • #4
        Code:
        user_info = System.GetUserInfo();
        if (not user_info.IsAdmin) then
            Dialog.Message("Warning", "You are not logged in with the appropriate permissions.");
        end

        Comment


        • #5
          Originally posted by startup View Post
          Code:
          user_info = System.GetUserInfo();
          if (not user_info.IsAdmin) then
          Dialog.Message("Warning", "You are not logged in with the appropriate permissions.");
          end
          WoW!

          This one is much smaller than the one herrin sent,
          thank you startup ...​​​​​​​

          Comment


          • #6
            You can thank the Free Manual Also
            https://www.indigorose.com/webhelp/t...o_Examples.htm

            Comment


            • #7
              Originally posted by herrin View Post
              [ATTACH]n307215[/ATTACH]
              Did I write this code? It looks really familiar.

              startup does your example also work with UAC when an administrative user is logged in, but the program is not started in elevated mode?
              The code that herrin sent is looking at the current privilege elevation level.
              Bas Groothedde
              Imagine Programming :: Blog

              AMS8 Plugins
              IMXLH Compiler

              Comment


              • #8
                Originally posted by Imagine Programming View Post
                Did I write this code? It looks really familiar.

                hi Bas

                I have been using it for some time but I do not remember where it was obtained from (I have the file in txt format)
                seen as it is structured it is surely your old example

                Comment


                • #9
                  Originally posted by herrin View Post


                  hi Bas

                  I have been using it for some time but I do not remember where it was obtained from (I have the file in txt format)
                  seen as it is structured it is surely your old example
                  Then you and I both cannot remember haha!
                  Bas Groothedde
                  Imagine Programming :: Blog

                  AMS8 Plugins
                  IMXLH Compiler

                  Comment


                  • #10
                    Thank's everyone ​​​​​​

                    How can open the any exe file with adminator?!

                    Comment


                    • #11

                      PHP Code:
                      Project  >  Setting  >  Advanced  >  Require Administrator 

                      Comment


                      • #12
                        Originally posted by herrin View Post
                        PHP Code:
                        Project Setting Advanced > Require Administrator 
                        Thanks, but I know this, my problem is that if the program was not opened by the administrator, it would reopen itself this way ...

                        Comment


                        • #13
                          you are a little confused

                          Comment


                          • #14
                            ok ip
                            can you try this code and share us results ?

                            Code:
                            Registry.SetValue(HKEY_LOCAL_MACHINE, "Software\\AdminTest", "test", "admin", REG_SZ);
                            reg = Registry.GetValue(HKEY_LOCAL_MACHINE, "Software\\AdminTest", "test", true);
                            if reg == "admin" then
                            Registry.DeleteKey(HKEY_LOCAL_MACHINE, "Software\\AdminTest");
                            else
                            Dialog.Message("Notice", "The Program must run as adminstrator", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
                            end

                            Comment

                            Working...
                            X