locked
SCCM 2012 - Legacy Packages to Application Packages RRS feed

  • Question

  • I'm creating a application packages in SCCM 2012 and the packages is .batch (.bat) files and I need approval request

    Is this possible a batch file can application packages

    Content of batch files script

    =====Execute.bat=========

    xcopy c:\DO\*.*  C:\GO\*.*

    ======================

    Thursday, July 18, 2013 8:22 AM

Answers

  • Will the C:\GO folder be there before the batch file runs? If not the presence of this folder could be your detection method.

    If ConfigMgr detects the folder it knows that the batch file has run successfully.



    Gerry Hampson | Blog: www.gerryhampsoncm.blogspot.ie | LinkedIn: Gerry Hampson | Twitter: @gerryhampson

    • Marked as answer by help.me Friday, July 19, 2013 7:07 AM
    Thursday, July 18, 2013 4:54 PM

All replies

  • Yes it's possible, but you need to create a detection method.

    for example, you can check whether a file exists or not.


    • Edited by Henrik_Dahl Thursday, July 18, 2013 8:48 AM added
    Thursday, July 18, 2013 8:46 AM
  • This can be done for sure. Just use a "script installer" deployment type. You only have to find out a way how to create the detection method (the existence of a file or folder yould be used for example).

    Torsten Meringer | http://www.mssccmfaq.de

    Thursday, July 18, 2013 8:48 AM
  • Thanks for the info

    What is the information I need to put  detecetion method ?  based from the sample packages.  Becuae I'm newbies  for this component

    Thursday, July 18, 2013 2:45 PM
  • You need to *detect* whether your command-line ran successfully. Thus, for a normal installation, you would check the Windows Installer database, a whether or file exists, or whether a registry value exists as examples.

    Without knowing what your batch files, only you can figure out how to detect whether it met its purpose or not.

    Also note, that Applications are necessarily the best way to run batch files if your intention is not to install an application but it all depends upon what you are doing.


    Jason | http://blog.configmgrftw.com

    Thursday, July 18, 2013 3:35 PM
  • Will the C:\GO folder be there before the batch file runs? If not the presence of this folder could be your detection method.

    If ConfigMgr detects the folder it knows that the batch file has run successfully.



    Gerry Hampson | Blog: www.gerryhampsoncm.blogspot.ie | LinkedIn: Gerry Hampson | Twitter: @gerryhampson

    • Marked as answer by help.me Friday, July 19, 2013 7:07 AM
    Thursday, July 18, 2013 4:54 PM