Forum Discussion
Siva116
Aug 26, 2021Brass Contributor
Shortcut pointing to Batch script (.bat file) - PSF Tool not worked.
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 ...
Sep 16, 2021
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.
Pollewops
Sep 16, 2021Iron Contributor
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?
- Sep 17, 2021Generically 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.- PollewopsSep 20, 2021Iron Contributor
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.
- Sep 20, 2021Thanks 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.