Announcement

Collapse
No announcement yet.

login script and admin privileges

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

  • login script and admin privileges

    i have sbs 2003 and i try to use a login script that need to install a exe file and few registry values

    the users dont have privileges to install the program and to modify the registry

    so please help me to run the login script(normal bat file) with administrator privileges
    and to hide the user and pass

  • #2
    Re: login script and admin privileges

    Can you run it as a start up script?
    Tom Jones
    MCT, MCSE (2000:Security & 2003), MCSA:Security & Messaging, MCDBA, MCDST, MCITP(EA, EMA, SA, EDA, ES, CS), MCTS, MCP, Sec+
    PhD, MSc, FIAP, MIITT
    IT Trainer / Consultant
    Ossian Ltd
    Scotland

    ** Remember to give credit where credit is due and leave reputation points where appropriate **

    Comment


    • #3
      Re: login script and admin privileges

      yes i can
      but the script run as the local user privileges and not as admin privileges

      and the user cant install the programs or change the registry

      Comment


      • #4
        Re: login script and admin privileges

        Start Up (not logon) scripts run under the local system account hence with more permissions than a user
        Tom Jones
        MCT, MCSE (2000:Security & 2003), MCSA:Security & Messaging, MCDBA, MCDST, MCITP(EA, EMA, SA, EDA, ES, CS), MCTS, MCP, Sec+
        PhD, MSc, FIAP, MIITT
        IT Trainer / Consultant
        Ossian Ltd
        Scotland

        ** Remember to give credit where credit is due and leave reputation points where appropriate **

        Comment


        • #5
          Re: login script and admin privileges

          http://forums.petri.com/showthread.php?t=18003

          Comment


          • #6
            Re: login script and admin privileges

            thanks for the replay
            i try the logon or login script and i need user privileges to install the exe files or registry changes

            i dont know if i should to use /u:"domain\user" /p:"password" in my scripts(the user and password will be show to all the users)

            so please please me to run a bat file for install a exe file the pc dont have a value in the reg

            Comment


            • #7
              Re: login script and admin privileges

              Use a STARTUP script, not a LOGON script like Tom suggested. There's a difference between the two.

              To configure a startup script use the Computer Configuration section, not the User Configuration section.
              Regards,
              Jeremy

              Network Consultant/Engineer
              Baltimore - Washington area and beyond
              www.gma-cpa.com

              Comment


              • #8
                Re: login script and admin privileges

                i think its not working
                i use startup and logon script -- same one
                but its not working as i wish
                if i run the script as admin from any pc its working


                NET USE P: \\my_server\Folder\latest_agent.exe
                P:


                ::---------------------------------------- Atera Agent Installation Script ---------------------------------------------
                :: |
                :: Copy the content of this file to your existing logon script or change your users script to this file path in AD |
                :: for more information: http://technet.microsoft.com/en-us/l...90(WS.10).aspx |
                :: |
                ::----------------------------------------------------------------------------------------------------------------------
                reg delete "hklm\software\ATERA Networks\AlphaAgent" /f
                reg query "hklm\software\ATERA Networks\AlphaAgent" && exit
                copy latest_agent.exe %TEMP%\latest_agent.exe
                %TEMP%\latest_agent.exe /sp- /verysilent /norestart
                reg add "hklm\software\ATERA Networks\AlphaAgent" /f /v IntegratorLogin /d "[email protected]"

                c:

                Comment


                • #9
                  Re: login script and admin privileges

                  I see a few problems with the script.

                  Issues in script:
                  1. mapping to a file instead of a directory
                  2. using a mapped drive in a startup script
                  3. no quotes around paths that might have spaces in them

                  Try this:

                  Code:
                  ::---------------------------------------- Atera Agent Installation Script ---------------------------------------------
                  :: |
                  :: Copy the content of this file to your existing logon script or change your users script to this file path in AD |
                  :: for more information: http://technet.microsoft.com/en-us/l...90(WS.10).aspx |
                  :: |
                  ::----------------------------------------------------------------------------------------------------------------------
                  reg delete "hklm\software\ATERA Networks\AlphaAgent" /f
                  reg query "hklm\software\ATERA Networks\AlphaAgent" && exit
                  copy "\\my_server\Folder\latest_agent.exe" "%TEMP%\latest_agent.exe"
                  "%TEMP%\latest_agent.exe" /sp- /verysilent /norestart
                  reg add "hklm\software\ATERA Networks\AlphaAgent" /f /v IntegratorLogin /d "[email protected]"
                  Regards,
                  Jeremy

                  Network Consultant/Engineer
                  Baltimore - Washington area and beyond
                  www.gma-cpa.com

                  Comment


                  • #10
                    Re: login script and admin privileges

                    sorry wrong C&P+edit
                    this is the logon script

                    NET USE P: \\my-server\folder\atera_agent

                    P:


                    ::---------------------------------------- Atera Agent Installation Script ---------------------------------------------
                    :: |
                    :: Copy the content of this file to your existing logon script or change your users script to this file path in AD |
                    :: for more information: http://technet.microsoft.com/en-us/l...90(WS.10).aspx |
                    :: |
                    ::----------------------------------------------------------------------------------------------------------------------
                    rem reg delete "hklm\software\ATERA Networks\AlphaAgent" /f
                    reg query "hklm\software\ATERA Networks\AlphaAgent" && exit
                    copy latest_agent.exe %TEMP%\latest_agent.exe
                    %TEMP%\latest_agent.exe /sp- /verysilent /norestart
                    reg add "hklm\software\ATERA Networks\AlphaAgent" /f /v IntegratorLogin /d "[email protected]"

                    c:
                    NET USE p: /delete /y

                    Comment


                    • #11
                      Re: login script and admin privileges

                      Since all the registry keys are "HKLM" and not "HKCU", there appears to be no difficulty about using it as a start up script except the mapped drive
                      If you changed the copy line to:
                      copy \my-server\folder\atera_agent\latest_agent.exe %TEMP%\latest_agent.exe
                      and deleted all lines referring to the P: drive, it should work OK

                      ::---------------------------------------- Atera Agent Installation Script ---------------------------------------------
                      :: |
                      :: Copy the content of this file to your existing logon script or change your users script to this file path in AD |
                      :: for more information: http://technet.microsoft.com/en-us/l...90(WS.10).aspx |
                      :: |
                      ::----------------------------------------------------------------------------------------------------------------------
                      rem reg delete "hklm\software\ATERA Networks\AlphaAgent" /f
                      reg query "hklm\software\ATERA Networks\AlphaAgent" && exit
                      copy \my-server\folder\atera_agent\latest_agent.exe %TEMP%\latest_agent.exe
                      %TEMP%\latest_agent.exe /sp- /verysilent /norestart
                      reg add "hklm\software\ATERA Networks\AlphaAgent" /f /v IntegratorLogin /d "[email protected]"
                      Tom Jones
                      MCT, MCSE (2000:Security & 2003), MCSA:Security & Messaging, MCDBA, MCDST, MCITP(EA, EMA, SA, EDA, ES, CS), MCTS, MCP, Sec+
                      PhD, MSc, FIAP, MIITT
                      IT Trainer / Consultant
                      Ossian Ltd
                      Scotland

                      ** Remember to give credit where credit is due and leave reputation points where appropriate **

                      Comment

                      Working...
                      X