Playnite Forums
  • Playnite Web
  • Rules
  • Members
  • Team
  • Search
  • Register
  • Login
  • Home
  • Members
  • Help
  • Search
Playnite Forums Playnite Support and Troubleshooting Start & Stop Script

Start & Stop Script
Mondriaan
Offline

#1
11-26-2020, 06:42 PM (This post was last modified: 11-26-2020, 06:46 PM by Mondriaan.)
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
joyrider3774
Offline

#2
11-26-2020, 07:00 PM
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
Mondriaan
Offline

#3
11-26-2020, 07:18 PM (This post was last modified: 11-26-2020, 07:23 PM by Mondriaan.)
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.
Crow
Offline

Administrator
#4
11-26-2020, 08:39 PM
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.
Mondriaan
Offline

#5
11-26-2020, 09:38 PM
No success
joyrider3774
Offline

#6
11-26-2020, 11:30 PM (This post was last modified: 11-26-2020, 11:38 PM by joyrider3774.)
(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/powersh...rshell-7.1 or test it from cmd.exe first manually
Mondriaan
Offline

#7
01-10-2021, 11:29 PM
Yes its the taskkill command

taskkill /IM "soffice.bin"

No message about errors anymore.

Thanks
« Next Oldest | Next Newest »



  • View a Printable Version
  • Subscribe to this thread

© Designed by D&D - Powered by MyBB

Linear Mode
Threaded Mode