NSIS MUI_WELCOMEFINISHPAGE_BITMAP not shown on Windows 10 - windows

I use NSIS to create a Windows installer for one of my projects. The script can be viewed on GitLab.
I just noticed that the MUI_WELCOMEFINISHPAGE_BITMAP image is shown as expected on Windows 7, but not on Windows 10, using the latest version NSIS 3.06.1.
Here's the installer started on Windows 7:
and the very same installer started on Windows 10:
I create the image from an SVG file in the following way:
inkscape --export-filename=image.png image.svg
convert image.png BMP2:image.bmp
Is this a bug? Or what do I have to change to make the image also appear on Windows 10?

Okay, after some further investigation, I can answer the question myself.
The problem is apparently the convert step. It messes up the image dimensions. Actually, the image has to be (and is) 164 x 314 px. The convert output seems to report a size of 20578468 x 1572865 px.
Seems like Windows 7 doesn't care, but Windows 10 does.
Saving the image using the GIMP made it work, using the correct settings: Either an indexed image, with or without RLE encoding or an 8-bit-RGB one. In each case, one has to check "Compatibility Options" → "Do not write color space information".
That's it ;-)

Related

Windows 10 Taskbar open windows - thumbnails or list

In my old Windows 7, I could get the list of the open windows just hovering on the folder icon, and I could get the windows in "list" format:
Now, with my new Windows 10, the list of open windows has become to thumbnails.
I don't like these thumbnails, and would like to come back to see them as a list, without the thumbnails.
Is there a way to change the Windows 10 behavior?
Unfortunately you cannot turn it off completely. You can set it to stop showing thumbnails for two or more windows though. It requires a registry edit, and is explained here: https://www.tenforums.com/tutorials/20989-change-taskbar-thumbnail-threshold-show-list-windows-10-a.html
The gist of it is Windows will stop showing thumbnails when there are too many, depending on screen resolution. You can set this to be 1 in the registry so when you open more then two windows of the same program it will display the listing instead.
Just not to leave this unanswered, i found the solution:
Add a DWORD 32 registry key in:
HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Taskband
With the name:
NumThumbnails
And the value:
1
That's all.

Inno Setup: Control panel icon does not show

