fmorales
Level 3

Launch a function for refresh environment variables

Hello, I am adding some variables to the registre Enviroment user key but I can not reboot the machine after install the program.

I can see in this post that calling this function it refresh the environment settings but I do not know how to call the function

Vhttp://community.flexerasoftware.com/showthread.php?130316-Refreshing-environment&highlight=environm...

I have tried in the "Behavior and Login" -> "InstallScripts" ... to create a new file, .. .It creates a new function but I do not know how it works or how to call it..

any help would be very appreciated.

Thanks
Labels (1)
0 Kudos
5 Replies
Not applicable

What project type are you using? (InstallScript, InstallScript MSI, Basic MSI?
0 Kudos
fmorales
Level 3

Kevin.Wan wrote:
What project type are you using? (InstallScript, InstallScript MSI, Basic MSI?


Hello, It is a Basic MSI, ... I have create a InstallScript and I have associated it in the custom action and Sequences for executed after IsSelfRegisterFinaliza ... but It does not works.

My machine is a Windows 7 (64 bits) ...

Thanks a lot
0 Kudos
weakness
Level 6

Hello.

Why don't you try the following code.

Environment Variables Example
http://kb.flexerasoftware.com/doc/Helpnet/installshield18helplib/GetresEnv_variable_example.htm

InstallScript Engine has changed since Version 2010 for Unicode. So, some legacy code may not work.

( In this case, 2012 Example code uses WPOINTER instead of POINTER. )
0 Kudos
RobertDickau
Flexera Alumni

If you use the Environment Variables view in the System Configuration view group (which goes into your MSI installer's Environment table) instead of writing directly to the registry, you might avoid the need for that script.
0 Kudos
Dhanaraj
Level 2

This script is not working in windows 7 and more...
any idea?

Thanks,
Dhanaraj
0 Kudos