question

Filip-2434 avatar image
0 Votes"
Filip-2434 asked MotoX80 answered

Powershell cannot create more than two appliation

Hello everybody.

  • tried run some powershell script. But when i run it secend time it show me an error.*

See_An_Error.png


  • understand that i cannot run two application but why it show it when i closed the appication?
    Must I remove the application variable or destroy it?
    What is wrong?*

Thanks for help




windows-server-powershell
a.png (64.4 KiB)
· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I would suggest that you contact the author of the script and ask them for help. Forum users would have no idea what that script is doing.

Try closing the Powershell windows and open a new one. Then run the script again.


1 Vote 1 ·

Hello @MatoX80
Yes i tried it and than it work. But i don't have clue why it don't work when i want it run again.
ok.
Thanks

0 Votes 0 ·

The script must be loading something into the Powershell.exe's process memory. Maybe a handle to a COM object. The script author would need to fix his script so that it could be rerun multiple times.

Update: since it is a script, you have the source code. Learn how to program Powershell and fix it yourself.

https://www.sapien.com/books_training/Windows-PowerShell-4

https://docs.microsoft.com/en-us/powershell/

1 Vote 1 ·

1 Answer

MotoX80 avatar image
0 Votes"
MotoX80 answered

Create a shortcut on your desktop. Change the target property to this. Use the folder name where put the script. I had mine in temp. When you want to play, just double click on the shortcut. A new Powershell.exe will launch each time you play the game.

 C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -windowstyle hidden -file c:\temp\minesweeper.ps1



See https://www.reddit.com/r/PowerShell/comments/6wtlsc/i_wrote_a_snake_game_in_powershell_requires/

90415-capture.jpg







capture.jpg (62.3 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.