Where should call Custom Action for Set Environment Variable - 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!

udayk
Posts: 126
Joined: Thu Jan 19, 2012 12:30 pm

Where should call Custom Action for Set Environment Variable

Hi Team,

Can any one please tell me about for which type of standard action is good for set Environment variables through custom action.

I tried WriteEnvironmentStrings,Commit and CostFinalize,
the above 3 standard actions are not good for Set Environment Variables through Custom action.

can any once please help me on this issue.

Thank you,
Udayk.
udayk
Posts: 126
Joined: Thu Jan 19, 2012 12:30 pm

Re: Where should call Custom Action for Set Environment Vari

Thank you Mihai,

I solved this in another process, its working fine.

But, i set environment variables of JAVA_HOME and Path, but the service is unable to find JAVA_HOME and Path.
I think it requires restart will be needed after setting Environment variables through CA, How should i restart System after setting Environment variable through CA, and continuing next process.

Can you please reply about requirement.

Thank you,
Mihai.
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Where should call Custom Action for Set Environment Vari

Hi Udayk,

Why don't you use our Environment Variables Page functionality regarding this?
http://www.advancedinstaller.com/user-g ... ables.html

However, please keep in mind that a System Environment Variable cannot be referenced by the installation process during which it's created. A solution you can try is to add a pre-install prerequisite that creates the environment variable instead.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
udayk
Posts: 126
Joined: Thu Jan 19, 2012 12:30 pm

Re: Where should call Custom Action for Set Environment Vari

Mihai,

You said a solution to add a pre-install prerequisite that creates the environment variable instead.

Ok, but where should i create Pre-install prerequisite in AI, can you please tell me breifly.

Thank you,
Udayk
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Where should call Custom Action for Set Environment Vari

Hi Udayk,
where should i create Pre-install prerequisite in AI
From the Prerequisites page:
http://www.advancedinstaller.com/user-g ... sites.html

Best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
udayk
Posts: 126
Joined: Thu Jan 19, 2012 12:30 pm

Re: Where should call Custom Action for Set Environment Vari

Thank you mihai,

I resolve this issue.

Return to “Common Problems”