Playnite Forums
Start & Stop Script - Printable Version

+- Playnite Forums (https://playnite.link/forum)
+-- Forum: Playnite (https://playnite.link/forum/forum-1.html)
+--- Forum: Support and Troubleshooting (https://playnite.link/forum/forum-4.html)
+--- Thread: Start & Stop Script (/thread-487.html)



Start & Stop Script - Mondriaan - 11-26-2020

I want to start a OpenOffice worksheet with some keyboard keys displayed, i do this with,

Start-Process "E:\Storage\Imagebestanden\Spellen\Y\Gamename.ods"

Then i start the game and both steps run perfect but when i stop the game and use the script to close the OpenOffice worksheet with,

Stop-Process -Name "Gamename.ods"

I have set playnite in administrator mode.

i was able to use it on the actual soffice (OpenOffice execute) but i was not able to stop the actual spreadsheet, it stays open and when i use the GameName.ods Playnite cannot find the process. The first command where i start the .ods spreadsheet executes soffice so i think i have to extend the soffice stop command with something like "stop all open files" but i will search further, maybe you can try it and share your info.


I am very happy that Playnite can execute the worksheet, that is what i really wanted so thats perfect but can you give a solution to close it?

Thank You


RE: Start & Stop Script - joyrider3774 - 11-26-2020

Kill the real process, not the filename. When you execute that filename it Starts another process to show that document. So you have to kill that. Like executing test.docx will actually execute winword.exe and you have to stop winword.exe not test.focx


RE: Start & Stop Script - Mondriaan - 11-26-2020

There are two processes that are started by OpenOffice, the main soffice.exe and the spreadsheet soffice.bin.
When i close soffice.exe and after that the soffice.bin than the spreadsheet closes but when starting the process again OpenOffice gives a message that the spreadsheet is not correct closed and it needs to repair the file.

The spreadsheet is not closing when simply killing the soffice.exe.


RE: Start & Stop Script - Crow - 11-26-2020

Try using "taskkill" without force parameter, that only sends termination signal to a process. If the app is properly coded, then it will close gracefully.


RE: Start & Stop Script - Mondriaan - 11-26-2020

No success


RE: Start & Stop Script - joyrider3774 - 11-26-2020

(11-26-2020, 09:38 PM)Mondriaan Wrote: No success
Please show us what you tried...

Takskill should be used like this :

"taskkill /IM [processname]" like "taskkill /IM winword.exe" if you launch it with start-process make sure you get the parameters and executeable correctly specified as perĀ https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/start-process?view=powershell-7.1 or test it from cmd.exe first manually


RE: Start & Stop Script - Mondriaan - 01-10-2021

Yes its the taskkill command

taskkill /IM "soffice.bin"

No message about errors anymore.

Thanks