How to set FromFile location in Powershell?
I am preparing a script, which needs to use some images from same folder as the script. The images are to be shown on WinForms GUI. $imgred = [System.Drawing.Image]::FromFile("red.png") When I run the ps1 script manually from the folder just by clicking, it loads images and shows them. Unfortuantely I do not remember exactly how I set up this, but as far as I can, it was just the default program to use for ps1 files. When I run the script from a cmd file (to hide the cmd window), it also loads them. But when I open with Powershell IDE and run it, I get errors and no icons are shown on my GUI.