Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Vista and Environment variables


4 replies to this topic

Blackdog

Blackdog
  • Full Members
  • 64 posts

Posted 08 March 2007 - 21:58

Testing a script on Vista. IS 6.3.

I have a routine that tries to obtain an environment variable. I am using GetEnvVar. I had this variable set once and went into Control Panel-System and removed it. I could also go to a Dos-Prompt window and type SET environment-name and get the value. So I reset the machine and checked System and the Dos-Prompt window and the variable is not present. However, when running the script, I always get the environment variable again!

I wonder if doing a Restart is much different than a shutdowm and boot up. Does Restart clear out and reload the environment variables? Doe anyone have problems with environment variables and GetEnvVar with Vista?

Just performed a complete shut down, let the machine set, and turned back on. The environment variable (which does not show up in Systems or using SET command) was there again! What is going on? Why is the environment variable coming back? Why doesn't it go away? I am using Administrator login.


Edited by Blackdog, 08 March 2007 - 22:46.


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 13 March 2007 - 22:28

Are you removing it for the correct user (elevated install)?

Blackdog

Blackdog
  • Full Members
  • 64 posts

Posted 16 March 2007 - 20:26

Sorry, stefan, I don't know what you are referring to as 'elevated install'.

When I remove it is as an Administrator or with Admnistrator rights using System in Control Panel. Then I reboot. It still shows up. It is a system wide environment variable that is used by our software on the machine.

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 20 March 2007 - 16:37

There are two types of environment variables: system and user (there are tow windows on that dialog box). Make sure you remove it in both, and your setup runs as the same user. Otherwise it may still be there "per-user" for another user.

Blackdog

Blackdog
  • Full Members
  • 64 posts

Posted 22 March 2007 - 16:52

The environment variable only occurs in System variables. Never in User.
We never figured out how to remove the environment variable and I was forced to modify the script to accept it and process it instead of the scripts normal processing (which controlled the issuances of the variable because it involved sequential numbering). I was hoping this was an issue someone experienced and was able to handle. Thanks for taking a look.