/build/static/layout/Breadcrumb_cap_w.png

Change regkey value in MSI.

I have an app which needs to set:

HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon

allocatecdroms=1

However, on our client this key is already there as "0". Therefore when the MSI is run the value doesn't get changed. I know I could run a batchfile to delete the value before the install is run, but I was wandering if there is a way to remove this key in the MSI, before the key is added (with value "1)?

Thanks,

Mike.

0 Comments   [ + ] Show comments

Answers (9)

Posted by: cygan 17 years ago
Fifth Degree Brown Belt
0
ORIGINAL: Meic

I have an app which needs to set:

HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon

allocatecdroms=1

However, on our client this key is already there as "0". Therefore when the MSI is run the value doesn't get changed. I know I could run a batchfile to delete the value before the install is run, but I was wandering if there is a way to remove this key in the MSI, before the key is added (with value "1)?

Thanks,

Mike.


not sure when you say is there a way to remove this key in the msi before the key is added ( with value "1")

but if you are saying you want to run the reg file with a value of "1"

then set the value to 1 and export the reg file into the application directory in the msi

then run the reg file with a custom action using REGEDIT/ S <c:\program files\app name\regfile.reg>

sequence after installfinalize with a condition Not Installed

what packaging tool are you using
Posted by: gmorgan618 17 years ago
Blue Belt
0
Why not use the RemoveRegistry Table within that MSI?
Posted by: Meic 17 years ago
Second Degree Blue Belt
0
Thanks very much for your replies, will try your suggestions tomorrow.
Posted by: cygan 17 years ago
Fifth Degree Brown Belt
0
please clarify if you want to run a reg file or if you only want to delete a reg key when the msi installs


you can also use the REGDELETE function to delete the regkey
Posted by: Meic 17 years ago
Second Degree Blue Belt
0
Basically I just want to change the value of a regkey that's on the client. I was looking for a way to delete the regkey within the MSI, then put the regkey down again with the new value i.e. "1" instead of "0".

Cheers.
Posted by: AB 17 years ago
Purple Belt
0
Adding a registry key in your MSI to the value you require will override any existing key value...
In your example, the 'allocatecdroms' key has a value of '0'
Your MSI should contain the same key location but with a value of '1'
When you install your MSI, the value will change - to '1'
If you then uninstall your MSI - the key will be removed
Test...
Regards,
Al
Posted by: fosteky 17 years ago
Purple Belt
0
I believe AB is correct, it should be simple. Maybe there's something else wrong that in your testing you think the MSI won't write to that registry value - like permissions?

Is it Nero?
Posted by: AB 17 years ago
Purple Belt
0
Thanks Kyle
Initial test - Admin - works
Secondary test - locked down - works
Thirdly- works over, lets go out and get stinking drunk
Hooray...
Registry, do do
What is it good for
Absolutely nothing
Say it again...
Regards,
Al

Plan a sense us...
Your job title is PACKAGING SPECIALIST
i'M A packagerneer

What interesting job titles have you guys and girls been given / made up?
Posted by: Meic 17 years ago
Second Degree Blue Belt
0
Thanks for you replies - I got it working in the end by adding the key via vbscript in custom action. For some reason having te regkey in the MSI just would't change that particular key. Fosteky - Yes, it was Nero 7 Premium. Cheers.
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