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!

Sains
Posts: 6
Joined: Wed Sep 07, 2016 2:54 am

Write registry value based on path name from user

Hi there AI Forums,

In my installer, I would like to:

1. get (from the user during installation) the path name to a network location that contains a file (not the same path as the installed app, which is on the local machine)

2. use that path to create a registry value (to be exact, a "trusted location" for an MS Access file)

I have managed to add registry keys/values in the "Registry" section of AI, but I don't know how to do it based on a variable (the path) gathered from a user. Can anyone please tell me if this is possible, and if so, how to do it?

Cheers,

Sains.
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Write registry value based on path name from user

Hi Sains and welcome to Advanced Installer forums.

In order to add a registry entry that contains the value of a property you can follow the "Add registry keys and values to your package" tutorial.

Let me know if this helped, otherwise give me more details about your scenario.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Sains
Posts: 6
Joined: Wed Sep 07, 2016 2:54 am

Re: Write registry value based on path name from user

Hi Eusebiu,

Thanks for you reply. The issue is that I want to add a value (in the form of a network path) that I need to get from the user during the install.

To be specific- my applicaton is an MS Access file, which is on a network location that is determined by the user and I won't know. I want to get the installer to ask the user where the MS Access file is on the network, so that I can use that to enter a registry value that contains the path and registers it as a "trusted location" for MS Access. This is because I want my application to open without the user needing to go into the MS Access trust centre and do it themselves. I hope that makes sense, even if you are not familiar with MS Access at all.

Cheers,

Andrew
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Write registry value based on path name from user

Hi Andrew,

In order to get the network path from the user you can use an "Edit Box" control on one of your dialogs where the user can write that path. Then you can write the property related to that edit box in the registry as explained in the tutorial I mentioned above.

If you want to give the user the option to browse for that file you can implement in your project the method described in the "Browse for file" tutorial.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”