[APPDIR] Init APPDIR with Regedit Path Value (Solved) - 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!

alavoler
Posts: 45
Joined: Thu Mar 12, 2009 4:29 pm
Location: France
Contact: Website

[APPDIR] Init APPDIR with Regedit Path Value (Solved)

Hi !

version: 6.9.1

I release an "Extention Setup" for an application.

I have a Path value in Regedit.

I would like to init APPDIR with this value, it is possible ?


thanks
Last edited by alavoler on Tue May 05, 2009 8:57 pm, edited 1 time in total.
alavoler
Posts: 45
Joined: Thu Mar 12, 2009 4:29 pm
Location: France
Contact: Website

Re: [APPDIR] How to Init APPDIR with Regedit Path Value

pathNew = GetReg(....)

Session.Property("APPDIR") = pathNew ;

? in VB custom action ?

Or SetTargetPath ?


arf...

Set S = CreateObject("RegEdit.Server") : Session.Property("APPDIR") = S.GetKey("HKLM\SOFTWARE\...\...\InstallPath");

Error... in script inline ( the problem is : Set S = CreateObject("RegEdit.Server")...)

Bug ?
alavoler
Posts: 45
Joined: Thu Mar 12, 2009 4:29 pm
Location: France
Contact: Website

Re: [APPDIR] How to Init APPDIR with Regedit Path Value

SOLVED

Set WSHShell = CreateObject("WScript.Shell") : Session.Property("APPDIR") = WSHShell.RegRead("HKLM\SOFTWARE\...\....\InstallPath")


EDIT:
thanks cosmin !
Last edited by alavoler on Wed May 06, 2009 12:52 pm, edited 1 time in total.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: [APPDIR] Init APPDIR with Regedit Path Value (Solved)

Hi,

Another approach for what you need is to use a search to retrieve the registry value. The property of the search can then be used by a Property set with formatted custom action to set "APPDIR". This custom action can use the search property in its condition to run only if the search finds something.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”