├── .gitattributes ├── .gitignore ├── LICENSE ├── PathEditor.sln ├── PathEditor ├── App.config ├── HelpForm.Designer.cs ├── HelpForm.cs ├── HelpForm.resx ├── MainForm.Designer.cs ├── MainForm.Designer.resx ├── MainForm.cs ├── PathEditor.csproj ├── Program.cs └── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ ├── Resources.resx │ ├── Settings.Designer.cs │ └── Settings.settings └── README.md /.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | 6 | ############################################################################### 7 | # Set default behavior for command prompt diff. 8 | # 9 | # This is need for earlier builds of msysgit that does not have it on by 10 | # default for csharp files. 11 | # Note: This is only used by command line 12 | ############################################################################### 13 | #*.cs diff=csharp 14 | 15 | ############################################################################### 16 | # Set the merge driver for project and solution files 17 | # 18 | # Merging from the command prompt will add diff markers to the files if there 19 | # are conflicts (Merging from VS is not affected by the settings below, in VS 20 | # the diff markers are never inserted). Diff markers may cause the following 21 | # file extensions to fail to load in VS. An alternative would be to treat 22 | # these files as binary and thus will always conflict and require user 23 | # intervention with every merge. To do so, just uncomment the entries below 24 | ############################################################################### 25 | #*.sln merge=binary 26 | #*.csproj merge=binary 27 | #*.vbproj merge=binary 28 | #*.vcxproj merge=binary 29 | #*.vcproj merge=binary 30 | #*.dbproj merge=binary 31 | #*.fsproj merge=binary 32 | #*.lsproj merge=binary 33 | #*.wixproj merge=binary 34 | #*.modelproj merge=binary 35 | #*.sqlproj merge=binary 36 | #*.wwaproj merge=binary 37 | 38 | ############################################################################### 39 | # behavior for image files 40 | # 41 | # image files are treated as binary by default. 42 | ############################################################################### 43 | #*.jpg binary 44 | #*.png binary 45 | #*.gif binary 46 | 47 | ############################################################################### 48 | # diff behavior for common document formats 49 | # 50 | # Convert binary document formats to text before diffing them. This feature 51 | # is only available from the command line. Turn it on by uncommenting the 52 | # entries below. 53 | ############################################################################### 54 | #*.doc diff=astextplain 55 | #*.DOC diff=astextplain 56 | #*.docx diff=astextplain 57 | #*.DOCX diff=astextplain 58 | #*.dot diff=astextplain 59 | #*.DOT diff=astextplain 60 | #*.pdf diff=astextplain 61 | #*.PDF diff=astextplain 62 | #*.rtf diff=astextplain 63 | #*.RTF diff=astextplain 64 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | 4 | # User-specific files 5 | *.suo 6 | *.user 7 | *.userosscache 8 | *.sln.docstates 9 | 10 | # User-specific files (MonoDevelop/Xamarin Studio) 11 | *.userprefs 12 | 13 | # Build results 14 | [Dd]ebug/ 15 | [Dd]ebugPublic/ 16 | [Rr]elease/ 17 | [Rr]eleases/ 18 | x64/ 19 | x86/ 20 | build/ 21 | bld/ 22 | [Bb]in/ 23 | [Oo]bj/ 24 | 25 | # Visual Studio 2015 cache/options directory 26 | .vs/ 27 | 28 | # MSTest test Results 29 | [Tt]est[Rr]esult*/ 30 | [Bb]uild[Ll]og.* 31 | 32 | # NUNIT 33 | *.VisualState.xml 34 | TestResult.xml 35 | 36 | # Build Results of an ATL Project 37 | [Dd]ebugPS/ 38 | [Rr]eleasePS/ 39 | dlldata.c 40 | 41 | # DNX 42 | project.lock.json 43 | artifacts/ 44 | 45 | *_i.c 46 | *_p.c 47 | *_i.h 48 | *.ilk 49 | *.meta 50 | *.obj 51 | *.pch 52 | *.pdb 53 | *.pgc 54 | *.pgd 55 | *.rsp 56 | *.sbr 57 | *.tlb 58 | *.tli 59 | *.tlh 60 | *.tmp 61 | *.tmp_proj 62 | *.log 63 | *.vspscc 64 | *.vssscc 65 | .builds 66 | *.pidb 67 | *.svclog 68 | *.scc 69 | 70 | # Chutzpah Test files 71 | _Chutzpah* 72 | 73 | # Visual C++ cache files 74 | ipch/ 75 | *.aps 76 | *.ncb 77 | *.opensdf 78 | *.sdf 79 | *.cachefile 80 | 81 | # Visual Studio profiler 82 | *.psess 83 | *.vsp 84 | *.vspx 85 | 86 | # TFS 2012 Local Workspace 87 | $tf/ 88 | 89 | # Guidance Automation Toolkit 90 | *.gpState 91 | 92 | # ReSharper is a .NET coding add-in 93 | _ReSharper*/ 94 | *.[Rr]e[Ss]harper 95 | *.DotSettings.user 96 | 97 | # JustCode is a .NET coding add-in 98 | .JustCode 99 | 100 | # TeamCity is a build add-in 101 | _TeamCity* 102 | 103 | # DotCover is a Code Coverage Tool 104 | *.dotCover 105 | 106 | # NCrunch 107 | _NCrunch_* 108 | .*crunch*.local.xml 109 | 110 | # MightyMoose 111 | *.mm.* 112 | AutoTest.Net/ 113 | 114 | # Web workbench (sass) 115 | .sass-cache/ 116 | 117 | # Installshield output folder 118 | [Ee]xpress/ 119 | 120 | # DocProject is a documentation generator add-in 121 | DocProject/buildhelp/ 122 | DocProject/Help/*.HxT 123 | DocProject/Help/*.HxC 124 | DocProject/Help/*.hhc 125 | DocProject/Help/*.hhk 126 | DocProject/Help/*.hhp 127 | DocProject/Help/Html2 128 | DocProject/Help/html 129 | 130 | # Click-Once directory 131 | publish/ 132 | 133 | # Publish Web Output 134 | *.[Pp]ublish.xml 135 | *.azurePubxml 136 | ## TODO: Comment the next line if you want to checkin your 137 | ## web deploy settings but do note that will include unencrypted 138 | ## passwords 139 | #*.pubxml 140 | 141 | *.publishproj 142 | 143 | # NuGet Packages 144 | *.nupkg 145 | # The packages folder can be ignored because of Package Restore 146 | **/packages/* 147 | # except build/, which is used as an MSBuild target. 148 | !**/packages/build/ 149 | # Uncomment if necessary however generally it will be regenerated when needed 150 | #!**/packages/repositories.config 151 | 152 | # Windows Azure Build Output 153 | csx/ 154 | *.build.csdef 155 | 156 | # Windows Store app package directory 157 | AppPackages/ 158 | 159 | # Visual Studio cache files 160 | # files ending in .cache can be ignored 161 | *.[Cc]ache 162 | # but keep track of directories ending in .cache 163 | !*.[Cc]ache/ 164 | 165 | # Others 166 | ClientBin/ 167 | [Ss]tyle[Cc]op.* 168 | ~$* 169 | *~ 170 | *.dbmdl 171 | *.dbproj.schemaview 172 | *.pfx 173 | *.publishsettings 174 | node_modules/ 175 | orleans.codegen.cs 176 | 177 | # RIA/Silverlight projects 178 | Generated_Code/ 179 | 180 | # Backup & report files from converting an old project file 181 | # to a newer Visual Studio version. Backup files are not needed, 182 | # because we have git ;-) 183 | _UpgradeReport_Files/ 184 | Backup*/ 185 | UpgradeLog*.XML 186 | UpgradeLog*.htm 187 | 188 | # SQL Server files 189 | *.mdf 190 | *.ldf 191 | 192 | # Business Intelligence projects 193 | *.rdl.data 194 | *.bim.layout 195 | *.bim_*.settings 196 | 197 | # Microsoft Fakes 198 | FakesAssemblies/ 199 | 200 | # Node.js Tools for Visual Studio 201 | .ntvs_analysis.dat 202 | 203 | # Visual Studio 6 build log 204 | *.plg 205 | 206 | # Visual Studio 6 workspace options file 207 | *.opt 208 | 209 | # LightSwitch generated files 210 | GeneratedArtifacts/ 211 | _Pvt_Extensions/ 212 | ModelManifest.xml 213 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Syntox32 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /PathEditor.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 14 4 | VisualStudioVersion = 14.0.23107.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PathEditor", "PathEditor\PathEditor.csproj", "{4E3C3749-FFBB-4B9C-9CD7-C350864CD9CD}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Debug|x64 = Debug|x64 12 | Debug|x86 = Debug|x86 13 | Release|Any CPU = Release|Any CPU 14 | Release|x64 = Release|x64 15 | Release|x86 = Release|x86 16 | EndGlobalSection 17 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 18 | {4E3C3749-FFBB-4B9C-9CD7-C350864CD9CD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 19 | {4E3C3749-FFBB-4B9C-9CD7-C350864CD9CD}.Debug|Any CPU.Build.0 = Debug|Any CPU 20 | {4E3C3749-FFBB-4B9C-9CD7-C350864CD9CD}.Debug|x64.ActiveCfg = Debug|x64 21 | {4E3C3749-FFBB-4B9C-9CD7-C350864CD9CD}.Debug|x64.Build.0 = Debug|x64 22 | {4E3C3749-FFBB-4B9C-9CD7-C350864CD9CD}.Debug|x86.ActiveCfg = Debug|x86 23 | {4E3C3749-FFBB-4B9C-9CD7-C350864CD9CD}.Debug|x86.Build.0 = Debug|x86 24 | {4E3C3749-FFBB-4B9C-9CD7-C350864CD9CD}.Release|Any CPU.ActiveCfg = Release|Any CPU 25 | {4E3C3749-FFBB-4B9C-9CD7-C350864CD9CD}.Release|Any CPU.Build.0 = Release|Any CPU 26 | {4E3C3749-FFBB-4B9C-9CD7-C350864CD9CD}.Release|x64.ActiveCfg = Release|x64 27 | {4E3C3749-FFBB-4B9C-9CD7-C350864CD9CD}.Release|x64.Build.0 = Release|x64 28 | {4E3C3749-FFBB-4B9C-9CD7-C350864CD9CD}.Release|x86.ActiveCfg = Release|x86 29 | {4E3C3749-FFBB-4B9C-9CD7-C350864CD9CD}.Release|x86.Build.0 = Release|x86 30 | EndGlobalSection 31 | GlobalSection(SolutionProperties) = preSolution 32 | HideSolutionNode = FALSE 33 | EndGlobalSection 34 | EndGlobal 35 | -------------------------------------------------------------------------------- /PathEditor/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /PathEditor/HelpForm.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace PathEditor 2 | { 3 | partial class HelpForm 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | this.label1 = new System.Windows.Forms.Label(); 32 | this.linkLabel1 = new System.Windows.Forms.LinkLabel(); 33 | this.label2 = new System.Windows.Forms.Label(); 34 | this.SuspendLayout(); 35 | // 36 | // label1 37 | // 38 | this.label1.AutoSize = true; 39 | this.label1.Location = new System.Drawing.Point(32, 65); 40 | this.label1.Name = "label1"; 41 | this.label1.Size = new System.Drawing.Size(189, 13); 42 | this.label1.TabIndex = 0; 43 | this.label1.Text = "You may find help and source code at:"; 44 | // 45 | // linkLabel1 46 | // 47 | this.linkLabel1.AutoSize = true; 48 | this.linkLabel1.Location = new System.Drawing.Point(32, 89); 49 | this.linkLabel1.Name = "linkLabel1"; 50 | this.linkLabel1.Size = new System.Drawing.Size(198, 13); 51 | this.linkLabel1.TabIndex = 1; 52 | this.linkLabel1.TabStop = true; 53 | this.linkLabel1.Text = "https://github.com/Syntox32/PathEditor"; 54 | this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked); 55 | // 56 | // label2 57 | // 58 | this.label2.AutoSize = true; 59 | this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 60 | this.label2.Location = new System.Drawing.Point(31, 26); 61 | this.label2.Name = "label2"; 62 | this.label2.Size = new System.Drawing.Size(150, 24); 63 | this.label2.TabIndex = 2; 64 | this.label2.Text = "PathEditor v1.0.1"; 65 | // 66 | // HelpForm 67 | // 68 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 69 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 70 | this.ClientSize = new System.Drawing.Size(274, 135); 71 | this.Controls.Add(this.label2); 72 | this.Controls.Add(this.linkLabel1); 73 | this.Controls.Add(this.label1); 74 | this.MaximizeBox = false; 75 | this.MinimizeBox = false; 76 | this.Name = "HelpForm"; 77 | this.Text = "PathEditor v1.0.1"; 78 | this.ResumeLayout(false); 79 | this.PerformLayout(); 80 | 81 | } 82 | 83 | #endregion 84 | 85 | private System.Windows.Forms.Label label1; 86 | private System.Windows.Forms.LinkLabel linkLabel1; 87 | private System.Windows.Forms.Label label2; 88 | } 89 | } -------------------------------------------------------------------------------- /PathEditor/HelpForm.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Threading.Tasks; 9 | using System.Windows.Forms; 10 | 11 | namespace PathEditor 12 | { 13 | public partial class HelpForm : Form 14 | { 15 | public HelpForm() 16 | { 17 | InitializeComponent(); 18 | } 19 | 20 | private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) 21 | { 22 | System.Diagnostics.Process.Start("https://github.com/Syntox32/PathEditor"); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /PathEditor/HelpForm.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | -------------------------------------------------------------------------------- /PathEditor/MainForm.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace PathEditor 2 | { 3 | partial class MainForm 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | this.btnApply = new System.Windows.Forms.Button(); 32 | this.listView1 = new System.Windows.Forms.ListView(); 33 | this.menuStrip1 = new System.Windows.Forms.MenuStrip(); 34 | this.toolsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 35 | this.menuItemBackup = new System.Windows.Forms.ToolStripMenuItem(); 36 | this.menuItemLoad = new System.Windows.Forms.ToolStripMenuItem(); 37 | this.menuItemInvalidate = new System.Windows.Forms.ToolStripMenuItem(); 38 | this.menuItemAutoBackup = new System.Windows.Forms.ToolStripMenuItem(); 39 | this.menuItemSwitch = new System.Windows.Forms.ToolStripMenuItem(); 40 | this.btnAdd = new System.Windows.Forms.Button(); 41 | this.txtAdd = new System.Windows.Forms.TextBox(); 42 | this.btnBrowse = new System.Windows.Forms.Button(); 43 | this.menuItemHelp = new System.Windows.Forms.ToolStripMenuItem(); 44 | this.menuStrip1.SuspendLayout(); 45 | this.SuspendLayout(); 46 | // 47 | // btnApply 48 | // 49 | this.btnApply.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 50 | this.btnApply.Location = new System.Drawing.Point(311, 275); 51 | this.btnApply.Name = "btnApply"; 52 | this.btnApply.Size = new System.Drawing.Size(148, 23); 53 | this.btnApply.TabIndex = 0; 54 | this.btnApply.Text = "Apply Changes"; 55 | this.btnApply.UseVisualStyleBackColor = true; 56 | this.btnApply.Click += new System.EventHandler(this.btnApply_Click); 57 | // 58 | // listView1 59 | // 60 | this.listView1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 61 | | System.Windows.Forms.AnchorStyles.Left) 62 | | System.Windows.Forms.AnchorStyles.Right))); 63 | this.listView1.Location = new System.Drawing.Point(12, 59); 64 | this.listView1.Name = "listView1"; 65 | this.listView1.Size = new System.Drawing.Size(447, 210); 66 | this.listView1.TabIndex = 3; 67 | this.listView1.UseCompatibleStateImageBehavior = false; 68 | this.listView1.View = System.Windows.Forms.View.Details; 69 | // 70 | // menuStrip1 71 | // 72 | this.menuStrip1.BackColor = System.Drawing.Color.White; 73 | this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { 74 | this.toolsToolStripMenuItem, 75 | this.menuItemSwitch, 76 | this.menuItemHelp}); 77 | this.menuStrip1.Location = new System.Drawing.Point(0, 0); 78 | this.menuStrip1.Name = "menuStrip1"; 79 | this.menuStrip1.Size = new System.Drawing.Size(471, 24); 80 | this.menuStrip1.TabIndex = 4; 81 | this.menuStrip1.Text = "menuStrip1"; 82 | // 83 | // toolsToolStripMenuItem 84 | // 85 | this.toolsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { 86 | this.menuItemBackup, 87 | this.menuItemLoad, 88 | this.menuItemInvalidate, 89 | this.menuItemAutoBackup}); 90 | this.toolsToolStripMenuItem.Name = "toolsToolStripMenuItem"; 91 | this.toolsToolStripMenuItem.Size = new System.Drawing.Size(47, 20); 92 | this.toolsToolStripMenuItem.Text = "Tools"; 93 | // 94 | // menuItemBackup 95 | // 96 | this.menuItemBackup.Name = "menuItemBackup"; 97 | this.menuItemBackup.Size = new System.Drawing.Size(211, 22); 98 | this.menuItemBackup.Text = "Backup"; 99 | this.menuItemBackup.Click += new System.EventHandler(this.menuItemBackup_Click); 100 | // 101 | // menuItemLoad 102 | // 103 | this.menuItemLoad.Name = "menuItemLoad"; 104 | this.menuItemLoad.Size = new System.Drawing.Size(211, 22); 105 | this.menuItemLoad.Text = "Load backup"; 106 | this.menuItemLoad.Click += new System.EventHandler(this.menuItemLoad_Click); 107 | // 108 | // menuItemInvalidate 109 | // 110 | this.menuItemInvalidate.Name = "menuItemInvalidate"; 111 | this.menuItemInvalidate.Size = new System.Drawing.Size(211, 22); 112 | this.menuItemInvalidate.Text = "Invalidate paths"; 113 | this.menuItemInvalidate.Click += new System.EventHandler(this.menuItemInvalidate_Click); 114 | // 115 | // menuItemAutoBackup 116 | // 117 | this.menuItemAutoBackup.Checked = true; 118 | this.menuItemAutoBackup.CheckState = System.Windows.Forms.CheckState.Checked; 119 | this.menuItemAutoBackup.Name = "menuItemAutoBackup"; 120 | this.menuItemAutoBackup.Size = new System.Drawing.Size(211, 22); 121 | this.menuItemAutoBackup.Text = "Auto backup before apply"; 122 | this.menuItemAutoBackup.Click += new System.EventHandler(this.menuItemAutoBackup_Click); 123 | // 124 | // menuItemSwitch 125 | // 126 | this.menuItemSwitch.Name = "menuItemSwitch"; 127 | this.menuItemSwitch.Size = new System.Drawing.Size(94, 20); 128 | this.menuItemSwitch.Text = "Switch to User"; 129 | this.menuItemSwitch.Click += new System.EventHandler(this.menuItemSwitch_Click); 130 | // 131 | // btnAdd 132 | // 133 | this.btnAdd.Location = new System.Drawing.Point(12, 30); 134 | this.btnAdd.Name = "btnAdd"; 135 | this.btnAdd.Size = new System.Drawing.Size(75, 23); 136 | this.btnAdd.TabIndex = 5; 137 | this.btnAdd.Text = "Add"; 138 | this.btnAdd.UseVisualStyleBackColor = true; 139 | this.btnAdd.Click += new System.EventHandler(this.btnAdd_Click); 140 | // 141 | // txtAdd 142 | // 143 | this.txtAdd.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 144 | | System.Windows.Forms.AnchorStyles.Right))); 145 | this.txtAdd.Location = new System.Drawing.Point(93, 32); 146 | this.txtAdd.Name = "txtAdd"; 147 | this.txtAdd.Size = new System.Drawing.Size(323, 20); 148 | this.txtAdd.TabIndex = 6; 149 | // 150 | // btnBrowse 151 | // 152 | this.btnBrowse.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); 153 | this.btnBrowse.Location = new System.Drawing.Point(422, 30); 154 | this.btnBrowse.Name = "btnBrowse"; 155 | this.btnBrowse.Size = new System.Drawing.Size(37, 23); 156 | this.btnBrowse.TabIndex = 7; 157 | this.btnBrowse.Text = "..."; 158 | this.btnBrowse.UseVisualStyleBackColor = true; 159 | this.btnBrowse.Click += new System.EventHandler(this.btnBrowse_Click); 160 | // 161 | // menuItemHelp 162 | // 163 | this.menuItemHelp.Name = "menuItemHelp"; 164 | this.menuItemHelp.Size = new System.Drawing.Size(44, 20); 165 | this.menuItemHelp.Text = "Help"; 166 | this.menuItemHelp.Click += new System.EventHandler(this.menuItemHelp_Click); 167 | // 168 | // MainForm 169 | // 170 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 171 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 172 | this.ClientSize = new System.Drawing.Size(471, 305); 173 | this.Controls.Add(this.btnBrowse); 174 | this.Controls.Add(this.txtAdd); 175 | this.Controls.Add(this.btnAdd); 176 | this.Controls.Add(this.listView1); 177 | this.Controls.Add(this.btnApply); 178 | this.Controls.Add(this.menuStrip1); 179 | this.MainMenuStrip = this.menuStrip1; 180 | this.Name = "MainForm"; 181 | this.Text = "Path Editor"; 182 | this.Load += new System.EventHandler(this.LoadMain); 183 | this.menuStrip1.ResumeLayout(false); 184 | this.menuStrip1.PerformLayout(); 185 | this.ResumeLayout(false); 186 | this.PerformLayout(); 187 | 188 | } 189 | 190 | #endregion 191 | 192 | private System.Windows.Forms.Button btnApply; 193 | private System.Windows.Forms.ListView listView1; 194 | private System.Windows.Forms.MenuStrip menuStrip1; 195 | private System.Windows.Forms.Button btnAdd; 196 | private System.Windows.Forms.TextBox txtAdd; 197 | private System.Windows.Forms.ToolStripMenuItem menuItemSwitch; 198 | private System.Windows.Forms.Button btnBrowse; 199 | private System.Windows.Forms.ToolStripMenuItem toolsToolStripMenuItem; 200 | private System.Windows.Forms.ToolStripMenuItem menuItemBackup; 201 | private System.Windows.Forms.ToolStripMenuItem menuItemAutoBackup; 202 | private System.Windows.Forms.ToolStripMenuItem menuItemInvalidate; 203 | private System.Windows.Forms.ToolStripMenuItem menuItemHelp; 204 | private System.Windows.Forms.ToolStripMenuItem menuItemLoad; 205 | } 206 | } 207 | 208 | -------------------------------------------------------------------------------- /PathEditor/MainForm.Designer.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | 17, 17 122 | 123 | -------------------------------------------------------------------------------- /PathEditor/MainForm.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Threading.Tasks; 9 | using System.Windows.Forms; 10 | using System.Runtime; 11 | using System.IO; 12 | 13 | namespace PathEditor 14 | { 15 | public partial class MainForm : Form 16 | { 17 | private Context _currentContext { get; set; } 18 | private bool _backupBeforeApply { get; set; } 19 | 20 | public MainForm() 21 | { 22 | InitializeComponent(); 23 | } 24 | 25 | #region Controls 26 | 27 | private void btnApply_Click(object sender, EventArgs e) 28 | { 29 | ApplyPrompt(); 30 | } 31 | 32 | private void btnAdd_Click(object sender, EventArgs e) 33 | { 34 | AddNewVar(txtAdd.Text); 35 | } 36 | 37 | private void menuItemSwitch_Click(object sender, EventArgs e) 38 | { 39 | ToggleContext(); 40 | } 41 | 42 | private void menuItemHelp_Click(object sender, System.EventArgs e) 43 | { 44 | using (var help = new HelpForm()) 45 | help.ShowDialog(); 46 | } 47 | 48 | private void menuItemInvalidate_Click(object sender, EventArgs e) 49 | { 50 | InvalidatePaths(_currentContext); 51 | } 52 | 53 | private void menuItemAutoBackup_Click(object sender, EventArgs e) 54 | { 55 | menuItemAutoBackup.Checked = !menuItemAutoBackup.Checked; 56 | _backupBeforeApply = menuItemAutoBackup.Checked; 57 | } 58 | 59 | private void menuItemBackup_Click(object sender, EventArgs e) 60 | { 61 | using (var dialog = new SaveFileDialog()) 62 | { 63 | dialog.DefaultExt = "txt"; 64 | dialog.FileName = GetBackupName(); 65 | 66 | dialog.ShowDialog(); 67 | 68 | CreateBackup(_currentContext, dialog.FileName); 69 | } 70 | } 71 | 72 | private void menuItemLoad_Click(object sender, EventArgs e) 73 | { 74 | using (var dialog = new OpenFileDialog()) 75 | { 76 | dialog.CheckFileExists = true; 77 | dialog.Multiselect = false; 78 | 79 | dialog.ShowDialog(); 80 | 81 | LoadBackup(dialog.FileName); 82 | } 83 | } 84 | 85 | private void btnBrowse_Click(object sender, EventArgs e) 86 | { 87 | using (var dialog = new FolderBrowserDialog()) 88 | { 89 | var result = dialog.ShowDialog(); 90 | if (result == DialogResult.OK) 91 | { 92 | if (Directory.Exists(dialog.SelectedPath)) 93 | { 94 | txtAdd.BackColor = Color.LightGreen; 95 | } 96 | else 97 | { 98 | txtAdd.BackColor = Color.Red; 99 | } 100 | 101 | txtAdd.Text = dialog.SelectedPath; 102 | } 103 | } 104 | } 105 | 106 | #endregion 107 | 108 | private void LoadMain(object sender, EventArgs e) 109 | { 110 | _currentContext = Context.Global; 111 | _backupBeforeApply = menuItemAutoBackup.Checked; 112 | 113 | RefreshList(); 114 | } 115 | 116 | private void ApplyPrompt() 117 | { 118 | var backup = _backupBeforeApply 119 | ? "\nA backup of the existing path variable will be automatically created.\n" 120 | : "\nIt is recommended to create a backup before making changes.\n"; 121 | 122 | DialogResult confirm = MessageBox.Show( 123 | string.Format("You are about to apply new changes to the [{0}] PATH variable.\n{1}\nDo you wish to continue?", 124 | _currentContext.ToString(), backup), 125 | "Do you wish to continue?", 126 | MessageBoxButtons.YesNo, 127 | MessageBoxIcon.Information, MessageBoxDefaultButton.Button2); 128 | 129 | if (confirm == DialogResult.Yes) 130 | { 131 | var success = _backupBeforeApply 132 | ? AutoBackup(_currentContext) 133 | : true; 134 | 135 | if (success) 136 | { 137 | var pathVariable = ConstructPathFromList(); 138 | SetPathVariable(_currentContext, pathVariable); 139 | } 140 | else 141 | { 142 | MessageBox.Show("Could not create backup\n\nAborting.", 143 | "Error", 144 | MessageBoxButtons.OK, 145 | MessageBoxIcon.Exclamation); 146 | } 147 | } 148 | } 149 | 150 | private void ToggleContext() 151 | { 152 | _currentContext = _currentContext == Context.Global 153 | ? Context.User 154 | : Context.Global; 155 | 156 | var title = _currentContext == Context.Global 157 | ? "Switch to User" 158 | : "Switch to Global"; 159 | 160 | menuItemSwitch.Text = title; 161 | 162 | RefreshList(); 163 | } 164 | 165 | private void RefreshList() 166 | { 167 | var variables = GetPathVariable(_currentContext); 168 | InitListView(variables); 169 | } 170 | 171 | private void InitListView(List vars) 172 | { 173 | listView1.Clear(); 174 | 175 | listView1.Scrollable = true; 176 | listView1.CheckBoxes = true; 177 | listView1.FullRowSelect = true; 178 | listView1.View = View.Details; 179 | listView1.Sorting = SortOrder.Ascending; 180 | 181 | var header = new ColumnHeader(); 182 | header.Text = "Path (" + vars.Count.ToString() + ")"; 183 | header.Name = "col1"; 184 | header.Width = 600; 185 | listView1.Columns.Add(header); 186 | 187 | foreach (var v in vars) 188 | { 189 | var item = new ListViewItem(v); 190 | item.Checked = true; 191 | listView1.Items.Add(item); 192 | } 193 | } 194 | 195 | private void InvalidatePaths(Context ctx) 196 | { 197 | foreach(ListViewItem item in listView1.Items) 198 | { 199 | var exists = Directory.Exists(item.Text); 200 | 201 | item.BackColor = exists ? Color.LightGreen : Color.Red; 202 | } 203 | } 204 | 205 | private enum Context 206 | { 207 | Global = EnvironmentVariableTarget.Machine, 208 | User = EnvironmentVariableTarget.User 209 | } 210 | 211 | private void LoadBackup(string path) 212 | { 213 | try 214 | { 215 | if (!File.Exists(path)) 216 | { 217 | MessageBox.Show("File does not exists: " + path, 218 | "Error: File does not exists", 219 | MessageBoxButtons.OK, 220 | MessageBoxIcon.Exclamation); 221 | 222 | return; 223 | } 224 | 225 | var content = File.ReadAllText(path); 226 | 227 | var vars = content.Split(';') 228 | .Where(x => !string.IsNullOrWhiteSpace(x)) 229 | .ToList(); 230 | 231 | InitListView(vars); 232 | } 233 | catch(Exception ex) 234 | { 235 | MessageBox.Show(string.Format( 236 | "An error occured trying to load a backup\n\n{0}", ex.Message), 237 | "Error"); 238 | } 239 | } 240 | 241 | private bool AutoBackup(Context ctx) 242 | { 243 | var pathVar = Environment.GetEnvironmentVariable("path", 244 | (EnvironmentVariableTarget)ctx); 245 | 246 | var date = DateTime.Now.ToString("dd.MM.yy-HH.mm.ss"); 247 | var name = string.Format("path-editor-auto-backup-{0}-{1}.txt", 248 | _currentContext.ToString(), date); 249 | 250 | var path = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), name); 251 | 252 | if (File.Exists(path)) 253 | { 254 | MessageBox.Show("Could not create backup file. File already exists.", "Error", 255 | MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button2); 256 | 257 | return false; 258 | } 259 | 260 | File.WriteAllText(path, pathVar); 261 | 262 | return true; 263 | } 264 | 265 | private void CreateBackup(Context ctx, string filename) 266 | { 267 | var pathVar = Environment.GetEnvironmentVariable("path", 268 | (EnvironmentVariableTarget)ctx); 269 | 270 | if (File.Exists(filename)) 271 | { 272 | MessageBox.Show("File already exists: " + filename, 273 | "Error: File already exists", 274 | MessageBoxButtons.OK, 275 | MessageBoxIcon.Exclamation); 276 | 277 | return; 278 | } 279 | 280 | File.WriteAllText(filename, pathVar); 281 | } 282 | 283 | private string GetBackupName() 284 | { 285 | var date = DateTime.Now.ToString("dd.MM.yy-HH.mm.ss"); 286 | return string.Format("path-editor-backup-{0}-{1}", 287 | _currentContext.ToString(), date); 288 | } 289 | 290 | private List GetPathVariable(Context ctx) 291 | { 292 | var path = Environment.GetEnvironmentVariable("path", 293 | (EnvironmentVariableTarget)ctx); 294 | 295 | return path.Split(';') 296 | .Where(x => !string.IsNullOrWhiteSpace(x)) 297 | .ToList(); 298 | } 299 | 300 | private void SetPathVariable(Context ctx, string var) 301 | { 302 | var pathVar = ConstructPathFromList(); 303 | 304 | try 305 | { 306 | Environment.SetEnvironmentVariable("path", var, 307 | (EnvironmentVariableTarget)ctx); 308 | } 309 | catch(System.Security.SecurityException ex) 310 | { 311 | MessageBox.Show(string.Format("An error has occured trying to set the environment variable:\n" 312 | +"\n{0}\n\nMake sure the program is run using \"Run as Administrator\"", ex.Message), 313 | "Error - Are you sure you are running as an administrator?", 314 | MessageBoxButtons.OK, MessageBoxIcon.Exclamation); 315 | } 316 | catch(Exception ex) 317 | { 318 | MessageBox.Show(ex.Message); 319 | } 320 | } 321 | 322 | private string ConstructPathFromList() 323 | { 324 | List vars = listView1.Items 325 | .Cast() 326 | .Where(x => x.Checked) 327 | .Select(x => x.Text) 328 | .ToList(); 329 | 330 | return string.Join(";", vars); 331 | } 332 | 333 | private bool AddNewVar(string text) 334 | { 335 | if (string.IsNullOrWhiteSpace(text)) 336 | return false; 337 | 338 | if (!Directory.Exists(text)) 339 | { 340 | txtAdd.BackColor = Color.Red; 341 | return false; 342 | } 343 | else 344 | txtAdd.BackColor = DefaultBackColor; 345 | 346 | var item = new ListViewItem(); 347 | item.Checked = true; 348 | item.BackColor = Color.LightGreen; 349 | item.Text = text 350 | .TrimEnd() 351 | .TrimStart(); 352 | 353 | listView1.Items.Add(item); 354 | 355 | return true; 356 | } 357 | } 358 | } 359 | -------------------------------------------------------------------------------- /PathEditor/PathEditor.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {4E3C3749-FFBB-4B9C-9CD7-C350864CD9CD} 8 | WinExe 9 | Properties 10 | PathEditor 11 | PathEditor 12 | v4.5.2 13 | 512 14 | true 15 | 16 | 17 | AnyCPU 18 | true 19 | full 20 | false 21 | bin\Debug\ 22 | DEBUG;TRACE 23 | prompt 24 | 4 25 | 26 | 27 | AnyCPU 28 | pdbonly 29 | true 30 | bin\Release\ 31 | TRACE 32 | prompt 33 | 4 34 | 35 | 36 | true 37 | bin\x64\Debug\ 38 | DEBUG;TRACE 39 | full 40 | x64 41 | prompt 42 | MinimumRecommendedRules.ruleset 43 | true 44 | 45 | 46 | bin\x64\Release\ 47 | TRACE 48 | true 49 | pdbonly 50 | x64 51 | prompt 52 | MinimumRecommendedRules.ruleset 53 | true 54 | 55 | 56 | true 57 | bin\x86\Debug\ 58 | DEBUG;TRACE 59 | full 60 | x86 61 | prompt 62 | MinimumRecommendedRules.ruleset 63 | true 64 | 65 | 66 | bin\x86\Release\ 67 | TRACE 68 | true 69 | pdbonly 70 | x86 71 | prompt 72 | MinimumRecommendedRules.ruleset 73 | true 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | Form 91 | 92 | 93 | HelpForm.cs 94 | 95 | 96 | Form 97 | 98 | 99 | MainForm.cs 100 | 101 | 102 | 103 | 104 | HelpForm.cs 105 | 106 | 107 | MainForm.Designer.cs 108 | 109 | 110 | ResXFileCodeGenerator 111 | Resources.Designer.cs 112 | Designer 113 | 114 | 115 | True 116 | Resources.resx 117 | 118 | 119 | SettingsSingleFileGenerator 120 | Settings.Designer.cs 121 | 122 | 123 | True 124 | Settings.settings 125 | True 126 | 127 | 128 | 129 | 130 | 131 | 132 | 139 | -------------------------------------------------------------------------------- /PathEditor/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using System.Windows.Forms; 6 | 7 | namespace PathEditor 8 | { 9 | static class Program 10 | { 11 | /// 12 | /// The main entry point for the application. 13 | /// 14 | [STAThread] 15 | static void Main() 16 | { 17 | Application.EnableVisualStyles(); 18 | Application.SetCompatibleTextRenderingDefault(false); 19 | Application.Run(new MainForm()); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /PathEditor/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("PathEditor")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("PathEditor")] 13 | [assembly: AssemblyCopyright("Copyright © 2015")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("4e3c3749-ffbb-4b9c-9cd7-c350864cd9cd")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /PathEditor/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace PathEditor.Properties 12 | { 13 | 14 | 15 | /// 16 | /// A strongly-typed resource class, for looking up localized strings, etc. 17 | /// 18 | // This class was auto-generated by the StronglyTypedResourceBuilder 19 | // class via a tool like ResGen or Visual Studio. 20 | // To add or remove a member, edit your .ResX file then rerun ResGen 21 | // with the /str option, or rebuild your VS project. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources 26 | { 27 | 28 | private static global::System.Resources.ResourceManager resourceMan; 29 | 30 | private static global::System.Globalization.CultureInfo resourceCulture; 31 | 32 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 33 | internal Resources() 34 | { 35 | } 36 | 37 | /// 38 | /// Returns the cached ResourceManager instance used by this class. 39 | /// 40 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 41 | internal static global::System.Resources.ResourceManager ResourceManager 42 | { 43 | get 44 | { 45 | if ((resourceMan == null)) 46 | { 47 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("PathEditor.Properties.Resources", typeof(Resources).Assembly); 48 | resourceMan = temp; 49 | } 50 | return resourceMan; 51 | } 52 | } 53 | 54 | /// 55 | /// Overrides the current thread's CurrentUICulture property for all 56 | /// resource lookups using this strongly typed resource class. 57 | /// 58 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 59 | internal static global::System.Globalization.CultureInfo Culture 60 | { 61 | get 62 | { 63 | return resourceCulture; 64 | } 65 | set 66 | { 67 | resourceCulture = value; 68 | } 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /PathEditor/Properties/Resources.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | text/microsoft-resx 107 | 108 | 109 | 2.0 110 | 111 | 112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 113 | 114 | 115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | -------------------------------------------------------------------------------- /PathEditor/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace PathEditor.Properties 12 | { 13 | 14 | 15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] 17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase 18 | { 19 | 20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 21 | 22 | public static Settings Default 23 | { 24 | get 25 | { 26 | return defaultInstance; 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /PathEditor/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | PathEditor 2 | ========== 3 | 4 | PathEditor is the missing editor for the Windows path variable. It's simple and easy to use. 5 | 6 | ![](http://i.imgur.com/h3PqiJM.png) 7 | 8 | ### Features 9 | 10 | - Saving and loading backups 11 | - Switch between `global/machine` and `user` 12 | - Invalidate loaded paths(displayed as red if it does not exist) 13 | - Default automatic backup before applying changes 14 | 15 | **Make sure to run using "Run as Administrator" or else the program may not be allowed to edit the path variable** 16 | 17 | ### Automatic backups 18 | 19 | Automatic backups are done of the current environment variable(un-applied changes are not included). 20 | 21 | They will be found in your default documents folder. 22 | 23 | Download 24 | -------- 25 | 26 | [You can get binaries here, under releases](https://github.com/Syntox32/PathEditor/releases) 27 | 28 | Requirements 29 | ------------ 30 | 31 | Make sure to have `.NET Framework v4.5.2` or newer installed. 32 | 33 | License 34 | ------- 35 | 36 | The whole thing is licenced under an MIT license. 37 | --------------------------------------------------------------------------------