Hai all,
Where to specify in innosetup to create the registry keys for all users who have account in the computer and who creates account in future which my software is installing
currently my software creates keys only to the user who installing the software. so when a new user login and try to use my program, he gets and error.
pls help.
You do not create keys for all users in the installation. You create registry keys only at your program start-up when the user actually runs the app. Then the registry keys will be created in his profile and user areas. This is a job for your application not the installer. However you can create a separate installer that will only generate the registry keys and each user will run it at first run of the application if the keys do not exist.
Thank You randem and now it well clear.
But, when un-installing, how to remove the values and keys?
coz if installer creates, then we have the option to tell him to remove them while uninstall no?
Well, yes and no.When you uninstall only the current users keys can be uninstalled. Since you have no access to the other users areas you cannot uninstall those keys. The only way to uninstall all keys is to create the keys for each user in the HKLM area, then all the keys can be deleted at once. But this has to be done in your application not automatically by the installer.
(Message edited by randem on December 10, 2008)
Ok Thank you.
You are welcome. So you will want to create an uninstaller application that the uninstaller can run to remove the keys (or vice verse).
yah rendam,
my plan is like this. my current installer creates (& removes when unstall) all the values & keys necessary for the current user who run the installation.
so for other uses i plan to create the values and keys manually.
so this will uninstall the regkeys atleast for the user who intalled the app is it.
The problem with that is the keys will still exist after installation, however if you create all keys in the HKLM\Software\YOURCOMPANYNAME\YOURAPPNAME\USERNAME you can delete them all at unistall time from and application you create to delete these keys that can be called from the uninstaller.
i have never seen any one doing this
seems a very good trick.
is there any populer products doing this for example?
Lots of product do this because if they have an update to the application they can change the keys of all users and it is done. If each user is responsible for the update... there can be many problems.
wow, very good tip i got finally from you !
ok ill instruct the installer to create the base key so it will be uninstalled lator. then ill create all the values using my app for each user on the first run under that key. :D
one more question,
what is the best way to determine weather the user running out app for the first time or not?
Check to see if the key for that user exists, if it doesn't exist then it is the first time the user is running the app, then create the keys for that user.
(Message edited by randem on December 11, 2008)
Got in to a problem Rendam,
QuoteWell, yes and no.When you uninstall only the current users keys can be uninstalled. Since you have no access to the other users areas you cannot uninstall those keys. The only way to uninstall all keys is to create the keys for each user in the HKLM area, then all the keys can be deleted at once. But this has to be done in your application not automatically by the installer.
It seems the user requir admin privileges to create registry keys under HKLMsoftwaremysoftware
what shall i do now?
Still do the same thing, you just have to have a separate exe the is set to run as administrator and the only thing it does is to create the keys.
Quoteseparate exe the is set to run as administrator
sorry, i could not get the plan. pls explain a bit.
where to place this exe. how to run as admin etc.
The exe is just an exe that creates the registry entries for the user. This exe will be in the {app} folder.
Option 1: In a limited users account create a shortcut for the exe. Right click on the shortcut then click on properties, then click on advanced. Tick the box to run under different credentials.
When this exe is run it will as for the account to be run under. You can mark this exe to use the administrator account. The user will need to set the user account and password for it to work.
Option 2: Create a service that will run in the system account and this service will create the user account in the registry.
ok fair enough. ill try D
BTW, when you create the shortcut and have gotten the admin name and password for it store the shortcut in the All Users Desktop folder so that when a new user is create the desktop application is there to run.