Skip to content
This repository was archived by the owner on Nov 16, 2023. It is now read-only.

Commit 59ef223

Browse files
committed
uninstaller & firewall fixes
1 parent 4583eaa commit 59ef223

File tree

4 files changed

+16
-2
lines changed

4 files changed

+16
-2
lines changed

Clab/network/network.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,11 @@ public static void run_as_admin()
126126
}
127127
catch (Exception)
128128
{
129-
MessageBox.Show("Please run Clab as administrator next time. This is required to configure the firewall");
129+
MessageBox.Show(new Form { TopMost = true },
130+
"Please run Clab as administrator next time. This is required to configure the firewall",
131+
"Firewall Configuration [Access Denied]",
132+
MessageBoxButtons.OK,
133+
MessageBoxIcon.Exclamation);
130134
}
131135

132136
Environment.Exit(0);

ClabUninstall/ClabUninstall.csproj

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
<ApplicationManifest>app.manifest</ApplicationManifest>
77
<Version>0.0.1</Version>
88
<ApplicationIcon>icon\uninstall.ico</ApplicationIcon>
9+
<AssemblyName>uninstall</AssemblyName>
910
</PropertyGroup>
1011

1112
<ItemGroup>
@@ -20,4 +21,10 @@
2021
</COMReference>
2122
</ItemGroup>
2223

24+
<ItemGroup>
25+
<None Update="uninstall.cmd">
26+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
27+
</None>
28+
</ItemGroup>
29+
2330
</Project>

ClabUninstall/icon/uninstall.ico

-1.2 KB
Binary file not shown.

ClabUninstall/uninstall.cmd

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
@echo off
22
set filepath=%1
33
cd ..
4-
start cmd.exe /k "timeout 2 > NUL && rmdir /s /q %filepath%"
4+
tasklist | find /i "Clab.exe" && taskkill /im Clab.exe /F || echo "Clab.exe" not running
5+
echo Uninstalling Clab...
6+
timeout 2 > NUL
7+
rmdir /s /q %filepath%

0 commit comments

Comments
 (0)