locked
Incorrect Function error when using Run Command Line to run a .cmd file. RRS feed

  • Question

  • I'm trying to fully automate one of my company's deployments so that once the system PXE boots no further interaction is required.  The only thing left that requires user input is a dialogue box that pops up from McAfee's framework package installer (FramePkg.exe) which simply informs you that it has been installed.  The task sequence hangs here until you hit OK.  Currently we have an application that installs this and that works without issue, except there doesn't seem to be a way to suppress the dialogue box.

    In my testing for ways to get around this, I've found a command line (z:\somepath\Framepkg.exe /silent)  that will install it.  However if I use MDT's Run Command Line function in the task sequence and put in that function it errors out because it doesn't recognize /silent as a viable switch, it wants to use /quiet.  To get around that I have made a .cmd file with the command line to run and I've tried calling the .cmd file in the Run Command Line function.  However this errors out and gives an Incorrect Function code.  

    Things that I've tested:

    • Using /quiet in the silent install command for the MDT application.  FramePkg.exe doesn't accept that switch.
    • Using /silent in the silent install command for the MDT application.  MDT doesn't recognize that switch.
    • Making a .bat instead of a .cmd file.  Same error.
    • Copying all the files to the local system before running them.  Same errors.
    • Using cmd.exe /c in the Run Command Line function.  Same errors.
    • Trying cscript.exe in the Run Command Line function.  Same errors.
    • Enabling Continue on Error to see if it was a non-consequential error.  It was a consequential error.
    • Running the command as administrator
    • adding /wait to the command line
    • extracting an MSI file from the .exe and creating an application using msiexec with a /q switch (the other McAfee software that is installed use .msi files.)

    I'm at my wit's end with this.  If anyone has any suggestions or insight to share I'd really appreciate it.



    • Edited by Kvatch Tuesday, December 2, 2014 8:30 PM
    Tuesday, December 2, 2014 8:22 PM

All replies

  • Command line run can run any command line switches, it's not restricted to specific .cmd specific options. If you can type it in a command prompt, you can use it in a run command -- but you should be using an Application for organization and pathings sake.

    With that in mind you should be able to run a framepkg.exe /silent, keeping pathing in mind when running it, which brings me to another reason why you should be using an application -- you need to be able to path to where your framepkg.exe exists, either on your filer location or locally in the image.  MDT does not have the capability to know it's current location when using run commands. 

    Tuesday, December 2, 2014 8:36 PM
  • Originally I was trying to manipulate the application to accomplish this, figuring it was the most elegant solution.  Before I made any changes to it the "Quiet Install Command" in the application properties was just FramePkg.exe.  I tried putting /silent in that line.  When the task sequence got to that step it would error out with something to the effect of 'Unexpected Paramater "/Silent".'  I therefor tried /quiet but, as I expected, FramePkg.exe puts out an error saying it doesn't recognize that as a command.  Figuring that /silent was something MDT doesn't recognize and /quiet was something FramePkg.exe doesn't recognize, I transitioned to trying the batch file approach.

    With the Batch and .CMD files I have been thorough about making sure the path's are all correct.  While the task sequence is running opening a cmd prompt and entering the path to the .cmd file, exactly as it is entered into the MDT Run Command Line, works.   

    Tuesday, December 2, 2014 8:55 PM
  • So then in your BDD.log you should have the exact error you're getting.  If you could post those logs it would help me see exactly what's failing. MDT does not have any interaction with what you're running and has no knowledge of specific switches. The error you're getting back means either your command line is incorrect or your pathing is incorrect, and the logs will tell us exactly which it is.
    Tuesday, December 2, 2014 9:54 PM
  • http://www.itninja.com/software/mcafee/agent-11/4-2462

    One possibility


    Keith Garner - Principal Consultant [owner] - http://DeploymentLive.com

    Thursday, December 4, 2014 1:15 AM