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

Commit

Permalink
uninstaller & firewall fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
2trvl committed Jan 16, 2022
1 parent 4583eaa commit 59ef223
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 2 deletions.
6 changes: 5 additions & 1 deletion Clab/network/network.cs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,11 @@ public static void run_as_admin()
}
catch (Exception)
{
MessageBox.Show("Please run Clab as administrator next time. This is required to configure the firewall");
MessageBox.Show(new Form { TopMost = true },
"Please run Clab as administrator next time. This is required to configure the firewall",
"Firewall Configuration [Access Denied]",
MessageBoxButtons.OK,
MessageBoxIcon.Exclamation);
}

Environment.Exit(0);
Expand Down
7 changes: 7 additions & 0 deletions ClabUninstall/ClabUninstall.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<ApplicationManifest>app.manifest</ApplicationManifest>
<Version>0.0.1</Version>
<ApplicationIcon>icon\uninstall.ico</ApplicationIcon>
<AssemblyName>uninstall</AssemblyName>
</PropertyGroup>

<ItemGroup>
Expand All @@ -20,4 +21,10 @@
</COMReference>
</ItemGroup>

<ItemGroup>
<None Update="uninstall.cmd">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>

</Project>
Binary file modified ClabUninstall/icon/uninstall.ico
Binary file not shown.
5 changes: 4 additions & 1 deletion ClabUninstall/uninstall.cmd
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
@echo off
set filepath=%1
cd ..
start cmd.exe /k "timeout 2 > NUL && rmdir /s /q %filepath%"
tasklist | find /i "Clab.exe" && taskkill /im Clab.exe /F || echo "Clab.exe" not running
echo Uninstalling Clab...
timeout 2 > NUL
rmdir /s /q %filepath%

0 comments on commit 59ef223

Please sign in to comment.