Announcement

Collapse
No announcement yet.

Unable run disk defrag on normal user account

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

  • Unable run disk defrag on normal user account

    Dear all,

    I have domain user account with users privilege and those those user account unable run disk defrag.

    I had check and understand that the only way is grant administrative privilege is allow to run.

    However I would not like to use this solution, is that another solution?

    Is there have any solution for use batch file with insert administrator and password with defrag command?

    OR

    Can I create Automate Task with defrag batch and deploy with GPO?

  • #2
    Re: Unable run disk defrag on normal user account

    defrag.exe is scriptable, so yes you can create a batch file to run it. Google will tell you how to create a scheduled task at the command line.

    If you want it to be run manually, you'll need something like an encrypted VBScript using runas to run the tool as an administrator. Or use something like lsrunase which takes an encrypted password as a parameter.

    Out of curiosity... why do you want your users to be running defrags? Is it purely because so far you've not been able to set them up to run automatically?
    Gareth Howells

    BSc (Hons), MBCS, MCP, MCDST, ICCE

    Any advice is given in good faith and without warranty.

    Please give reputation points if somebody has helped you.

    "For by now I could have stretched out my hand and struck you and your people with a plague that would have wiped you off the Earth." (Exodus 9:15) - I could kill you with my thumb.

    "Everything that lives and moves will be food for you." (Genesis 9:3) - For every animal you don't eat, I'm going to eat three.

    Comment


    • #3
      Re: Unable run disk defrag on normal user account

      Hi gforceindustries,

      I able to create batch file and use command line to set AT.
      However, when I deploy with GPO it is unsuccess.
      AT wont created with normal user privilege account logon.

      My manager NOT allow me to grant administrative privilege to users account.
      Also he only allow to use MS Defrag.

      So I need advise to solve on this issue.

      Comment


      • #4
        Re: Unable run disk defrag on normal user account

        When creating scheduled tasks, don't forget to put a check in place to see if the task already exists, so that it isn't recreated. Would be interesting to see the performance impact of 20 defrag operations trying to run at once

        Originally posted by kynixtanls View Post
        I able to create batch file and use command line to set AT.
        However, when I deploy with GPO it is unsuccess.
        AT wont created with normal user privilege account logon.
        It should be a startup script not a logon script... logon scripts are for things that apply to users. Since this is something that applies to a computer it needs to be a startup script.

        Originally posted by kynixtanls View Post
        My manager NOT allow me to grant administrative privilege to users account.
        Good. That would be a very bad idea.

        Originally posted by kynixtanls View Post
        Also he only allow to use MS Defrag.
        I've never seen any point in using anything other unless you need the "advanced" features they offer such as central monitoring.
        Gareth Howells

        BSc (Hons), MBCS, MCP, MCDST, ICCE

        Any advice is given in good faith and without warranty.

        Please give reputation points if somebody has helped you.

        "For by now I could have stretched out my hand and struck you and your people with a plague that would have wiped you off the Earth." (Exodus 9:15) - I could kill you with my thumb.

        "Everything that lives and moves will be food for you." (Genesis 9:3) - For every animal you don't eat, I'm going to eat three.

        Comment


        • #5
          Re: Unable run disk defrag on normal user account

          Hi gforceindustries,

          The batch file already in the startup script.
          Still fail to create AT in normal user account.

          Just wonder is tat a way to allow user privilege account to run defrag?

          Comment


          • #6
            Re: Unable run disk defrag on normal user account

            No, it's a way to have it run automatically. It doesn't require any user interaction.
            Gareth Howells

            BSc (Hons), MBCS, MCP, MCDST, ICCE

            Any advice is given in good faith and without warranty.

            Please give reputation points if somebody has helped you.

            "For by now I could have stretched out my hand and struck you and your people with a plague that would have wiped you off the Earth." (Exodus 9:15) - I could kill you with my thumb.

            "Everything that lives and moves will be food for you." (Genesis 9:3) - For every animal you don't eat, I'm going to eat three.

            Comment


            • #7
              Re: Unable run disk defrag on normal user account

              Hi gforceindustries,

              Now I the only method i think of is create a schedule task manually on client machine which user logon with Users privilege account.

              In schedule task, there will have a security option to input user account administrators privilege.

              However, this methid is set manually in each PCs.
              My environment have at least 600 units.

              So I may need a better method.
              If you have any Idea, kindly advise me.

              Comment


              • #8
                Re: Unable run disk defrag on normal user account

                schtasks.exe
                Gareth Howells

                BSc (Hons), MBCS, MCP, MCDST, ICCE

                Any advice is given in good faith and without warranty.

                Please give reputation points if somebody has helped you.

                "For by now I could have stretched out my hand and struck you and your people with a plague that would have wiped you off the Earth." (Exodus 9:15) - I could kill you with my thumb.

                "Everything that lives and moves will be food for you." (Genesis 9:3) - For every animal you don't eat, I'm going to eat three.

                Comment

                Working...
                X