Creating an APPX or MSIX for a Batch file

%3CLINGO-SUB%20id%3D%22lingo-sub-2899007%22%20slang%3D%22en-US%22%3ECreating%20an%20APPX%20or%20MSIX%20for%20a%20Batch%20file%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2899007%22%20slang%3D%22en-US%22%3E%3CP%3ECan%20anyone%20suggest%20if%20an%20Appx%20or%20MSIX%20can%20be%20created%20to%20run%20a%20batch%20file.%20I%20am%20able%20to%20create%20a%20MSIX%20using%20MSIX%20packaging%20tool%20with%20code%20signing%20cert%20but%20when%20run%20on%20other%20machine%20it%20does%20not%20install%20this%20package.%26nbsp%3B%20we%20need%20to%20install%20this%20cert%20on%20both%20Windows%2010%20and%20Hololens%20devices%20and%20MS%20suggested%20these%20are%20the%20only%20two%20options.%26nbsp%3B%3C%2FP%3E%3CP%3EInstall.cmd%3C%2FP%3E%3CP%3ECERTUTIL%20-f%20-p%20P%40ssword%20-importpfx%20%22%25~dp0CompanyPFX.pfx%22%20%26gt%3B%20C%3A%5CWindows%5Cimportedpfx.txt%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2901057%22%20slang%3D%22en-US%22%3ERe%3A%20Creating%20an%20APPX%20or%20MSIX%20for%20a%20Batch%20file%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2901057%22%20slang%3D%22en-US%22%3EWithout%20bothering%20to%20google%20the%20command%20myself%2C%20I'd%20guess%20that%20when%20you%20do%20you'll%20see%20command%20line%20options%20to%20let%20you%20place%20it%20in%20the%20correct%20store.%20The%20correct%20store%20is%20the%20System%20store%20and%20within%20there%20under%20Trusted%20Root%20Certificates.%20And%20I'd%20guess%20there%20is%20a%20missing%20%5C%20after%20dp0%20(assuming%20SCCM%2FMem).%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2901110%22%20slang%3D%22en-US%22%3ERe%3A%20Creating%20an%20APPX%20or%20MSIX%20for%20a%20Batch%20file%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2901110%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F146612%22%20target%3D%22_blank%22%3E%40TIMOTHY%20MANGAN%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E-%20Thanks%20for%20the%20response.%20I%20have%20verified%20with%20the%20batch%20file%20that%20in%20included%20in%20my%20post.%26nbsp%3B%20The%20batch%20file%20works%20fine%20but%20the%20when%20packages%20through%20MSIX%20packing%20tool%20the%20MSIX%20generated%20is%20not%20installing%20PFX%20certificate.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

Can anyone suggest if an Appx or MSIX can be created to run a batch file. I am able to create a MSIX using MSIX packaging tool with code signing cert but when run on other machine it does not install this package.  we need to install this cert on both Windows 10 and Hololens devices and MS suggested these are the only two options. 

Install.cmd

CERTUTIL -f -p P@ssword -importpfx "%~dp0CompanyPFX.pfx" > C:\Windows\importedpfx.txt

2 Replies
Without bothering to google the command myself, I'd guess that when you do you'll see command line options to let you place it in the correct store. The correct store is the System store and within there under Trusted Root Certificates. And I'd guess there is a missing \ after dp0 (assuming SCCM/Mem).

@TIMOTHY MANGAN 

- Thanks for the response. I have verified with the batch file that in included in my post.  The batch file works fine but the when packages through MSIX packing tool the MSIX generated is not installing PFX certificate.