Shortcut pointing to Batch script (.bat file) - PSF Tool not worked.

%3CLINGO-SUB%20id%3D%22lingo-sub-2688623%22%20slang%3D%22en-US%22%3EShortcut%20pointing%20to%20Batch%20script%20(.bat%20file)%20-%20PSF%20Tool%20not%20worked.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2688623%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20All%2C%3C%2FP%3E%3CP%3EScenario%3A%20I%20have%20an%20app%20with%20multiple%20shortcuts%2C%20in%20those%20one%20shortcut's%20Target%20is%20%22cmd.exe%22%20and%20argument%20is%20path%20of%20a%20batch%20script%20file(.bat%20file).%20I%20have%20tried%20to%20create%20MSIX%20package%20with%20the%20help%20of%20PSF%20Tool.%20while%20testing%20I%20am%20able%20to%20launch%20every%20shortcut%2C%20except%20this%20one%20(which%20has%20batch%20script).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20tried%20the%20below%20things%3A%3C%2FP%3E%3CP%3E1.%26nbsp%3BAs%20we%20know%20there%20is%20no%20communication%20between%20MSIX%20container%20and%20the%20native%20cmd.exe%20file%2C%20I%20have%20copied%20cmd.exe%20(which%20is%20not%20recommendable)%20file%20into%20msix%20package%20and%20tried%20to%20launch%20the%20shortcut.%20It%20didn't%20work.%3C%2FP%3E%3CP%3E2.%20In%20config.json%20file%2C%20replaced%20cmd.exe%20with%20the%20psflauncher.exe%20in%20place%20of%20target%2C%20which%20mean%20this%20psflauncher%20will%20call%20the%20.bat%20file%20to%20execute.%20It%20didn't%20work%3C%2FP%3E%3CP%3E3.%20In%20config.json%20file%2C%20placed%20.bat%20file%20path%20in%20Target%20place%20with%20out%20any%20arguments.%20It%20didn't%20work.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIs%20there%20any%20thing%20else%20to%20try%20other%20than%20above%2C%20please%20advise%20and%20guide.%3C%2FP%3E%3CP%3EThanks%20in%20Advance.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2688623%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EArguments%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EBatch%20Script%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Ecmd.exe%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EShortcut%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2695779%22%20slang%3D%22en-US%22%3ERe%3A%20Shortcut%20pointing%20to%20Batch%20script%20(.bat%20file)%20-%20PSF%20Tool%20not%20worked.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2695779%22%20slang%3D%22en-US%22%3EI%20assume%20from%20this%20%22PSF%20Tool%22%20here%20is%20PsfTooling%20and%20you%20are%20capturing%20an%20installer%20using%20the%20Microsoft%20MSIX%20Packaging%20Tool.%20PsfTooling%20should%20detect%20your%20shortcut%20to%20the%20cmd%20file%20and%20do%20everything%20for%20you.%3CBR%20%2F%3E%3CBR%20%2F%3EIf%20my%20assumption%20is%20correct%3A%20Can%20you%20share%20the%20contents%20of%20the%20cmd%20file%2C%20as%20well%20as%20the%20config.json%20file%3F%20If%20you%20don't%20want%20to%20post%20them%20here%2C%20reach%20out%20to%20me%20as%20tmangan%20%40%20tmurgent.com%3CBR%20%2F%3E%3CBR%20%2F%3EIf%20you%20are%20building%20a%20package%20in%20other%20ways%2C%20you'll%20need%20to%20provide%20those%20details.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2692894%22%20slang%3D%22en-US%22%3ERe%3A%20Shortcut%20pointing%20to%20Batch%20script%20(.bat%20file)%20-%20PSF%20Tool%20not%20worked.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2692894%22%20slang%3D%22en-US%22%3E%3CP%3ECan%20anyone%20help%20me%20on%20this%20situation.......frequently%20I%20am%20facing%20the%20scenario%2C%20where%20target%20has%20cmd.exe%20and%20argument%20has%20a%20.bat%20file%20or%20sometimes%20directly%20.bat%20file%20in%20target%2C%20there%20type%20of%20shortcuts%20were%20not%20working%20even%20with%20psf%20tool%20also.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2750503%22%20slang%3D%22en-US%22%3ERe%3A%20Shortcut%20pointing%20to%20Batch%20script%20(.bat%20file)%20-%20PSF%20Tool%20not%20worked.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2750503%22%20slang%3D%22en-US%22%3EHi%2C%20i%20am%20trying%20the%20same.%20Did%20you%20get%20it%20working%20already%3F%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2751625%22%20slang%3D%22en-US%22%3ERE%3A%20Shortcut%20pointing%20to%20Batch%20script%20(.bat%20file)%20-%20PSF%20Tool%20not%20worked.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2751625%22%20slang%3D%22en-US%22%3EHi%20%40%20Johan%20Pol%2C%20I%20didn't%20get%20any%20solution.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2752923%22%20slang%3D%22en-US%22%3ERE%3A%20Shortcut%20pointing%20to%20Batch%20script%20(.bat%20file)%20-%20PSF%20Tool%20not%20worked.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2752923%22%20slang%3D%22en-US%22%3EI%20got%20it%20working%20now.%20I%20guess%20it%20is%20a%20bug%2C%20but%20when%20you%20configures%20a%20startscript%20in%20the%20config.json%20it%20starts%20working.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2755534%22%20slang%3D%22en-US%22%3ERE%3A%20Shortcut%20pointing%20to%20Batch%20script%20(.bat%20file)%20-%20PSF%20Tool%20not%20worked.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2755534%22%20slang%3D%22en-US%22%3EHi%20%40%20Pollewops%3CBR%20%2F%3EIf%20possible%2C%20could%20you%20please%20paste%20or%20attach%20that%20config.json%20file%20for%20reference..%20I%20would%20like%20to%20try%20it.%3CBR%20%2F%3EThanks%20in%20Advance.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2756256%22%20slang%3D%22en-US%22%3ERE%3A%20Shortcut%20pointing%20to%20Batch%20script%20(.bat%20file)%20-%20PSF%20Tool%20not%20worked.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2756256%22%20slang%3D%22en-US%22%3E%3CP%3ETry%20this%20config.json%20file%20to%20start%20the%20test.bat%20file.%20Create%20a%20dummy%20AppLauncher.ps1%20and%20put%20that%20one%20in%20the%20root%20of%20the%20package.%3CBR%20%2F%3E%7B%3CBR%20%2F%3E%22applications%22%3A%20%5B%3CBR%20%2F%3E%7B%3CBR%20%2F%3E%22id%22%3A%20%22PSFLAUNCHERSIXFOUR%22%2C%3CBR%20%2F%3E%22executable%22%3A%20%22VFS%5C%5CProgramFilesX64%5C%5CTest%5C%5Ccmd.exe%22%2C%3CBR%20%2F%3E%22arguments%22%3A%20%22%5C%2Fc%20VFS%5C%5CProgramFilesX64%5C%5CTest%5C%5Ctest.bat%22%2C%3CBR%20%2F%3E%22workingDirectory%22%3A%20%22%22%2C%3CBR%20%2F%3E%22stopOnScriptError%22%3A%20true%2C%3CBR%20%2F%3E%22startScript%22%3A%3CBR%20%2F%3E%7B%3CBR%20%2F%3E%22scriptPath%22%3A%20%22AppLauncher.ps1%22%2C%3CBR%20%2F%3E%22scriptArguments%22%3A%20%22%22%2C%3CBR%20%2F%3E%22runInVirtualEnvironment%22%3A%20true%2C%3CBR%20%2F%3E%22showWindow%22%3A%20false%2C%3CBR%20%2F%3E%22waitForScriptToFinish%22%3A%20true%2C%3CBR%20%2F%3E%22runOnce%22%3A%20false%3CBR%20%2F%3E%7D%2C%3CBR%20%2F%3E%22endScript%22%3A%3CBR%20%2F%3E%7B%3CBR%20%2F%3E%22scriptPath%22%3A%20%22AppLauncher.ps1%22%2C%3CBR%20%2F%3E%22scriptArguments%22%3A%20%22%22%2C%3CBR%20%2F%3E%22runInVirtualEnvironment%22%3A%20true%2C%3CBR%20%2F%3E%22showWindow%22%3A%20false%2C%3CBR%20%2F%3E%22waitForScriptToFinish%22%3A%20true%2C%3CBR%20%2F%3E%22runOnce%22%3A%20false%3CBR%20%2F%3E%7D%3CBR%20%2F%3E%7D%3CBR%20%2F%3E%5D%3CBR%20%2F%3E%7D%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ei%20put%20the%20cmd.exe%20in%20the%20package.%20This%20to%20be%20able%20to%20start%20the%20script%20in%20the%20bubble.%20If%20i%20used%20c%3A%5Cwindows%5Csystem32%5Ccmd.exe%20it%20runs%20outside%20the%20bubble.%20Also%20to%20let%20the%20cmd.exe%20work%20correctly%2C%20a%20subfolder%20en-us%20with%20cmd.mui.exe%20is%20required.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%40tmangan%20is%20this%20expected%20behavior%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2757950%22%20slang%3D%22en-US%22%3ERE%3A%20Shortcut%20pointing%20to%20Batch%20script%20(.bat%20file)%20-%20PSF%20Tool%20not%20worked.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2757950%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1099635%22%20target%3D%22_blank%22%3E%40Siva116%3C%2FA%3E%26nbsp%3BIf%20you%20could%20post%20your%20bad%20version%2C%20that%20would%20be%20helpful.%26nbsp%3B%20I've%20been%20working%20on%20some%20PSF%20FRF%20issues%20seen%20in%20your%20Java%20App%20and%20plan%20to%20hit%20up%20scripting%20issues%20in%20the%20Launcher%20before%20releasing.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2758254%22%20slang%3D%22en-US%22%3ERE%3A%20Shortcut%20pointing%20to%20Batch%20script%20(.bat%20file)%20-%20PSF%20Tool%20not%20worked.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2758254%22%20slang%3D%22en-US%22%3EHi%20%40tmangan%2C%20i%20also%20today%20tried%20to%20create%20msix%20application.%20Before%20the%20exe%20starts%2C%20a%20java.exe%20version%20needs%20to%20start%20as%20startup%20script.%20I%20can%E2%80%99t%20get%20it%20working.%20Is%20something%20similar%20appears%20with%20you%3F%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2760321%22%20slang%3D%22en-US%22%3ERE%3A%20Shortcut%20pointing%20to%20Batch%20script%20(.bat%20file)%20-%20PSF%20Tool%20not%20worked.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2760321%22%20slang%3D%22en-US%22%3EGenerically%20Java%20shouldn't%20be%20a%20problem%2C%20however%20the%20app%20I%20mentioned%20was%20using%20a%201.4%20version%20of%20Java%20which%20has%20lots%20of%20problems.%20Once%20I%20clear%20out%20some%20other%20PSF%20issues%20I%20will%20be%20looking%20at%20scripting%20to%20see%20what%20is%20up.%20Generally%2C%20scripts%20are%20working%2C%20so%20posting%20specifics%20on%20problems%20is%20always%20helpful.%20%3CBR%20%2F%3ESo%20what%20version%20of%20Java%2C%20is%20it%20inside%20the%20package%20or%20locally%20installed%2C%20what%20does%20the%20script%20look%20like.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2767326%22%20slang%3D%22en-US%22%3ERE%3A%20Shortcut%20pointing%20to%20Batch%20script%20(.bat%20file)%20-%20PSF%20Tool%20not%20worked.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2767326%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%3Bthanks%20for%20your%20responses.....we%20have%20Zulu%20Java%201.8%20version%20installed%20in%20the%20package.%20The%20current%20config.json%20we%20use%20looks%20like%3A%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-json%22%3E%3CCODE%3E%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22applications%22%3A%20%5B%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22id%22%3A%20%22PSFLAUNCHERSIXFOUR%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22executable%22%3A%20%22c%3A%5C%5Cwindows%5C%5Csystem32%5C%5CWindowsPowerShell%5C%5Cv1.0%5C%5Cpowershell.exe%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22arguments%22%3A%20%22-ExecutionPolicy%20Bypass%20-Command%20%5C%22%26amp%3B%20%7BInvoke-CommandInDesktopPackage%20Test-0607.01-ENG_fg0t8wag126gc%20PSFLAUNCHERSIXFOUR%20cmd.exe%20'%5C%2Fc%20c%3A%5C%5Cprogra~1%5C%5CTest%5C%5CTest%5C%5Cbin%5C%5Crunclient.bat'%20-PreventBreakaway%7D%5C%22%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22workingDirectory%22%3A%20%22%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22stopOnScriptError%22%3A%20true%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22startScript%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22scriptPath%22%3A%20%22AppLauncher.ps1%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22scriptArguments%22%3A%20%22%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22runInVirtualEnvironment%22%3A%20true%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22showWindow%22%3A%20false%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22waitForScriptToFinish%22%3A%20true%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22runOnce%22%3A%20false%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22endScript%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22scriptPath%22%3A%20%22AppLauncher.ps1%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22scriptArguments%22%3A%20%22%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22runInVirtualEnvironment%22%3A%20true%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22showWindow%22%3A%20false%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22waitForScriptToFinish%22%3A%20true%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22runOnce%22%3A%20false%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%5D%0A%7D%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3EAppLauncher.ps1%20is%20just%20a%20dummy%20file%20since%20without%20a%20startScript%20it%20seems%20to%20fail.%3C%2FP%3E%3CP%3Erunclient.bat%20is%20a%20command%20file%20which%20starts%20the%20java.exe%20with%20arguments.%3C%2FP%3E%3CP%3EAbove%20seems%20to%20work%20although%20it%20looks%20terrible%20due%20to%20the%20popup%20boxes%20of%20PowerShell%20and%20CMD.%3C%2FP%3E%3CP%3EBut%20maybe%20you%20have%20some%20additional%20tips%20to%20make%20this%20easier%20configured.%20The%20final%20situation%20should%20be%20that%20the%20JAVA.EXE%20should%20be%20started%20in%20the%20bubble.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2767567%22%20slang%3D%22en-US%22%3ERE%3A%20Shortcut%20pointing%20to%20Batch%20script%20(.bat%20file)%20-%20PSF%20Tool%20not%20worked.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2767567%22%20slang%3D%22en-US%22%3EThanks%20for%20posting%20the%20json.%20I'm%20not%20sure%20why%20the%20main%20bat%20file%20is%20started%20via%20cmd%20inside%20a%20powershell%2C%20but%20the%20scripting%20portion%20looks%20fine.%20%3CBR%20%2F%3E%3CBR%20%2F%3EI%20am%20looking%20at%20this%20as%20a%20problem%20with%20the%20PSF%20scripting.%20I'll%20let%20you%20know%20when%20I%20have%20it%20sorted%20out%2C%20but%20a%20new%20version%20of%20PsfTooling%20to%20include%20the%20PSF%20update%20will%20be%20needed.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2768014%22%20slang%3D%22en-US%22%3ERE%3A%20Shortcut%20pointing%20to%20Batch%20script%20(.bat%20file)%20-%20PSF%20Tool%20not%20worked.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2768014%22%20slang%3D%22en-US%22%3EAny%20idea%20when%20new%20version%20is%20available%3F%20Or%20can%20i%20subscribe%20somewhere%20to%20get%20info%20about%20new%20version%3F%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2770171%22%20slang%3D%22en-US%22%3ERE%3A%20Shortcut%20pointing%20to%20Batch%20script%20(.bat%20file)%20-%20PSF%20Tool%20not%20worked.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2770171%22%20slang%3D%22en-US%22%3EI%20have%20a%20fix%20for%20the%20scripting%2C%20but%20it%20is%20part%20of%20a%20major%20PSF%20set%20of%20changes%20I've%20been%20working%20on%20to%20resolve%20a%20bunch%20of%20PSF%20issues.%20There%20is%20still%20one%20more%20issue%20that%20needs%20addressing%20(cross%20architecture%20processes)%20and%20a%20bunch%20of%20testing.%20Hopefully%20released%20around%20end%20of%20month.%20I'll%20update%20this%20thread%20as%20well%20as%20posting%20to%20my%20blog%20over%20on%20tmurgent.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2773216%22%20slang%3D%22en-US%22%3ERE%3A%20Shortcut%20pointing%20to%20Batch%20script%20(.bat%20file)%20-%20PSF%20Tool%20not%20worked.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2773216%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%3Brelated%20to%20your%20answer%2C%20you%20posted%3A%26nbsp%3B%3CSPAN%3EThanks%20for%20posting%20the%20json.%20I'm%20not%20sure%20why%20the%20main%20bat%20file%20is%20started%20via%20cmd%20inside%20a%20powershell%2C%20but%20the%20scripting%20portion%20looks%20fine.%3C%2FSPAN%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EIs%20there%20another%20way%20of%20starting%20the%20BAT%20file%2C%20which%20is%20located%20%3CU%3Ein%3C%2FU%3E%20the%20bubble%20and%20should%20be%20run%20%3CU%3Ein%3C%2FU%3E%20the%20bubble%3F%20This%20seems%20to%20be%20the%20only%20way%20we%20could%20find.%20Another%20way%20was%20to%20use%20CMD.exe%2C%20but%20then%20it%20works%20only%20when%20we%20used%20a%20cmd.exe%20copy%20added%20to%20the%20package.%20When%20we%20ran%20c%3A%5Cwindows%5Csystem32%5Ccmd.exe%20it%20seems%20the%20BAT%20file%20does%20not%20start%20%3CU%3Ein%3C%2FU%3E%20the%20bubble%2C%20but%20outside%20%3A(%3C%2Fimg%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2789811%22%20slang%3D%22en-US%22%3ERE%3A%20Shortcut%20pointing%20to%20Batch%20script%20(.bat%20file)%20-%20PSF%20Tool%20not%20worked.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2789811%22%20slang%3D%22en-US%22%3EMy%202021.09.26%20build%20of%20the%20PSF%20will%20now%20let%20you%20have%20PsfLauncher%20executable%20be%20a%20cmd%20or%20bat%20file%20that%20will%20run%20inside%20the%20container.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2789826%22%20slang%3D%22en-US%22%3ERE%3A%20Shortcut%20pointing%20to%20Batch%20script%20(.bat%20file)%20-%20PSF%20Tool%20not%20worked.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2789826%22%20slang%3D%22en-US%22%3EWauw%20you%20did%20made%20some%20important%20changes.%20Will%20test%20them%20hopefully%20tomorrow.%3CBR%20%2F%3ETHANKS%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2791140%22%20slang%3D%22en-US%22%3ERE%3A%20Shortcut%20pointing%20to%20Batch%20script%20(.bat%20file)%20-%20PSF%20Tool%20not%20worked.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2791140%22%20slang%3D%22en-US%22%3EThanks%20a%20lot%20%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%20for%20the%20updated%20version%20with%20fixes......%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2795011%22%20slang%3D%22en-US%22%3ERE%3A%20Shortcut%20pointing%20to%20Batch%20script%20(.bat%20file)%20-%20PSF%20Tool%20not%20worked.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2795011%22%20slang%3D%22en-US%22%3E%3CP%3ETested%20by%20colleague%20of%20mine%20and%20new%20psflauncher%20seems%20to%20work%20and%20BAT%2FCMD%20files%20can%20be%20started%20directly%20by%20psflauncher32.exe%20in%20json%20file%3C%2FP%3E%3C%2FLINGO-BODY%3E
Contributor

Hi All,

Scenario: I have an app with multiple shortcuts, in those one shortcut's Target is "cmd.exe" and argument is path of a batch script file(.bat file). I have tried to create MSIX package with the help of PSF Tool. while testing I am able to launch every shortcut, except this one (which has batch script).

 

I tried the below things:

1. As we know there is no communication between MSIX container and the native cmd.exe file, I have copied cmd.exe (which is not recommendable) file into msix package and tried to launch the shortcut. It didn't work.

2. In config.json file, replaced cmd.exe with the psflauncher.exe in place of target, which mean this psflauncher will call the .bat file to execute. It didn't work

3. In config.json file, placed .bat file path in Target place with out any arguments. It didn't work.

 

Is there any thing else to try other than above, please advise and guide.

Thanks in Advance.

 

 

22 Replies

Can anyone help me on this situation.......frequently I am facing the scenario, where target has cmd.exe and argument has a .bat file or sometimes directly .bat file in target, there type of shortcuts were not working even with psf tool also.

I assume from this "PSF Tool" here is PsfTooling and you are capturing an installer using the Microsoft MSIX Packaging Tool. PsfTooling should detect your shortcut to the cmd file and do everything for you.

If my assumption is correct: Can you share the contents of the cmd file, as well as the config.json file? If you don't want to post them here, reach out to me as tmangan @ tmurgent.com

If you are building a package in other ways, you'll need to provide those details.
Hi, i am trying the same. Did you get it working already?
Hi @ Johan Pol, I didn't get any solution.
I got it working now. I guess it is a bug, but when you configures a startscript in the config.json it starts working.
Hi @ Pollewops
If possible, could you please paste or attach that config.json file for reference.. I would like to try it.
Thanks in Advance.

Try this config.json file to start the test.bat file. Create a dummy AppLauncher.ps1 and put that one in the root of the package.
{
"applications": [
{
"id": "PSFLAUNCHERSIXFOUR",
"executable": "VFS\\ProgramFilesX64\\Test\\cmd.exe",
"arguments": "\/c VFS\\ProgramFilesX64\\Test\\test.bat",
"workingDirectory": "",
"stopOnScriptError": true,
"startScript":
{
"scriptPath": "AppLauncher.ps1",
"scriptArguments": "",
"runInVirtualEnvironment": true,
"showWindow": false,
"waitForScriptToFinish": true,
"runOnce": false
},
"endScript":
{
"scriptPath": "AppLauncher.ps1",
"scriptArguments": "",
"runInVirtualEnvironment": true,
"showWindow": false,
"waitForScriptToFinish": true,
"runOnce": false
}
}
]
}

 

i put the cmd.exe in the package. This to be able to start the script in the bubble. If i used c:\windows\system32\cmd.exe it runs outside the bubble. Also to let the cmd.exe work correctly, a subfolder en-us with cmd.mui.exe is required.

 

@tmangan is this expected behavior?

@Siva116 If you could post your bad version, that would be helpful.  I've been working on some PSF FRF issues seen in your Java App and plan to hit up scripting issues in the Launcher before releasing.

Hi @tmangan, i also today tried to create msix application. Before the exe starts, a java.exe version needs to start as startup script. I can’t get it working. Is something similar appears with you?
Generically Java shouldn't be a problem, however the app I mentioned was using a 1.4 version of Java which has lots of problems. Once I clear out some other PSF issues I will be looking at scripting to see what is up. Generally, scripts are working, so posting specifics on problems is always helpful.
So what version of Java, is it inside the package or locally installed, what does the script look like.

@TIMOTHY MANGAN thanks for your responses.....we have Zulu Java 1.8 version installed in the package. The current config.json we use looks like:

{
               "applications": [{
                              "id": "PSFLAUNCHERSIXFOUR",
                              "executable": "c:\\windows\\system32\\WindowsPowerShell\\v1.0\\powershell.exe",
                              "arguments": "-ExecutionPolicy Bypass -Command \"& {Invoke-CommandInDesktopPackage Test-0607.01-ENG_fg0t8wag126gc PSFLAUNCHERSIXFOUR cmd.exe '\/c c:\\progra~1\\Test\\Test\\bin\\runclient.bat' -PreventBreakaway}\"",
                              "workingDirectory": "",
                              "stopOnScriptError": true,
                              "startScript": {
                                            "scriptPath": "AppLauncher.ps1",
                                            "scriptArguments": "",
                                            "runInVirtualEnvironment": true,
                                            "showWindow": false,
                                            "waitForScriptToFinish": true,
                                            "runOnce": false
                              },
                              "endScript": {
                                            "scriptPath": "AppLauncher.ps1",
                                            "scriptArguments": "",
                                            "runInVirtualEnvironment": true,
                                            "showWindow": false,
                                            "waitForScriptToFinish": true,
                                            "runOnce": false
                              }
               }]
}

AppLauncher.ps1 is just a dummy file since without a startScript it seems to fail.

runclient.bat is a command file which starts the java.exe with arguments.

Above seems to work although it looks terrible due to the popup boxes of PowerShell and CMD.

But maybe you have some additional tips to make this easier configured. The final situation should be that the JAVA.EXE should be started in the bubble.

 

 

Thanks for posting the json. I'm not sure why the main bat file is started via cmd inside a powershell, but the scripting portion looks fine.

I am looking at this as a problem with the PSF scripting. I'll let you know when I have it sorted out, but a new version of PsfTooling to include the PSF update will be needed.
Any idea when new version is available? Or can i subscribe somewhere to get info about new version?
I have a fix for the scripting, but it is part of a major PSF set of changes I've been working on to resolve a bunch of PSF issues. There is still one more issue that needs addressing (cross architecture processes) and a bunch of testing. Hopefully released around end of month. I'll update this thread as well as posting to my blog over on tmurgent.

@TIMOTHY MANGAN related to your answer, you posted: Thanks for posting the json. I'm not sure why the main bat file is started via cmd inside a powershell, but the scripting portion looks fine.

 

Is there another way of starting the BAT file, which is located in the bubble and should be run in the bubble? This seems to be the only way we could find. Another way was to use CMD.exe, but then it works only when we used a cmd.exe copy added to the package. When we ran c:\windows\system32\cmd.exe it seems the BAT file does not start in the bubble, but outside :(

My 2021.09.26 build of the PSF will now let you have PsfLauncher executable be a cmd or bat file that will run inside the container.
Wauw you did made some important changes. Will test them hopefully tomorrow.
THANKS
Thanks a lot @TIMOTHY MANGAN for the updated version with fixes......

Tested by colleague of mine and new psflauncher seems to work and BAT/CMD files can be started directly by psflauncher32.exe in json file