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!

hunibang89
Posts: 5
Joined: Thu Oct 15, 2015 2:45 am

How to use Environment

hi..

i want to use Environment...

i set Environment value..(category..in System Changes)

and i made custom actions launch file..
launch file is windows batch file.
i write above Environment this batch file..

so i execute installer...and launch file(custom actions) was execute...
however...my batch file dont read environment...
why???
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: How to use Environment

Hello,

I'm not sure I fully understand your scenario. Can you please give us more details?

By the way, the modifications to the environment variables do not result in an immediate change. The list of environment variables is being loaded when the process is initialized but not refreshed. In order to have the newly created environment variable you can have a custom action that will force a refresh of the environment variables. Basically you need to broadcast a settings change message to all windows in the system so that any interested application can perform an update.

For details, please check the How to propagate environment variables to the system article.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
hunibang89
Posts: 5
Joined: Thu Oct 15, 2015 2:45 am

Re: How to use Environment

um...

i made installer..

1. installer project make
2. Files and Folders ----- add application folder
3. Environments ---- set "WQMS_HOME"([APPDIR]) , "WQMS_PORT"([WQMS_PORT]) [WQMS_PORT] is dialog input value.
4. Custom Actions --- set that Launch File is batch file in application folder.

Launch file(batch file) should use Environment(WQMS_HOME, WQMS_PORT)....
and I execute my project installer....Batch file don't use Environment....
Tell me How to use ???????
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: How to use Environment

Hello,

If you want to execute a .bat file custom action and pass installer properties, please take a look on the How to launch a CMD or BAT file? article with related information for hints and guidance.

If that didn't helped either, please send us the .AIP (project file) to support at advancedinstaller dot com so we can investigate it? If it contains confidential information you can send us a small test project which reproduce this behavior.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”