Commit cf71e79d authored by Gabriel Moreau's avatar Gabriel Moreau
Browse files

-Try a standalone version

parent ac22bcd2
SOFT:=Kasperky-Uninstall
VERSION:=$(shell grep '!define VERSION' ../../package.nsi | cut -f 2 -d '"')
PATCH:=1
.PHONY: all help update clean key zip ocs
all: key zip ocs
help:
@echo "all create a zip archive"
@echo "ocs help for upload the Zip archive in OCS server"
@echo "clean clean folder"
@echo "update make a git pull (update local repository)"
update:
(cd ../..; git pull)
clean:
rm -f $(SOFT)-$(VERSION)-$(PATCH).zip
rm -rf tmp
rm -rf *.key Custom-Var*.psm1
key:
@pwsh set-password-encrypted.ps1
zip: $(SOFT)-$(VERSION)-$(PATCH).zip
%.zip: Makefile
mkdir -p tmp
perl -p -e ' \
s/^(SET\ssoftversion=)\d[\.\d]+/$${1}$(VERSION)/; \
s/^(SET\ssoftpatch=)\d+/$${1}$(PATCH)/;' install.bat > tmp/install.bat
rm -f $@
(cd tmp; \
cp ../../../Modules/SWMB.psm1 ../../../Modules/SWMB/Custom.psm1 ../../../Modules/SWMB/Custom-VarDefault.psm1 ../../../Modules/SWMB/Experimental.psm1 ./; \
cp ../README.md ../get-password-cleartext.ps1 ../set-password-encrypted.ps1 ./; \
cp ../uninstall-kaspersky-standalone.ps1 ./uninstall-kasperskyps1; \
cp ../Custom-VarAutodel.psm1 ../*.key ./; \
zip -r ../$@ install.bat README.md *.ps1 *.psm1 *.key \
)
chmod ugo+rw $@
ocs:
@echo ""
@echo "Name: $(SOFT)-$(VERSION)-$(PATCH)"
@echo "priority: 2"
@echo "Launch: install.bat"
@echo "Message: no"
@echo ""
@echo "RESINFO GT SWMB"
@echo " --- "
@echo "Remove software $(SOFT)"
@echo ""
ECHO OFF
SET softversion=1.0
SET softpatch=1
SET softname=kasperkey Endpoint - Uninstall
SET regkey=SWMB
SET softpublisher=RESINFO GT SWMB
SET logfile="C:\Program Files\SWMB\logfile.txt"
SET pwrsh=%WINDIR%\System32\WindowsPowerShell\V1.0\powershell.exe
IF EXIST "%WINDIR%\Sysnative\WindowsPowerShell\V1.0\powershell.exe" SET pwrsh=%WINDIR%\Sysnative\WindowsPowerShell\V1.0\powershell.exe
REM add rights
%pwrsh% Set-ExecutionPolicy RemoteSigned -Force -Scope LocalMachine
REM unblock
%pwrsh% "Unblock-File -Path .\uninstall-kaspersky.ps1"
REM execute
%pwrsh% -File ".\uninstall-kaspersky.ps1"
EXIT
# Test Custom Variables
If (!(Test-Path -LiteralPath ".\Custom-VarOverload.psm1") -And !(Test-Path -LiteralPath ".\Custom-VarAutodel.psm1")) {
Write-Output "You must have a Custom-VarOverload.psm1 configuration file"
Write-Output "(or Custom-VarAutodel.psm1) in the current folder to define"
Write-Output "credentials for uninstalling Kaspersky Endpoint software."
Exit
}
# Import module
Import-Module SWMB.psm1
Import-Module Custom.psm1
Import-Module Experimental.psm1
# Initialize
SWMB_Init
# Load one tweak (can be called multiple times)
# Unloads the tweak if it starts with the exclamation mark (!)
SWMB_AddOrRemoveTweak "UninstallKasperskyEndpoint"
# Execute all loaded tweaks (presets)
SWMB_RunTweaks
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment