I would like to create a setup. I've make a task list. If task is checked, it will create an icon on desktop. But, I think the style of the task list is less than beautiful. I want to change it into the tree view style. Is it possible?
Inno Setup tasks support hierarchy/tree natively.
If you use the tasks example code from Inno Setup documentation, and set the ShowTasksTreeLines directive, you will get:
To create a hierarchy, use task name syntax with backslashes (similarly to Windows path hierarchy):
[Tasks]
Name: desktopicon; Description: "Create a &desktop icon"
Name: desktopicon\common; Description: "For all users"
Name: desktopicon\user; Description: "For the current user only"
...
Related
I have an installer, which contains a 32-bit and 64-bit dll. On 64-bit systems I want to install both versions, on 32-bit systems, just the 32-bit version.
My [Files] section is as follows:
[Files]
Source: "C:\Users\..\x64\my.dll"; DestDir: "{pf64}\{#MyPath}"; Check: IsWin64
Source: "C:\Users\..\my.dll"; DestDir: "{pf32}\{#MyPath}"
This all works fine, except that if I override the install directory in the "Select Destination Location" page
Firstly, it only let's me override the pf32 path
Secondly, nothing gets installed if I override the install directory
Is there a way to set up the installer so that the "Select Destination Location" gets presented twice, once for the 32-bit location and once for the 64-bit one?
The easiest is to add an additional page for the second directory.
For examples see:
the Prompt for an additional folder for data article on ISXKB;
Inno Setup with three destination folders.
You can of course also add the second box to the standard "Select Destination Location" page. But that's more work.
Easier to implement might actually be to disable the "Select Destination Location" page altogether (by setting DisableDirPage to yes) and implement a new similar page using the technique described above.
In this case, make sure you set the installation directory to one of the selected custom directories, so that Inno Setup knows where to store uninstallation data to. Otherwise Inno Setup will still create the directory set by the DefaultDirName (and will store the uninstallation data there). Or set the CreateAppDir to no. Though that will make Inno Setup store uninstallation information to {win}, what is not nice.
For complete solution, see
Use two/multiple selected directories from custom page in Files section.
As for the second question: The problem is that you actually install the files to fixed location, the "program files", using the {pfXX} constants. To install to the location selected by the user on the "Select Destination Location" page, you have to use the {app} constant.
I am trying to add a context menu item to a DLL file. The reason is that I have written an application which retracts and deployed a managed DLL file to the GAC. The application is all good, but now I want the ability to right-click a DLL and just click "copy to GAC".
I've tried to follow instructions as per this question: How add context menu item to Windows Explorer for folders but to no avail. When I right click a DLL, nothing new is appearing.
I've also tried the following: https://winaero.com/blog/add-register-dll-context-menu-commands-for-dll-files-in-windows-10/#comment-22928 - ran the reg file but no result as well.
Maybe there's a hardcoded restriction on DLL files for such actions?
Here's my current registry setup:
Any guidance would be appreciated.
The general steps to achieve this are as follows:
Fire up regedit
Identify the ProgID for your extension - go to HKCR\.yourextension and take note of the default value (in your case, dllfile)
Navigate to HKCU\Software\Classes (for user) or HKLM\Software\Classes (for all users)
Look for a matching key (in your case dllfile) - if it's not there, create it
Ensure it has a sub-key called shell
Add a sub-key to shell named as the command you want (refer to image below)
Add a sub-key to your new key called command
Modify the (Default) value to be the command you want to execute. %1 will give you the path of the file in context (remember to wrap it in " due to potential white-space in the path)
You seem to have done all the above, so you may be doing something wrong, as this is my result after a quick sanity test:
So, here are a few things I can think of that would make it behave non-intuitively:
You're adding this to HKLM rather than HKCU - due to how inheritance works, I do believe adding it to HKLM would require a restart, or at best, a shell restart
You've added this to HKCU but your dll requires elevated permissions to access
You have some silly syntax error somewhere ;)
The sample command I used to test this was a good old boring "C:\Windows\notepad.exe" "%1"
This is based on andromeda947's answer here:
If you have admin rights you can use HKEY_CLASSES_ROOT\SystemFileAssociations\.yourextension, which is simpler as it doesn't require an intermediate ProgID.
Option 1: edit the registry manually
add a new key at HKEY_CLASSES_ROOT\SystemFileAssociations\.yourextension\shell\your menu entry text\command creating any keys you need to in that path (if there's not one for .yourextension add it; if there's not one for shell add it; etc)
set the default value for command (the last key you created) to C:\path\to\yourapp.exe "%1"
Option 2: I made a tool to do this
you can download it here. This is an example of how to register notepad.exe as a context menu item for dll files.
regwincontext.exe dll "notepad it" C:\Windows\notepad.exe
I have created several setup aka installer exe files using Inno Setup. When I have done my testing I have created my installer files on my Desktop. Most of my icons display properly but it appears a bit sporadic when displaying the icon on the setup installer file. When I use a program not included in Windows to open a folder that contains the setup installer files it consistently displays the icons. However when I do the same thing using a program included in Windows they do not consistently display. The images below are two examples.
The window on the left is Inno Setup. You can see that all the icons display as expected. I also tried this with another program that I have since deleted and the three icons displayed. The window on the right is WordPad. Only one of the icons displays for the Basic Cubic Puzzles Setup file.
This image shows the three setup files on my desktop. As you see none of them show the custom icons that consistently appear in programs that are not included in Windows.
Here is my code in my iss file.
#define MyIconFile "ThePathForMyCustomIcon"
[Setup]
SetupIconFile={#MyIconFile}
[Icons]
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; IconFilename: "{#MyIconFile}"
Name: "{group}\{cm:ProgramOnTheWeb,{#MyAppName}}"; Filename: "{#MyAppURL}"; IconFilename: "{#MyIconFile}"
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"; IconFilename: "{#MyIconFile}"
Name: "{commonprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; IconFilename: "{#MyIconFile}"
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon; IconFilename: "{#MyIconFile}"
Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: quicklaunchicon; IconFilename: "{#MyIconFile}"
Is there a Inno Setup parameter that I can set specifically for Windows to get my custom icon to consistently display when I use programs within Windows?
This is the first time I have used Windows in almost ten years. I purchased a Windows 10 touchscreen laptop not quite two weeks ago. My last experience with Windows was with XP. I have already done a Disk Cleanup before my last attempt at recreating my setup files. I'm not sure what the next step is.
I have never experienced such issue - even today with Windows 10 and WordPad I can see my proper Icon for my setup files.
I suspect you encounter Icon Cache issue which stores generic icons that were somehow cached earlier for Inno Setup generic installers.
You can try to clear Windows Icon Cache - please note that way you do it differs for Windows Vista/7 and for Windows 8/10.
One approach is described here.
If (using Inno Setup) I install MyApp to C:\Users\User1\MyApp and create a shortcut on the public desktop. This shortcut correctly points to C:\Users\User1\MyApp\MyApp.exe on the desktop of User1, but it points to C:\Users\User2\MyApp\MyApp.exe on the desktop of User2!
I understand that creating a machine install in a User folder is asking for problems, but we are stuck with many customers who have exactly done that in the past (when we had a more or less per user installation). So how can I make the shortcut point to the Users\User1 folder for all users?
See my lengthy replies in the news groups.
In summary, User2 can not reliably access User1's profile, and it seems that Explorer is changing the target to suit. It may only do this if 1) it can't access the folder or 2) it's on a domain and assuming roaming profiles, but as it's undefined behaviour, it could do anything.
Your best bet is to stop it from installing into under c:\users (or the O/S equivalant).
If you have users will be upgrading from a "per user" install, you will need to use a different AppID so it doesn't attampt to upgrade the existing installation.
The better way is to install your application in drive c:\program files\{your app folder}\{appname}.exe or to any location except {UserDesktop}
Then using Inno Setup contants {commondesktop} instead of {userdesktop}, this will place your shortcut to C:\Users\Public\Desktop where all the users can see, even the new user create prior to installation can have it.
example
[Files]
Source: MyApp.exe; DestDir: {app};
[Icons]
Name: **"{commondesktop}\[You app Folder]**"; Filename: MyApp.exe; Tasks: desktopicon; IconFilename: MyApp.exe
OR IF YOU STILL INSISTS, use the following code
[Files]
Source: MyApp.exe; DestDir: {commondesktop};
I think you have to create new package and then Uninstall the previous, and use your new package to install it properly.
you have to manually move the application folder [C:\Users\User1\MyApp] to C:\Users\Public\Desktop, and delete the shortcut, then create new shortcut pointing to C:\Users\Public\Desktop\MyApp\MyApp.exe
Or by worst, change the security of folder [C:\Users\User1\MyApp] or User1 account to non-Private... so any user can access the folder... here are the links on how to do that
a. http://support.microsoft.com/kb/930987
b. http://www.scribd.com/doc/101389/Password-Protecting-and-Privatizing-Windows-XP-User-Accounts
or search it using google or any search engine on how to remove privatized folder in xp
I have an interesting problem. I created a MSI Installer for a .NET 3.5 Application. During the install process I ask the user for a custom folder name where application output files should be stored.
To solve this task I have added a "Textboxes A" user interface item. I assigned TextBox Edit1 a property.
This property I used in "Registry" view to store that path in the registry - that worked. But:
I also used this property in the "File System" view to specify the target folder.
The result is: registry is stored correctly. But the installer created always a directory which is named like the default value of the Textbox Edit1. I've changed that name to ensure that there is no place where I could get that value.
I seems that the property is not being updated by the installer UI although the registry value is set correctly.
Does anyone had the same or similar troubles and found a solution/workaround?
Thanks, Arthur
EDIT: If I change the order of the UI Items (Ask for custom folder first, then ask for the target folder) it works. But this is - what should I say - not a solution. It's a sad workaround.
EDIT: With Edit1 I mean the Edit Control 1 of the "TextBox View A" which is bound to the Property "DATAFOLDERPROPERTY".
A verbose MSI log should tell you more about what exactly is happening. There are two things that jump out at me. One is that your property, Edit1, is not a public property. For it to be public, all letters must be upper-case, e.g. EDIT1. The other is that you are trying to edit a folder location after CostFinalize has set directory locations. To update directories at this time, you cannot merely change their associated properties. You need to add a Set Directory custom action (type 35) to the sequence or a SetTargetPath control event to the dialog - I'd use the control event if possible.