Skip to content

Commit

Permalink
greatly improved the uninstaller
Browse files Browse the repository at this point in the history
  • Loading branch information
dzmanto committed Dec 28, 2017
1 parent c00b38d commit 07aeebd
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
2 changes: 1 addition & 1 deletion bangwallpaper42.vbs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Dim WshShell

Set WshShell = CreateObject("WScript.Shell")

WshShell.Run "powershell.exe -nologo -NoProfile -ExecutionPolicy Bypass -command .\rotanconv29.ps1", 0, TRUE
WshShell.Run "powershell.exe -nologo -NoProfile -ExecutionPolicy Bypass -command .\rotanconv30.ps1", 0, TRUE

set WshShell = nothing
WScript.Quit
15 changes: 8 additions & 7 deletions inst_routine.nsi
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
; example1.nsi
;
; This script is perhaps one of the simplest NSIs you can make. All of the
; optional settings are left to their default settings. The installer simply
; prompts the user asking them where to install, and drops a copy of example1.nsi
; there.
SetCompressor /SOLID /FINAL lzma

;--------------------------------

Expand Down Expand Up @@ -76,7 +71,7 @@ File guisttngs.ps1
File HELP.hta
File parrot.ico
File README.txt
File rotanconv28.ps1
File rotanconv30.ps1
File settings.vbs

CreateShortcut "$SMSTARTUP\Bang Wallpaper Plus.lnk" $INSTDIR\bangwallpaper42.vbs "" $INSTDIR\parrot.ico 0
Expand All @@ -101,6 +96,10 @@ Function .onInstSuccess
FunctionEnd

Section "Uninstall"

nsExec::ExecToLog /OEM 'powershell -command "& {&gwmi win32_process | Where-Object {$$_.CommandLine -like \"*guisttngs.ps1*\"} } | % { \"$$(Stop-Process $$_.ProcessID)\" }"'
nsExec::ExecToLog /OEM 'powershell -command "& {&gwmi win32_process | Where-Object {$$_.CommandLine -like \"*rotanconv*\"} } | % { \"$$(Stop-Process $$_.ProcessID)\" }"'

Delete $INSTDIR\bangwallpaper43.vbs
Delete $INSTDIR\bangwallpaper42.vbs
Delete $INSTDIR\bangwallpaper40.vbs
Expand All @@ -118,6 +117,8 @@ Section "Uninstall"
Delete $INSTDIR\parrot.ico
Delete $INSTDIR\pwd.txt
Delete $INSTDIR\README.txt
Delete $INSTDIR\rotanconv30.ps1
Delete $INSTDIR\rotanconv29.ps1
Delete $INSTDIR\rotanconv28.ps1
Delete $INSTDIR\rotanconv26.ps1
Delete $INSTDIR\rotanconv25.ps1
Expand Down
5 changes: 4 additions & 1 deletion rotanconv29.ps1 → rotanconv30.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ function procstr {
[Parameter(Mandatory=$True,Position=1)]
[string]$strtoproc
)
$strtoproc = $strtoproc -replace ";" , ""
$strtoproc = $strtoproc -replace "|" , ""
$strtoproc = $strtoproc -replace """" , ""
$strtoproc = $strtoproc -replace "\\/" , "/"
$strtoproc = $strtoproc -replace "'", ""
Expand All @@ -140,6 +142,7 @@ function proctitle {
$strtoproc = $strtoproc -replace "–" , ""
$strtoproc = $strtoproc -replace "—" , ""
$strtoproc = $strtoproc -replace "‰" , ""
$strtoproc = $strtoproc -replace "|" , ""
$strtoproc = $strtoproc.trim()
return $strtoproc
}
Expand Down Expand Up @@ -211,7 +214,7 @@ function initbang {
# Resize image if necessary
$CurrentRes = (gwmi Win32_VideoController).VideoModeDescription;
if($CurrentRes.GetType().IsArray) {
$CurrentRes = [String] $CurrentResf
$CurrentRes = [String] $CurrentRes
}
$CurrentRes_split = $CurrentRes.Split("x")
$rwidth=$CurrentRes_split[0]
Expand Down

0 comments on commit 07aeebd

Please sign in to comment.