I can get the executable location from the process, how do I get the icon from file?
Maybe use windows api LoadIcon(). I wonder if there is .NET way...
Right-click the EXE file for the software you want to extract an icon from and select Properties. Click the Icons tab shown directly below. Select an icon to extract there.
Otherwise, you can usually find an application's EXE file in sub-folders of C:\Program Files or C:\Program Files (x86) . When you've found the application's EXE file, right-click it and select “Properties.” In the Properties window, click the “Icons” tab.
To change the icon that the .exe has, you can pass the --icon=icon. ico to the pyi-makespec command or modify the . spec file yourself by altering the exe object to add the argument icon='icon.
An executable file (EXE file) is a computer file that contains an encoded sequence of instructions that the system can execute directly when the user clicks the file icon. Executable files commonly have an EXE file extension, but there are hundreds of other executable file formats.
Icon ico = Icon.ExtractAssociatedIcon(theProcess.MainModule.FileName);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With