locked
Changing permissions Command in Task Sequence RRS feed

  • Question

  • I am trying to change permissions on a folder running a command line in the task sequence.

    Run Command Line: cmd /c icacls "%ProgramFiles%\test" /grant users:F /t

    I can see it running but no permossion changed. Same line works manually.

    Thanks for the help.

    Thursday, December 12, 2013 7:46 PM

All replies

  • Where in the TS are you running the command-line?

    Are you deploying a 64-bit OS?

    If so, the TS engine is a 32-bit process and thus %ProgramFiles% = C;\Program Files (x86)".

    To overcome this, use the 64-bit version of icacls (also, no reason to use cmd as icacls is an executable). You command-line in your run-command task should be:

    %windir%\sysnative\icacls "%ProgramFiles%\test" /grant users:F /t

    Alternatively, you could just use C:\Program Files in your command-line instead of relying on the environment variable.

    More info on Sysnative: http://support.microsoft.com/kb/942589


    Jason | http://blog.configmgrftw.com

    Thursday, December 12, 2013 10:16 PM