forked from Future-Power-Networks/Simplus-Grid-Tool
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathUninstallSimplusGT.m
39 lines (29 loc) · 937 Bytes
/
UninstallSimplusGT.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
% This file uninstalls the SimplusGT.
% Author(s): Yitong Li
function UninstallSimplusGT()
clc
%% Generate bar msg
UninstallMsg = 'Uninstalling Simplus Grid Tool. This may take a few seconds... ';
bar = waitbar(0.3,UninstallMsg,'Name','Simplus');
bar.CloseRequestFcn = '';
%% Uninstall
% Change the current folder
fprintf('Changing the current folder to the toolbox folder...\n')
MfileName = mfilename('fullpath');
[RootPath,~,~] = fileparts(MfileName);
cd(RootPath);
% Remove folder from path
rmpath(genpath(pwd));
restoredefaultpath;
savepath;
clc;
fprintf('Simplus Grid Tool successfully uninstalled! \n')
fprintf('Many thanks for using! \n')
fprintf('Please delete the files manually if you want to fully remove Simplus Grid Tool from your PC. \n')
%% Remove bar msg
beep;
waitbar(1,bar,UninstallMsg,'Name','Simplus');
pause(1);
delete(bar);
msgbox('Simplus Grid Tool successfully unstalled!','Simplus');
end