----------------------------------------------------------- New Message on BDOTNET
----------------------------------------------------------- From: dotNetSamurai Message 1 in Discussion Hi People, I am installing a couple of .NET and non-.NET applications, using a Setup and Deployment Project. I need to create an Environment variable, (System Variable, of System/Global scope is system and not the current process), at the installation time. One of the .NET Application will require that Environment Variable to be passed to it at the time of execution. System.Environment class doesn't provide any way to Create a new Environment variable, but the wayaround suggested by MS is to PInvoke 'SetEnvironmentVariable()' method of Kernel32.dll. It creates an Environment variable but only for the current process..... But I need to create one for the System level scope. I tried creating a string value under the HKeyLocalMachine\SYSTEM\CurrentControlSet\Control\Session Manager\Environment, which though creates the Environment variable but doesn't loads it into the memory, untill the system restarts.... which I don't want.. Can anyone tell me a way to somehow Inject this newly created Enviromnet Variable in memory... or an Win32 API which can be used to create and simultaneously load the created system variable in memory, so that it can be used by the specific application, with out restarting the system. thanx in advance, Saurabh ----------------------------------------------------------- To stop getting this e-mail, or change how often it arrives, go to your E-mail Settings. http://groups.msn.com/bdotnet/_emailsettings.msnw Need help? If you've forgotten your password, please go to Passport Member Services. http://groups.msn.com/_passportredir.msnw?ppmprop=help For other questions or feedback, go to our Contact Us page. http://groups.msn.com/contact If you do not want to receive future e-mail from this MSN group, or if you received this message by mistake, please click the "Remove" link below. On the pre-addressed e-mail message that opens, simply click "Send". Your e-mail address will be deleted from this group's mailing list. mailto:[EMAIL PROTECTED]
