I'm trying to write an installer for an app I created. I found a suggestion elsewhere that I was trying to follow and it mostly worked. My app is now in the "Open With" list. However, the app won't run at all. Could it be that it's because the app is not being started in its directory, so it can't find the dlls?
Root: HKCR; Subkey: ".xls\OpenWithList\docs.exe"; Flags: uninsdeletekey noerror
Root: HKCR; Subkey: ".ods\OpenWithList\docs.exe"; Flags: uninsdeletekey noerror
Root: HKCR; Subkey: "applications\docs.exe\shell\open\command"; ValueType: string;
ValueData: """{app}\docs.exe"" ""%1?"""; Flags: uninsdeletekey noerror
Root: HKCU; Subkey: "Software\Classes\.xls\OpenWithList\docs.exe"; Flags: uninsdeletekey
Root: HKCU; Subkey: "Software\Classes\.ods\OpenWithList\docs.exe"; Flags: uninsdeletekey
Root: HKCU; Subkey: "Software\Classes\applications\docs.exe\shell\open\command";
ValueType: string; ValueData: """{app}\docs.exe"" ""%1"""; Flags: uninsdeletekey
Looking at my own registry, I see that the entries in HKCU contain a key 'OpenWithList', which contains string values of the program names.
The entries in HKCR however contain a key 'OpenWithList', which contains not values, but key entries with the program names.
Hope this helps.
Related
My Application needs a "Disable Fullscreen Optimization" in app properties to be checked in order to work.
[Registry]
Root: "HKCU"; \
Subkey: "SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\"; \
ValueType: String; ValueName: "{app}\{#MyAppExeName}"; \
ValueData: "RUNASADMIN"; Flags: uninsdeletekeyifempty uninsdeletevalue; \
MinVersion: 0,6.1
Usually I can just simply add WINXPSP2 in value data parameter if I want to make the app work with Windows XP Service Pack 2 Compatibility, but I just cant find the value if I want the app to run with "Disable Fullscreen Optimization" to be checked.
Thanks in advance.
I'm not sure I understand your question correctly, but it exists an option DISABLEDXMAXIMIZEDWINDOWEDMODEwhich may be do the desired thing.
So your new line wold look like this:
[Registry] \
Root: "HKCU"; \
Subkey: "SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\"; \
ValueType: String; ValueName: "{app}\{#MyAppExeName}"; \
ValueData: "RUNASADMIN DISABLEDXMAXIMIZEDWINDOWEDMODE"; \
Flags: uninsdeletekeyifempty uninsdeletevalue; MinVersion: 0,6.1
It is possible to set more than one flag in this registry entry.
I found this information on this site:
How to Change Compatibility Mode Settings for Apps in Windows 10
On this page a lot of options are described usable in the registry. They are almost at the bottom of the page. If this is not the correct one, perhaps an other one is suitable.
If I have following line in my [Registry] section of my Inno Setup script
Root: "HKLM"; Subkey: "SOFTWARE\MySoftware"; ValueType: string; \
ValueName: "ApplicationDescription"; ValueData: "My cool software";
what will happen when uninstalling? Do I need to add flags: uninsdeletevalue; if it should be removed on uninstall?
As explicitly written in [Registry] section documentation:
By default, registry keys and values created by Setup are not deleted at uninstall time. If you want the uninstaller to delete keys or values, you must include one of the uninsdelete* flags described below.
I am working on a project (Java project) and using Inno Setup 5 to create an installer. How can I secure the use of the install.exe and ask a serial number during the installation?
Thanks for the help.
Inno Setup has a built-in functionality prompting for a serial number on the optional "User Information" page and verifying the entered number.
set the UserInfoPage directive to yes;
implement the CheckSerial event function to make the Inno Setup prompt the user for the serial number and to verify it;
use the {userinfoserial} constant in the [Registry] section to save the entered and verified number to registry.
[Setup]
UserInfoPage=yes
[Registry]
Root: HKLM; Subkey: "Software\My Company"; ValueType: string; ValueName: "SerialNumber"; \
ValueData: "{userinfoserial}"
[Code]
function CheckSerial(Serial: String): Boolean;
begin
Result := (Serial = '123');
end;
For a more advanced implementation, see CustomPage for Serial Number in Inno Setup.
I works. I recommand to add in the InnoSetup script :
Flags: uninsdeletekey
When the program is uninstalled, delete the entire key.
[Registry]
Root: HKLM; Subkey: "Software\MySoft"; ValueType: string; ValueName: "AppInfo"; ValueData: "value" ; Flags: uninsdeletekey
I used this link to recover the key in my soft.
value = WinRegistry.readString (
WinRegistry.HKEY_LOCAL_MACHINE,
"SOFTWARE\\MySoft",
"AppInfo");
With a Task defined as:
Name: "TaskAutoLogon"; Description: "{cm:TaskAutoLogon}"; Flags: unchecked
the user can choose whether to write a key to Registry like this:
Root: HKLM; Subkey: SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon; ValueType: dword; ValueName: AutoAdminLogon; ValueData: 1; Tasks: TaskAutoLogon
My question is:
How can I tell Inno Setup to write that key to Registry only if the Task has NOT been selected/checked?
I practically want to invert the meaning of the Task.
I know it can be done with some code in the [code] section, but I hope there is a more native way of doing this.
Thanks in advance!
There's no need for script code here. The Tasks parameter supports not operator, so you can write Tasks: not TaskAutoLogon to process your entry when the task is not selected:
[Registry]
Root: HKLM; Subkey: SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon; ValueType: dword; ValueName: AutoAdminLogon; ValueData: 1; Tasks: not TaskAutoLogon
I want to use Inno Setup (http://www.jrsoftware.org/isfaq.php) to build an installer for an application.
I want this application to start whenever a user logs in to their account on the Windows machine.
How can I tell Inno Setup to make the program start when a user logs in?
Put a shortcut in the startup folder of All Users profile. See the knowledge base article 'Create shortcuts in the Startup (or Autostart) group' which includes the below example:
[Setup]
PrivilegesRequired=admin
[Icons]
Name: "{commonstartup}\My Program"; Filename: "{app}\MyProg.exe"
If you want the program to run only when the user that installed the program logs in, then use {userstartup} instead of {commonstartup}. In that case admin privileges is not required.
Or if you decide to write to 'Run' key of registry (kb article):
[Registry]
Root: HKCU; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\Run"; ValueType: string; ValueName: "MyProg"; ValueData: """{app}\MyProg.exe"""; Flags: uninsdeletevalue
If you use 'HKLM', again admin privileges is required.
Maybe it would be helpful for someone...
I encountered some problems under windows 8 when trying to build setup that would automatically put autorun registry key such as:
Root: "HKCU"; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\Run"; ValueType: string; ValueName: "NHMMNAS"; ValueData: "{app}\{#MyAppExeName}"; Flags: uninsdeletevalue
for running my 32-bit .NET application on every Windows startup.
It occured that for 32-bit application a little modification was needed which was replacing Root: "HKCU" with Root: "HKCU32" so the entry in setup script was:
Root: "HKCU32"; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\Run"; ValueType: string; ValueName: "NHMMNAS"; ValueData: "{app}\{#MyAppExeName}"; Flags: uninsdeletevalue
After adding the line and reinstalling, my application started on system startup with no problems.