This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Registry Magic. Anyone have any magic dust?
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 06, 2008
02:43 PM
Registry Magic. Anyone have any magic dust?
Throughout the course of my installation, I have to add and manipulate registry keys.
Then, when I uninstall, I have to delete keys as well as modify keys to place them back into their pre-installed state.
My problem is this:
- How do I edit a registry key at install time?
I need to append a registry key string during install here, so how can I edit and add to the string?
- How do I edit a registry key at uninstall time?
The key which I appended with my information needs to be reverted back to its pre-installed state.
The problem I have now is that I only know how to add/delete entire keys, not just edit the data in a key. This is causing the dreaded blue screen of death, so it's important to find a solution to this problem.
I am using an Installscript MSI project, so it is possible to use Installscript if needed. However, this is my first time ever building an installer as well as using Installshield, so I am at the bottom of the learning curve with regards to IS and installscript and how to properly time all of this...
Any suggestions to assist me in getting on the right path is greatly appreciated.
Thanks in advance,
D
Then, when I uninstall, I have to delete keys as well as modify keys to place them back into their pre-installed state.
My problem is this:
- How do I edit a registry key at install time?
I need to append a registry key string during install here, so how can I edit and add to the string?
- How do I edit a registry key at uninstall time?
The key which I appended with my information needs to be reverted back to its pre-installed state.
The problem I have now is that I only know how to add/delete entire keys, not just edit the data in a key. This is causing the dreaded blue screen of death, so it's important to find a solution to this problem.
I am using an Installscript MSI project, so it is possible to use Installscript if needed. However, this is my first time ever building an installer as well as using Installshield, so I am at the bottom of the learning curve with regards to IS and installscript and how to properly time all of this...
Any suggestions to assist me in getting on the right path is greatly appreciated.
Thanks in advance,
D
(11) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 07, 2008
08:25 AM
Anyone want to touch this one? Any ideas? Suggestions?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 07, 2008
09:18 AM
To edit a registry key at install time without installscript:
- Add a system search to search for the value of the key and put the result in a property (for example, SEARCH_RESULT)
- Write "[SEARCH_RESULT]appended datas" in the registry key
To edit at uninstall
- This will require a custom action, you could write the [SEARCH_RESULT] to a backup key value when installing (this can be done without InstallScript), and use it at uninstall to revert back with a simple InstallScript function.
- Add a system search to search for the value of the key and put the result in a property (for example, SEARCH_RESULT)
- Write "[SEARCH_RESULT]appended datas" in the registry key
To edit at uninstall
- This will require a custom action, you could write the [SEARCH_RESULT] to a backup key value when installing (this can be done without InstallScript), and use it at uninstall to revert back with a simple InstallScript function.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 07, 2008
04:09 PM
Jeff2008 wrote:
To edit a registry key at install time without installscript:
- Add a system search to search for the value of the key and put the result in a property (for example, SEARCH_RESULT)
- Write "[SEARCH_RESULT]appended datas" in the registry key
To edit at uninstall
- This will require a custom action, you could write the [SEARCH_RESULT] to a backup key value when installing (this can be done without InstallScript), and use it at uninstall to revert back with a simple InstallScript function.
Thanks for the suggestion, however this still doesn't seem to meet my needs. I'm going to simply create a function that gets called on install (and another for uninstall) that will use the RegDBSetKeyValueEx, grab the current value, append it and rewrite it.
On uninstall, I'll do the opposite - grab the key, remove my specific entry, and rewrite it.
does anyone know whether or not the registry stuff removed the entire Key you have entered or just the value of that key?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 10, 2008
11:38 AM
I'm in the same boat as the OP, pretty much.
Upon install, I need to let the user type in their username and password, then make some sort of HTTP request to validate that and return a GUID, which will then be written to a new key in the registry. I tried to do this with Visual Studio and Orca--I wrote a C++ DLL which contained the function to make the request and write into the registry, then tried to import that DLL into the MSI file Visual Studio created via Orca, but I kept running into problems and got frustrated.
Do MSI files that use external, customized functions during install REQUIRE C++? Or can they be in any language? I'm basically reworking a system that a previous programmer created with C++ (ugh).
Hopefully there is an easier way to do this with InstallShield. Our company has a license for IS but I haven't installed it yet. Just wondering if any experts could confirm that this is doable...
Upon install, I need to let the user type in their username and password, then make some sort of HTTP request to validate that and return a GUID, which will then be written to a new key in the registry. I tried to do this with Visual Studio and Orca--I wrote a C++ DLL which contained the function to make the request and write into the registry, then tried to import that DLL into the MSI file Visual Studio created via Orca, but I kept running into problems and got frustrated.
Do MSI files that use external, customized functions during install REQUIRE C++? Or can they be in any language? I'm basically reworking a system that a previous programmer created with C++ (ugh).
Hopefully there is an easier way to do this with InstallShield. Our company has a license for IS but I haven't installed it yet. Just wondering if any experts could confirm that this is doable...
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 11, 2008
09:41 AM
samwalker04 wrote:
I'm in the same boat as the OP, pretty much.
Upon install, I need to let the user type in their username and password, then make some sort of HTTP request to validate that and return a GUID, which will then be written to a new key in the registry. I tried to do this with Visual Studio and Orca--I wrote a C++ DLL which contained the function to make the request and write into the registry, then tried to import that DLL into the MSI file Visual Studio created via Orca, but I kept running into problems and got frustrated.
Do MSI files that use external, customized functions during install REQUIRE C++? Or can they be in any language? I'm basically reworking a system that a previous programmer created with C++ (ugh).
Hopefully there is an easier way to do this with InstallShield. Our company has a license for IS but I haven't installed it yet. Just wondering if any experts could confirm that this is doable...
sending out an http request is outside the scope of this question, and I have no idea how to go about that. I know that MSI has lots of communication tools, but you might need to extend the installscript a bit in order to access some of those API's...
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 11, 2008
01:50 PM
DWillis wrote:
sending out an http request is outside the scope of this question, and I have no idea how to go about that. I know that MSI has lots of communication tools, but you might need to extend the installscript a bit in order to access some of those API's...
Thanks for the response. I know what I described is a convoluted process but I'm basically cleaning up a previous programmer's mess and I'm in a hurry to get it finished for the client. Is the built-in help/tutorial section the best resource for InstallShield/InstallScript developers? I haven't found much of anything on the web so far.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 11, 2008
02:38 PM
samwalker04 wrote:
Thanks for the response. I know what I described is a convoluted process but I'm basically cleaning up a previous programmer's mess and I'm in a hurry to get it finished for the client. Is the built-in help/tutorial section the best resource for InstallShield/InstallScript developers? I haven't found much of anything on the web so far.
Unfortunately, I'm not sure. I would certainly start there, though. It might give you a more pointed question to ask or a direction to go in.
I found this in the IS help under user authentication:
If your One-Click Install installation requires authentication after it is started, you can authenticate the user on the fly using InstallScript. When authentication is required, the Web server returns HTTP error code 401 to your installation, which generates an InternetError event. Respond to that event by prompting the user for a user name and password in the OnInternetError event handler.
The easiest way to do so is to use the InternetErrorDlg API in WinInet.dll and return the value IDRETRY from OnInternetError. This causes the installation to issue the HTTP request for the file again. If users enter incorrect information, they will be prompted to enter it again.
Not sure if that helps, but it might point you in a direction to research. Good luck.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 11, 2008
03:19 PM
DWillis wrote:
Unfortunately, I'm not sure. I would certainly start there, though. It might give you a more pointed question to ask or a direction to go in.
I found this in the IS help under user authentication:
If your One-Click Install installation requires authentication after it is started, you can authenticate the user on the fly using InstallScript. When authentication is required, the Web server returns HTTP error code 401 to your installation, which generates an InternetError event. Respond to that event by prompting the user for a user name and password in the OnInternetError event handler.
The easiest way to do so is to use the InternetErrorDlg API in WinInet.dll and return the value IDRETRY from OnInternetError. This causes the installation to issue the HTTP request for the file again. If users enter incorrect information, they will be prompted to enter it again.
Not sure if that helps, but it might point you in a direction to research. Good luck.
That is helpful. Thank you. And sorry for hijacking your thread! 😄
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 11, 2008
03:41 PM
samwalker04 wrote:
That is helpful. Thank you. And sorry for hijacking your thread! 😄
A little further information. As I was modifying my release build settings, I came across an entire section dedicated to signing, and that included user/https authentication. I don't know any more than that because I do not require it at this time, but that might be meaningful to you.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 11, 2008
03:52 PM
DWillis wrote:
A little further information. As I was modifying my release build settings, I came across an entire section dedicated to signing, and that included user/https authentication. I don't know any more than that because I do not require it at this time, but that might be meaningful to you.
Interesting. Where did you browse to in the Help file to find that section?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 11, 2008
04:08 PM
Do a search on release view. You'll find that view in the media->releases-[release type] section in the editor.
![](/skins/images/8CE4FAD0DE6F3A6F9D0567434D2D2DAE/responsive_peak/images/icon_anonymous_message.png)