I have an Inno Setup project. Everything is fine, but I do not see the application icon in the "Programs and Features" control panel area. I do see the icon everywhere else.
The script file does have the following:
[Setup]
SetupIconFile={#MySetupImageIco}
Is there something else that I need to set to get the application icon to show in the Programs and Features control panel applet? I am testing against Windows 8.1.
UPDATE:
Based upon comments, I tried setting in my script:
UninstallDisplayIcon={#MySetupImageIco}
Sadly, that did not yield the icon in the Add/Remove aka Programs and Features Control Panel applet.
UPDATE #2:
The winning solution is:
UninstallDisplayIcon={app}\{#MyAppExeName}
Naturally, there has to be a #define MyAppExeName "whatever.exe" above that at the top of the script. Interesting that when I specified the path to the ico file, I had no success. Inno Setup for Windows 8 and 8.1 wants what I just said. Windows 7 works with UninstallDisplayIcon and specifying the path to the ICO or without that, just Windows 8 and 8.1 are a bit different.
Solution is:
Add
[Setup]
UninstallDisplayIcon={app}\{#MyAppExeName}
Specifying the actual ico file did not work, but this entry did.
I tested against Windows 8/8.1. Windows 7 works without this line.
I can confirm this as a working solution too (Win7 x64):
[Setup]
UninstallDisplayIcon={uninstallexe}
What I really love here it's independent to app name etc. Just pure alias to uninstaller.
Found at https://dutchgemini.wordpress.com/2011/05/03/innosetup-and-the-missing-uninstall-icon-on-windows-7
In Windows 11, you can use the icon file itself.
UninstallDisplayIcon=C:\Path\to\ico\file
does the thing.
Worked for me.
Add
It should be
UninstallDisplayIcon= {app}ForwardSlash{#MyAppExeName}
I tested it against Windows 10 latest build.
I had a problem with your #MyAppExeName solution because I use the OutputBaseFilename directive. A more elegant solution is:
UninstallDisplayIcon={srcexe}

Mathematica not exporting gifs properly

I'm trying to export an image to a .gif file in Mathematica (version 7). Let's take a basic example:
Export["pic.gif",Graphics[{Circle[]}]]
There are no error messages, and a pic.gif file is in fact created, but the file's totally blank; 4 KB size, 0x0 dimensions, if I open the file no window appears.
I've tried messing with the format, such as
Export["pic.gif",Graphics[{Circle[]}],"GIF"]
and
Export["pic.gif",Graphics[{Circle[]}],"Image"]
but to no avail. Export works with other file-types (tried it with .jpg and .png with no trouble), so I'm not sure what the problem is.
Version 7 is several years old
on version 9.01 (the newest) with MAC OS X this works just fine
yehuda

how to check windows icon file for image quality

I have recently used an icon file received from our marketing team. The icon file when opened in resource editor (Visual Studio 2008) looks like this.
The same file when opened-and-saved in IcoFX appears correctly in resource editor.
My marketing team uses some tools (Picture2Icon ) in Mac and produces the icon file which appears to be corrupt or not fully correct. The same file saved by IcoFx seems to be correct. What is causing the ICOFX out to be correct?
The result is the exe shows bad icons. The exact case where the image is bad is not clear- It is reported in case where color quality is set to be 'medium' (windows XP). It is worse when executable is "selected" in windows explorer.
Here is one icon that shows problem: https://github.com/jayanmn/icontest/blob/master/icontest.ico
Full sample code to create exe is at https://github.com/jayanmn/icontest/
So question is given an ico file, how can I ensure that it works fine on WindowsXP, Windows Vista and Windows7?
I took a good look at your icontest.ico file provided from the GitHub website and discovered that the solution is an easy fix.
First, let me illustrate the problem as I see it on a Windows XP 32bit System using the freeware IrfanView software which is an excellent image viewer for this task.
Here is a composite shot I made illustrating the error for 5 of 6 layers as seen using IrfanView:
To fix the above icontest.ico file, one would think frames 1,2,3,4 and 6 are bad. But the opposite is true! It turns out that frame 5 is the culprit!.
Specifically, frame 5 has compression set on this frame which is causing the issue.
The actual fix that's required is to merely re-save the icontest.ico file without compressing that layer. For this task, the freeware GIMP application which is an excellent image editor is perfect for this task.
Just re-save the icon file with GIMP but remove the compression for the 5th layer as shown below:
The final result is a properly rendered icontestResaved.ico as seen in IrfanView (Tip: To view frames of an icon file in IrfanView, use the Red Arrows that's next to the frame number, i.e. 1/6):
The best way to ensure that the file works in different Windows Operating System's is to actually have a machine available, as the rendering engine is unique and emulators might not work as intended.
For the curious: Setting all layers to be compressed in GIMP resulted in a icon that was not viewable in Windows Explorer.
Tip: To view the reference images above at original size, right mouse-click and choose View Image.
Status Update: Consider installing Axialis IconWorkshop™ Lite Version 6.3.1.1 to handle all your icon development workflow needs. It's a free Visual Studio 2008 Plugin provided by Axialis themselves!

programmatically take screenshot, crop section, and run OCR tools. quick solutions?

I will be writing code that takes a screenshot, crops to a small section of the screen (predefined area of screen), and then extracts the text from that cropped image (via OCR tools), and then saves the resulting text to a file. I was wondering if there is software (preferably for Windows) that can do this, or at least parts of it. I am already looking into tesseract as an OCR tool. Anyone know of software that can take the screenshot, and possibly crop a predefined region of the image.
Thanks,
-Jason
I use Greenshot, which is a very awesome tool for screenshots and according to the FAQ it supports OCR (using MODI = Microsoft Office Document Imaging) as well. However, I never got it working on my Windows machine and used Tesseract instead (for Linux, with some scripting experience, this method should be possible as well):
Download Tesseract here for Ubuntu/Debian/Windows and install it.
Download and install Greenshot
Create a new windows batch script called "Greenshot_Tesseract_OCR.bat" using a text editor like notepad or Notepad++ - and save it at a location of your choice, e.g. "C:\Users\MyUser\Scripts\Greenshot_Tesseract_OCR.bat" - with the following content (depending on the installation location of tesseract):
ECHO OFF
set arg1=%1
"C:\Program Files\Tesseract-OCR\tesseract.exe" "%arg1%" "%arg1%"
type "%arg1%.txt" | clip
Right-click the Greenshot icon in the toolbar and click "configure external command"
Add a new command with a name like "Tesseract OCR to Clipboard", select the batch script you just created as a command and as argument, use the default "{0}". Then click OK twice.
You should now be able to copy the text of a screenshot into your clipboard, with a shortcut ("Print" key in my case) and 1-2 mouse clicks (depending on your Greenshot settings)!
You can try the following open-source programs:
Greenshot for screenshots and VietOCR (a GUI frontend for Tesseract) for OCR on screenshots.

Resources