|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
|
Announcements
Chapters
Services
Feature Zones
|
Note: This is an unedited contribution. If this article is inappropriate,
needs attention or copies someone else's work without reference then please
Report This Article
News18/12/2007 EnvMan-1.3 Released
IntroductionEnvironment Variables Manager (EnvMan) is a tool written in C# .Net intended to handle the administration of Windows Shell Environment Variables. It is designed to replace Control Panel System Environment Manager and easily manage long variable values. EnvMan User GuideInstallationIn order to run this program you need to have .Net 2.0 runtime installed. After installing .Net 2.0 runtime download program binaries from the EnvMan Project Website. Unzip EnvMan-x.x.x.x.zip file to where you want and set a short cut to EnvMan.exe file to desktop or start menu. You are now ready to run application. In the future I am planning to offer a choice of Windows Installer (MSI) setups and "ClickOnce" for installations and upgrades.Using a programWindows Environment Variables Manager (EnvMan) has a simple interface similar to common Environment Variables Editing tool in Systems control panel.
Every change performed by side buttons can be undone or redone using arrow buttons. Tool Tip on these buttons shows an action they are going to perform. Keep in mind, if you used undo and then performed an action, every redo command is cleared after that action. Variable Import/ExportThere are two new buttons on the top right of the Edit Form. Variable values can now be exported to an *.env XML file and imported on the different computer or user. The only restriction is that you cannot import values from the different variable. If variable name does not match it will not import and will display a message. It is also possible to create new variables using import. Open new variable by clicking "New" on the Main Form and use import button to import values from selected ENV file. Name of the variable will be loaded as well.
All imported values will have a "+" sign on their type icons. Open in Explorer context menuNew context menu added to a grid in Edit Form. If right click on the path value of the variable and select "Open in Windows Explorer" it will launch Windows Explorer with first valid folder or file selected. If command used on the non-path value then message will be displayed that no valid paths can be selected. Running on VistaTo use EnvMan under Vista it should be run with an Administrator privileges. To make it run as Administrator by default open properties of the EnvMan.exe or a shortcut to it.
Select compatibility tab and check "Run this program as an Administrator" check box.
If you want to apply this setting to all users click on "Show settings for all users button" and check "Run this program as an Administrator" check box.
Click OK on every dialog. Now EnvMan.exe will have all the rights to save environment variables. This applies to all versions of the EnvMan. For more tips and instructions please visit EnvMan project Home Page. Code behindSystem Environment Variables ManagementWhole application is based around of idea of using System.Environment class and its GetEnvironmentVariables, GetEnvironmentVariable, SetEnvironmentVariable functions. A list of values separated by ';' is divided into separate strings and loaded into the grid to allow easy manipulation. Below is an extract of the source code used to load and save environment variables: public IDictionary GetEnvVariables(EnvironmentVariableTarget varType)
{
return Environment.GetEnvironmentVariables(varType);
}
public string GetEnvVariable(string varName, EnvironmentVariableTarget varType)
{
return Environment.GetEnvironmentVariable(varName, varType);
}
public void SetEnvironmentVariable(string varName, string varValue, EnvironmentVariableTarget varType)
{
ValidateVariables(varName, varValue);
Environment.SetEnvironmentVariable(varName, varValue, varType);
}
public void DeleteEnvironmentVariable(string varName, EnvironmentVariableTarget varType)
{
SetEnvironmentVariable(varName, null, varType);
}
LicenceThis program is distributed under the terms of the GNU General Public License v3 or later. History of Releases and User GuidesGetting Started Guide - V1.0.0.0Variable value types - V1.1.0.0 Interface improvements - V1.1.0.1 Fixed minimum form sizes - V1.1.0.2 Unlimited Undo/Redo - V1.1.1.0 Save changes on Cancel? - V1.3 HistoryVersion 1.3
Version 1.2.2
Version 1.2.1
Version 1.2
Version 1.1.2
Version 1.1.1.0
Version 1.1.0.2
Version 1.1.0.1
Version 1.1.0.0 Released on project site at SourceForge SupportEnvMan project Home Page If you have problems getting latest demo and source files from SourceForge try downloading CodeProject files below.
|
||||||||||||||||||||||