I trying to add a path variable using InstallShield 2014 (InstallScript project)
I managed to append add path variable using this code:
sRegKey = "SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment";
szKey="Environment";
RegDBSetDefaultRoot(HKEY_CURRENT_USER);
GetEnvVar("PATH", svEnvVar);
sNewPath= svEnvVar + "My Path";
nResult1 = RegDBSetKeyValueEx(szKey,"PATH",REGDB_STRING,sNewPath,-1);
The problem is that when unINstalling the exe file the all Path variables are deleted. Is there another way to add the path variable without deleting it on uninstall?
Thanks,