none
Command line in my task sequence keeps failing with Incorrect Function RRS feed

  • Question

  • Hi,

    I am trying to us SCCM to run a command line locally on the target machine. The aim is to change over a registry permission with subinacl

    In SCCM i created a new task sequence. First step is to install the subinacl. this works fine. Secondly i run a command to change over the key. Here is when i run into trouble.

    In the TS i have for Command line : subinacl.exe /subkeyreg HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSLicensing /grant="USERS"=F
    as for the start in i have : C:\Program Files (x86)\Windows Resource Kits\Tools

    I know that this is where the subinacl is installed (tested and worked). The command line works fine if i manually type it in. It also works fine under the system account (tested this with psexec -i -s cmd.exe)

    Troubleshooting performed:

    - created a bat script with following command: "C:\Program Files (x86)\Windows Resource Kits\Tools\subinacl.exe" /subkeyreg HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSLicensing /grant="USERS"=F

    - tried multiple ways of quotes and single quotes in the command

    - created a package with the script in it and tried to run it.

    it fails over and over again. Very frustrating as i only try to RUN one little tiny command.

    Is it possible to use in TS the command line option to run a program on your target computer with parameters??

    I am not looking for workarrounds like using powershell or create another package with all your scripts in etc... Just running a single command via the task sequence.

    ANy help would be very much appreciated.

    Wednesday, December 28, 2011 7:10 AM

Answers

  • Is this a 64bit or a 32 bit windows 7

    Did you try the "disbale 64-bit file system redirection " ?

     

     

    • Marked as answer by Frits 82 Wednesday, December 28, 2011 9:33 PM
    Wednesday, December 28, 2011 8:07 AM

All replies

  • Is this a 64bit or a 32 bit windows 7

    Did you try the "disbale 64-bit file system redirection " ?

     

     

    • Marked as answer by Frits 82 Wednesday, December 28, 2011 9:33 PM
    Wednesday, December 28, 2011 8:07 AM
  • Have you tried creating a package with only subinacl.exe in it (or add it to an existing package, coulf be all the RK\tools), and then run a command line step where you choose that package, and run cmd.exe /c subinacl.exe /subkeyreg HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSLicensing /grant="USERS"=F


    leave start in blank, and disable x64 redirection


    Michael Petersen | My blogs: blog.coretech.dk/mip and SCUG.dk/ | Twitter: @OSDeploy | Linkedin: Michael Petersen
    Wednesday, December 28, 2011 1:27 PM
  • Hi Jeroenda,

    Thanks for your reply. I was certain that i tried this option before however i just tried again and this time it went trough. Thanks so much.

    Is there a proper guide on howto use the command line in the task sequence. I have been banging my head on the TS multiple times and i cannot find a proper guide or best practice to it. The Technet article is pretty vague as it does not have many real life examples.

    again thanks. you helped me big time.

    Wednesday, December 28, 2011 9:31 PM
  • Hi Michael,

    thanks for the response, Jeroenda provided the answer. I want to use the command line in the TS without the use of a package tho. Otherwise i wont be able to call up on any programs that need to be intsalled first via the cmd.

    Cheers

    Frits

    Wednesday, December 28, 2011 9:33 PM
  • I don't see an option to "Disable 64-bit file system redirection", however I have option to check "Run Installation and uninstall program as 32-bit process on 64-bit clients. Is that what I would check?
    Sunday, September 29, 2019 12:28 AM