How to make uninstallation work by right clicking app icon from start menu [duplicate] - inno-setup

I created an install file with Inno Setup 5.5.9 that I then ran on a Windows 10 machine. My only problem has to do with uninstalling the program. I can use the Control Panel just fine to uninstall. But in the Start menu, when I right click on the shortcut that launches my program, there is no option in the context menu to Uninstall. Other programs do have this option.
Is this a Windows 10 thing that I can't get around?
Does the program need to be installed under Program Files or Program Files (x86)?
Or is there a change I can make to my Inno script to have the uninstall option show up?
I'm a standard user on the Windows 10 machine, and therefore installed the program without administrative privileges. Does that have anything to do with it?

Only "Windows apps" (aka Universal Windows Platform [UWP] apps, Windows Store apps and Metro-style apps) have working "Uninstall" command.
Classic "Desktop apps", like those installed with Inno Setup, do not. Their Uninstall command only opens "Program and Features" Control Panel. Check other major desktop apps, like Microsoft Visual Studio or Google Chrome. Their "Uninstall" command behaves the same. And they are definitely not packaged by Inno Setup.
You would have to re-package your desktop app to turn it to "Windows app", instead of using Inno Setup.

I had the same problem.
In my case sometimes only the uninstall shortcut in windows start menu disappers.
I somehow fixed it.
Just use in Icons-section the command to create this shortcut twice. Their names need to differ.
For example:
Name: "{group}\{#Uninstall_Name} {#MyAppName}"; Filename: "{uninstallexe}";IconFilename: {app}\{#IconFileStartDesktop};
Name: "{group}\{#MyAppName} {#Uninstall_Name}"; Filename: "{uninstallexe}" ;IconFilename: {app}\{#IconFileStartDesktop};
If the first uninstall-shorcut does not show up, the second one enter code here will to it.

Related

Uninstall file in Start Menu applications list isn't always shown

After installing the application, the installer and uninstaller files are properly saved in the "install application folder" and in the "Start menu application folder" rispectively.
For example:
- "install application folder" = "C:\Users\\AppData\Roaming\"
- "Start menu application folder" = "C:\Users\\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\"
Sometimes, though, the uninstaller file is not displayed into the application folder of the Start Menu Installed Applications List (list of installed Applications displayed on the left by pressing the Windows keyboard key).
Unfortunately I can't reproduce the problem. It doesn't appears each time I launch the Installer and I couldn't understand under which circumstances it appears.
Is there a possibility it can be solved by forcing a refresh of the Start Menu Installed Applications List? if this is the case, how can do it?
Thanks in advance to everyone for the possible help
EDIT: no solution but a workaround found here Inno Setup Start menu uninstall shortcut is not shown on Windows 10 2nd answer
Windows 8 and 10 hides shortcuts to uninstallers and help files on purpose, this is by design.
The Windows logo requirements says that you should only provide a single shortcut to your main application in the start menu. Only create multiple shortcuts if you have a suite of applications (like MS Office etc.). These guidelines have been in place for at least 20 years!

EXE created by ant build on execution directly getting installed in TEMP path [duplicate]

I create my application with py2exe and package it into an installer exe using Inno Setup on Windows 7. The installer created this way can then be installed on both Windows 7 and Windows 10 systems. When it works, the installer shows following screens in sequence:
Welcome screen
EULA screen
default (or previous install) location, allowing user to select new install location,
Confirming install location, and
usual install screens.
This is the behavior I get with Inno Setup 5.5.5 or lower.
With Inno Setup 5.5.7 and higher (did not try 5.5.6), the installer is created normally and can be setup as above on Windows 7. However, the same installer fails to show screens 1 and 3 from above list during setup on Windows 10: setup directly starts with EULA screen and then jumps to confirm install location. The confirm screen doesn't even show which directory the installation will be done.
Continuing allows the installation to happen in the default location and the application works normally. Not knowing the install location is highly annoying and undesirable.
The .iss file that I use (see below) is identical across the different Inno Setup versions that I have tried. In the file, the DefaultDirName is set explicitly (based on the version of the application).
[Setup]
AppName=MyApp
AppVersion=2.0.1
AppVerName=MyApp 2.0.1
DefaultDirName=C:\MyApp_v2.0.1
[Files]
Source: "MyApp_main.exe"; DestDir: "{app}\"; Flags: ignoreversion
I also tried packaging the installer with Inno Setup (5.5.7 and 5.5.9) on Windows 10, but it had the same behavior.
I was wondering it I need to set additional parameters for the installer to work correctly on Windows 10 also for newer versions of Inno Setup?
Quoting revision history for Inno Setup 5.5.7:
As recommended by Microsoft's desktop applications guideline, DisableWelcomePage now defaults to yes. Additionally DisableDirPage and DisableProgramGroupPage now default to auto. The defaults in all previous versions were no.
Conclusion:
The Welcome page is not shown anymore by default. To enable it, set the DisableWelcomePage:
DisableWelcomePage=no
I do not think you are right with your statement that the page shows on Windows 7.
The "Select Destination Location" page is shown for fresh installations only, not for "upgrades". So this has nothing to do with Windows 7 vs. Windows 10. The difference is probably that you have the application installed on Windows 10 system; and you do not have it installed on the Windows 7 system.
To show the page always, set the DisableDirPage:
DisableDirPage=no
Thought as mentioned in the quote above, the defaults are recommended, so you should follow them.
I found another parameters that affects it.
CreateAppDir=no
In CreateAppDir page says:
If this is set to no, no directory for the application will be created, the Select Destination Location wizard page will not be displayed, and the {app} directory constant is equivalent to the {win} directory constant. If the uninstall feature is enabled when CreateAppDir is no, the uninstall data files are created in the system's Windows directory.
here I used
[Setup]
DisableDirPage=No
by default this parameter is seted to auto.
If this is set to auto, at startup Setup will look in the registry to
see if the same application is already installed, and if so, it will
not show the Select Destination Location wizard page.
See more in https://jrsoftware.org/ishelp/index.php?topic=setup_disabledirpage

InnoSetup not asking for destination folder [duplicate]

I create my application with py2exe and package it into an installer exe using Inno Setup on Windows 7. The installer created this way can then be installed on both Windows 7 and Windows 10 systems. When it works, the installer shows following screens in sequence:
Welcome screen
EULA screen
default (or previous install) location, allowing user to select new install location,
Confirming install location, and
usual install screens.
This is the behavior I get with Inno Setup 5.5.5 or lower.
With Inno Setup 5.5.7 and higher (did not try 5.5.6), the installer is created normally and can be setup as above on Windows 7. However, the same installer fails to show screens 1 and 3 from above list during setup on Windows 10: setup directly starts with EULA screen and then jumps to confirm install location. The confirm screen doesn't even show which directory the installation will be done.
Continuing allows the installation to happen in the default location and the application works normally. Not knowing the install location is highly annoying and undesirable.
The .iss file that I use (see below) is identical across the different Inno Setup versions that I have tried. In the file, the DefaultDirName is set explicitly (based on the version of the application).
[Setup]
AppName=MyApp
AppVersion=2.0.1
AppVerName=MyApp 2.0.1
DefaultDirName=C:\MyApp_v2.0.1
[Files]
Source: "MyApp_main.exe"; DestDir: "{app}\"; Flags: ignoreversion
I also tried packaging the installer with Inno Setup (5.5.7 and 5.5.9) on Windows 10, but it had the same behavior.
I was wondering it I need to set additional parameters for the installer to work correctly on Windows 10 also for newer versions of Inno Setup?
Quoting revision history for Inno Setup 5.5.7:
As recommended by Microsoft's desktop applications guideline, DisableWelcomePage now defaults to yes. Additionally DisableDirPage and DisableProgramGroupPage now default to auto. The defaults in all previous versions were no.
Conclusion:
The Welcome page is not shown anymore by default. To enable it, set the DisableWelcomePage:
DisableWelcomePage=no
I do not think you are right with your statement that the page shows on Windows 7.
The "Select Destination Location" page is shown for fresh installations only, not for "upgrades". So this has nothing to do with Windows 7 vs. Windows 10. The difference is probably that you have the application installed on Windows 10 system; and you do not have it installed on the Windows 7 system.
To show the page always, set the DisableDirPage:
DisableDirPage=no
Thought as mentioned in the quote above, the defaults are recommended, so you should follow them.
I found another parameters that affects it.
CreateAppDir=no
In CreateAppDir page says:
If this is set to no, no directory for the application will be created, the Select Destination Location wizard page will not be displayed, and the {app} directory constant is equivalent to the {win} directory constant. If the uninstall feature is enabled when CreateAppDir is no, the uninstall data files are created in the system's Windows directory.
here I used
[Setup]
DisableDirPage=No
by default this parameter is seted to auto.
If this is set to auto, at startup Setup will look in the registry to
see if the same application is already installed, and if so, it will
not show the Select Destination Location wizard page.
See more in https://jrsoftware.org/ishelp/index.php?topic=setup_disabledirpage

InnoSetup no longer allows user to pick installation directory? [duplicate]

I create my application with py2exe and package it into an installer exe using Inno Setup on Windows 7. The installer created this way can then be installed on both Windows 7 and Windows 10 systems. When it works, the installer shows following screens in sequence:
Welcome screen
EULA screen
default (or previous install) location, allowing user to select new install location,
Confirming install location, and
usual install screens.
This is the behavior I get with Inno Setup 5.5.5 or lower.
With Inno Setup 5.5.7 and higher (did not try 5.5.6), the installer is created normally and can be setup as above on Windows 7. However, the same installer fails to show screens 1 and 3 from above list during setup on Windows 10: setup directly starts with EULA screen and then jumps to confirm install location. The confirm screen doesn't even show which directory the installation will be done.
Continuing allows the installation to happen in the default location and the application works normally. Not knowing the install location is highly annoying and undesirable.
The .iss file that I use (see below) is identical across the different Inno Setup versions that I have tried. In the file, the DefaultDirName is set explicitly (based on the version of the application).
[Setup]
AppName=MyApp
AppVersion=2.0.1
AppVerName=MyApp 2.0.1
DefaultDirName=C:\MyApp_v2.0.1
[Files]
Source: "MyApp_main.exe"; DestDir: "{app}\"; Flags: ignoreversion
I also tried packaging the installer with Inno Setup (5.5.7 and 5.5.9) on Windows 10, but it had the same behavior.
I was wondering it I need to set additional parameters for the installer to work correctly on Windows 10 also for newer versions of Inno Setup?
Quoting revision history for Inno Setup 5.5.7:
As recommended by Microsoft's desktop applications guideline, DisableWelcomePage now defaults to yes. Additionally DisableDirPage and DisableProgramGroupPage now default to auto. The defaults in all previous versions were no.
Conclusion:
The Welcome page is not shown anymore by default. To enable it, set the DisableWelcomePage:
DisableWelcomePage=no
I do not think you are right with your statement that the page shows on Windows 7.
The "Select Destination Location" page is shown for fresh installations only, not for "upgrades". So this has nothing to do with Windows 7 vs. Windows 10. The difference is probably that you have the application installed on Windows 10 system; and you do not have it installed on the Windows 7 system.
To show the page always, set the DisableDirPage:
DisableDirPage=no
Thought as mentioned in the quote above, the defaults are recommended, so you should follow them.
I found another parameters that affects it.
CreateAppDir=no
In CreateAppDir page says:
If this is set to no, no directory for the application will be created, the Select Destination Location wizard page will not be displayed, and the {app} directory constant is equivalent to the {win} directory constant. If the uninstall feature is enabled when CreateAppDir is no, the uninstall data files are created in the system's Windows directory.
here I used
[Setup]
DisableDirPage=No
by default this parameter is seted to auto.
If this is set to auto, at startup Setup will look in the registry to
see if the same application is already installed, and if so, it will
not show the Select Destination Location wizard page.
See more in https://jrsoftware.org/ishelp/index.php?topic=setup_disabledirpage

Debugger.Launch() on windows service in Windows 8

After I installed Windows 8 perfectly legit statement like this doesn't work anymore:
#if DEBUG
Debugger.Launch();
#endif
Service starts ignoring that thing.
Yes, I am building the project in a debug mode.
if I change that to a Debugger.Break() - the service just fails, and still there's no dialog for attaching a debugger.
The secret lies in changing the registry key for the Visual Studio JIT debugger via the following:
reg add "HKCR\AppID\{E62A7A31-6025-408E-87F6-81AEB0DC9347}" /v AppIDFlags /t REG_DWORD /d 8 /f
Before making this change the value on my machine was 0x28. The above changes it to 0x8. In essence it removes the 0x20 flag.
If you search the Microsoft include files (WTypesbase.h) then you find the following:
#define APPIDREGFLAGS_IUSERVER_ACTIVATE_IN_CLIENT_SESSION_ONLY 0x20
Once you make this change then the JIT debugging window is displayed again. I believe that all of this relates to various session 0 security changes made by Microsoft.
Sourced from this post:
http://forums.arcgis.com/threads/69842-Debugging-your-SOE-on-Windows-8
Debugger.Launch would launch an application with a visual GUI. By default services do not interact with a desktop and thus anything they do cannot be "seen".
Support for interacting with the desktop has slowly been removed from Windows services ("Interact with the desktop" option has been removed from some Server versions for example). I would imagine they've continued this trend.
Windows Services by nature are not GUI applications, they can run before and after a user logs into a desktop and thus cannot show a GUI all the time. It's not generally a good idea to depend on an ability to have a GUI in a Service.
If what you want to do is debug a service, I suggest running it as a regular application so that you can do things like Launch and Debug. Shameless plug: you can see Developing Windows Services in Visual Studio for a way to write a service that supports that.
Is this a Windows Store app or a desktop app?
Try right-clicking on your project (the C# executable project if that's what you have) and selecting "Properties". Then in the left sidebar of options, click "Debug". In the "Start Action" section, check the box for "Do not launch, but debug my code when it starts".
Now you can hit F5 and run Visual Studio with breakpoints in your code, and it will sit and wait for you to fire up the process. Then run your application (outside of Visual Studio), and Visual Studio will attach the debugger.

Resources