Installing registry key ONLY if Windows XP - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

leapingdog
Posts: 6
Joined: Fri Apr 09, 2010 5:39 am

Installing registry key ONLY if Windows XP

During my software installation I need to create a registry key ONLY if the operating system is Windows XP.

I am not sure if I need to use the Resources > Registry in order to do this conditional key creation, or do it somewhere else. I need the installer to automatically detect the OS and then create the key if XP. I did create a Custom Behavior as shown below to detect the OS. Now I need to know what to do next. If you could be as detailed as possible it would be very helpful.

Thanks,

Jon

Within the Custom Behavior > SEARCH section >WINDOWS_VERSION > CurrentVersion:
- Root: HKEY_LOCAL_MACHINE
- KEY: SOFTWARE\Microsoft\Windows NT\CurrentVersion
- Name: CurrentVersion
- Type: Retrieve the raw value
octavian.vasilovici
Posts: 51
Joined: Tue Jan 25, 2011 2:43 pm

Re: Installing registry key ONLY if Windows XP

Hello,

In order to install a registry based on the OS version (in your case Windows XP) you must take these steps:

- Go to "Registry" Page and create your Registry in the desired location.
- Once this is done, from the context menu select "Go To Component" or press F8. This will take you in the "Organization" Page with the registry component selected.
- In the right pane in "Condition" field write

Code: Select all

VersionNT = 501
. This article explains how to define resources based on the version of OS.

If you have any other questions, please don't hesitate to contact us.

Best regards,
Octavian
_______________________________________________________________________________________________________________________________________________
Octavian Vasilovici
Advanced Installer Team
http://www.advancedinstaller.com/
Octavian Vasilovici - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”