Skip to content

Commit 0fde0bc

Browse files
V0.1.0
1 parent 67bb6da commit 0fde0bc

File tree

8 files changed

+58
-38
lines changed

8 files changed

+58
-38
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
# User-specific files (MonoDevelop/Xamarin Studio)
1414
*.userprefs
15+
/Releases
1516

1617
# Mono auto generated files
1718
mono_crash.*

Arduino2xUninstall/Arduino2xUninstall.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
<Nullable>enable</Nullable>
77
<ApplicationManifest>app.manifest</ApplicationManifest>
88
<RootNamespace>Arduino2xUninstaller</RootNamespace>
9+
<AssemblyVersion>0.1.0.0</AssemblyVersion>
910
</PropertyGroup>
1011

1112
<ItemGroup>

Arduino2xUninstall/ArduinoUninstaller.cs

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
using Arduino2xUninstaller.Properties;
44
using System.Diagnostics;
55
using Addio.Windows;
6+
using System.Reflection;
67

78
namespace Arduino2xUninstaller
89
{
@@ -64,11 +65,18 @@ public static class ArduinoUninstaller
6465

6566
static ArduinoUninstaller()
6667
{
67-
string[] guids = Resources.KnownGUIDs.Split(Environment.NewLine);
68+
//Load list of known GUIDs.
69+
//This will save the app from having to manually search for the GUID of the registry keys.
70+
string knownGuidsPath = Path.Combine(Directory.GetParent(Assembly.GetEntryAssembly().Location).FullName, "Resources\\KnownGUIDs.txt");
6871

69-
foreach(string guid in guids)
72+
if (File.Exists(knownGuidsPath))
7073
{
71-
knownGUIDs.Add(new Guid(guid));
74+
string[] guids = File.ReadAllLines(knownGuidsPath);
75+
76+
foreach (string guid in guids)
77+
{
78+
knownGUIDs.Add(new Guid(guid));
79+
}
7280
}
7381

7482
ConfirmGuids();
@@ -178,27 +186,27 @@ private static void ConfirmGuids()
178186
}
179187

180188
//All users has not been confirmed, search for a registry key in LocalMachine.
181-
if (allUsersGuid != Guid.Empty)
189+
if (allUsersGuid == Guid.Empty)
182190
using (machineSoftwareKey = Registry.LocalMachine.OpenSubKey("SOFTWARE"))
183191
{
184192
if (machineSoftwareKey != null)
185193
{
186194
Guid guid = Search(machineSoftwareKey);
187195

188-
if (guid != null)
196+
if (guid != Guid.Empty)
189197
allUsersGuid = guid;
190198
}
191199
}
192200

193201
//Current user has not been confirmed, search for a registry key in CurrentUser.
194-
if (currentUserGuid != Guid.Empty)
202+
if (currentUserGuid == Guid.Empty)
195203
using (userSoftwareKey = Registry.CurrentUser.OpenSubKey("SOFTWARE"))
196204
{
197205
if (userSoftwareKey != null)
198206
{
199207
Guid guid = Search(userSoftwareKey);
200208

201-
if (guid != null)
209+
if (guid != Guid.Empty)
202210
currentUserGuid = guid;
203211
}
204212
}

Arduino2xUninstaller/Arduino2xUninstaller.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
<RepositoryUrl>https://github.com/AddioElectronics/Arduino2xUninstaller</RepositoryUrl>
1515
<RepositoryType>git</RepositoryType>
1616
<ApplicationManifest>app.manifest</ApplicationManifest>
17+
<AssemblyVersion>0.1.0.0</AssemblyVersion>
1718
</PropertyGroup>
1819

1920
<ItemGroup>

Arduino2xUninstaller/MainForm.Designer.cs

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Arduino2xUninstaller/MainForm.cs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,17 +54,14 @@ private void button_Uninstall_Click(object sender, EventArgs e)
5454

5555
private void repoToolStripMenuItem_Click(object sender, EventArgs e)
5656
{
57-
Process.Start("https://github.com/AddioElectronics/Arduino2xUninstaller");
57+
Process.Start(new ProcessStartInfo("https://github.com/AddioElectronics/Arduino2xUninstaller") { UseShellExecute = true});
5858
}
5959

6060
private void aboutToolStripMenuItem_Click(object sender, EventArgs e)
6161
{
62-
string message = @"The official Arduino 2x Uninstaller can some times
63-
produce a false positive for the Arduino IDE being
64-
open, and will not uninstall the product.
65-
This program manually removes the registry keys
66-
and deletes the files.
67-
Only use when the official uninstaller fails.
62+
string message = @"The official Arduino 2x Uninstaller can produce false positives for open Arduino IDE instances, and will effectively freeze the uninstall.
63+
This program manually removes the registry keys and deletes the files.
64+
It's recommended to use the official uninstaller when possible.
6865
Use at your own risk.";
6966

7067

LICENSE

Lines changed: 0 additions & 21 deletions
This file was deleted.

README.md

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,35 @@
1-
# Arduino2xUninstaller
1+
# Arduino2xUninstaller (V0.1.0)
22
Uninstalls Arduino 2x from a windows system, for the event the official Uninstaller fails to run.
3+
4+
The official Arduino IDE uninstaller for version 2.0.0 can some times (or in my case, every time) detect a false positive that there are Ardunio IDE instances running, and will effectivly "freeze" the uninstall. This application manually removes the Registry entries, and files from the system.
5+
6+
Will remove installations that were installed with either "All Users" or "Current User," at the same time.
7+
8+
### Usage
9+
10+
Run the Arduino2xUninstaller.exe file and click "Uninstall."
11+
12+
`Optional` If you know the GUID of the registry keys, you can place it in "Resources\KnownGUIDs.txt." This is not required, but saves the program from having to search for it, and assures that the correct key will be used.
13+
14+
15+
#### Disclaimer
16+
There are inherent dangers in the use of any software available for download on the Internet, and we caution you to make sure that you completely understand the potential risks before downloading any of the software.
17+
18+
The Software and code samples available on this website are provided "as is" without warranty of any kind, either express or implied. Use at your own risk.
19+
20+
The use of the software and scripts downloaded on this site is done at your own discretion and risk and with agreement that you will be solely responsible for any damage to your computer system or loss of data that results from such activities. You are solely responsible for adequate protection and backup of the data and equipment used in connection with any of the software, and we will not be liable for any damages that you may suffer in connection with using, modifying or distributing any of this software. No advice or information, whether oral or written, obtained by you from us or from this website shall create any warranty for the software.
21+
22+
We make makes no warranty that
23+
24+
the software will meet your requirements
25+
the software will be uninterrupted, timely, secure or error-free
26+
the results that may be obtained from the use of the software will be effective, accurate or reliable
27+
the quality of the software will meet your expectations
28+
any errors in the software obtained from us will be corrected.
29+
The software, code sample and their documentation made available on this website:
30+
31+
could include technical or other mistakes, inaccuracies or typographical errors. We may make changes to the software or documentation made available on its web site at any time without prior-notice.
32+
may be out of date, and we make no commitment to update such materials.
33+
We assume no responsibility for errors or omissions in the software or documentation available from its web site.
34+
35+
In no event shall we be liable to you or any third parties for any special, punitive, incidental, indirect or consequential damages of any kind, or any damages whatsoever, including, without limitation, those resulting from loss of use, data or profits, and on any theory of liability, arising out of or in connection with the use of this software.

0 commit comments

Comments
 (0)