Skip to content

Commit

Permalink
fixed the \u0027 issue
Browse files Browse the repository at this point in the history
  • Loading branch information
dzmanto committed Jun 26, 2019
1 parent 65e9007 commit 9f89ba8
Show file tree
Hide file tree
Showing 2 changed files with 160 additions and 0 deletions.
9 changes: 9 additions & 0 deletions bangwallpaper42.vbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Option Explicit
Dim WshShell

Set WshShell = CreateObject("WScript.Shell")

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

set WshShell = nothing
WScript.Quit
151 changes: 151 additions & 0 deletions inst_routine.nsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
SetCompressor /SOLID /FINAL lzma

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

!include MUI2.nsh
!include nsDialogs.nsh
!include LogicLib.nsh

!define MUI_WELCOMEPAGE
!define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKCU"
!define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\$(^Name)"
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder"
!define MUI_DIRECTORYPAGE
; !insertmacro MUI_PAGE_COMPONENTS

Var SMDir

!insertmacro MUI_PAGE_WELCOME
;Start Menu Folder Page Configuration
!insertmacro MUI_PAGE_STARTMENU 0 $SMDir
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES

!define MUI_FINISHPAGE_RUN "$SYSDIR\wscript.exe"
!define MUI_FINISHPAGE_RUN_PARAMETERS "/E:vbscript $\"$INSTDIR\bangwallpaper42.vbs$\""
!define MUI_FINISHPAGE_RUN_TEXT $(Message_complete)
!define MUI_FINISHPAGE_RUN_CHECKED
!insertmacro MUI_PAGE_FINISH
!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES

!insertmacro MUI_LANGUAGE "English"
!insertmacro MUI_LANGUAGE "French"
!insertmacro MUI_LANGUAGE "German"
LangString Message_complete ${LANG_ENGLISH} "Installation complete. Run Bang Wallpaper Plus now?"
LangString Message_complete ${LANG_FRENCH} "Installation complète. Veuillez exécuter Bang Wallpaper Plus maintenant?"
LangString Message_complete ${LANG_GERMAN} "Fertig. Bang Wallpaper Plus jetzt ausführen?"
LangString Message_startup ${LANG_ENGLISH} "&Create startup item"
LangString Message_startup ${LANG_FRENCH} "&Créer un élément de démarrage"
LangString Message_startup ${LANG_GERMAN} "&Autostart-Element erstellen"

Function .onInit
FunctionEnd

; The name of the installer
Name "Bang Wallpaper Plus"

; The file to write
OutFile bang.exe

; The default installation directory
InstallDir "$DESKTOP\Bang Wallpaper Plus"

; Icon
Icon parrot.ico

; Request application privileges for Windows Vista
RequestExecutionLevel user

; The stuff to install
Section "" ;No components page, name is not important

; Set output path to the installation directory.
SetOutPath $INSTDIR
WriteUninstaller "uninstall.exe"

; Put file there
File bang.ini
File bangwallpaper42.vbs
File guisttngs.ps1
File HELP.hta
File parrot.ico
File README.txt
File rotanconv31.ps1
File settings.vbs

CreateShortcut "$SMSTARTUP\Bang Wallpaper Plus.lnk" $INSTDIR\bangwallpaper42.vbs "" $INSTDIR\parrot.ico 0
SectionEnd ; end the section

Section -StartMenu
!insertmacro MUI_STARTMENU_WRITE_BEGIN 0 ;This macro sets $SMDir and skips to MUI_STARTMENU_WRITE_END if the "Don't create shortcuts" checkbox is checked...
CreateDirectory "$SMPrograms\$SMDir"
; CreateShortCut "$SMPROGRAMS\$SMDir\Bang Wallpaper Plus.lnk" "$\"$INSTDIR\bangwallpaper42.vbs$\""
CreateShortcut "$SMPROGRAMS\$SMDir\Bang Wallpaper Plus.lnk" $INSTDIR\bangwallpaper42.vbs "" $INSTDIR\parrot.ico 0
CreateShortcut "$SMPROGRAMS\$SMDir\Help.lnk" $INSTDIR\HELP.hta
CreateShortcut "$SMPROGRAMS\$SMDir\Settings.lnk" $INSTDIR\settings.vbs "" $INSTDIR\parrot.ico 0
CreateShortcut "$SMPROGRAMS\$SMDir\Uninstall.lnk" $INSTDIR\uninstall.exe
!insertmacro MUI_STARTMENU_WRITE_END
SectionEnd

Function .onInstSuccess
; MessageBox MB_YESNO "$(Message_complete)" IDNO NoRun
; Exec '"$SYSDIR\wscript.exe" //E:vbscript "$INSTDIR\bangwallpaper42.vbs"' ; run bang
; Sleep 3000
; NoRun:
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
Delete $INSTDIR\bang.ini
Delete $INSTDIR\bingimage.jpg
Delete $INSTDIR\bingimagean.bmp
Delete $INSTDIR\desc.txt
Delete $INSTDIR\dumpproxy.ps1
Delete $INSTDIR\dumpproxy.txt
Delete $INSTDIR\guisttngs.ps1
Delete $INSTDIR\HELP.hta
Delete $INSTDIR\heise
Delete $INSTDIR\hostinfo
Delete $INSTDIR\log.txt
Delete $INSTDIR\parrot.ico
Delete $INSTDIR\pwd.txt
Delete $INSTDIR\README.txt
Delete $INSTDIR\rotanconv31.ps1
Delete $INSTDIR\rotanconv30.ps1
Delete $INSTDIR\rotanconv29.ps1
Delete $INSTDIR\rotanconv28.ps1
Delete $INSTDIR\rotanconv26.ps1
Delete $INSTDIR\rotanconv25.ps1
Delete $INSTDIR\rotanconv23.ps1
Delete $INSTDIR\rotanconv22.ps1
Delete $INSTDIR\rotanconv21.ps1
Delete $INSTDIR\rotanconv20.ps1
Delete $INSTDIR\rotanconv19.ps1
Delete $INSTDIR\rotanconv18.ps1
Delete $INSTDIR\rotanconv17.ps1
Delete $INSTDIR\rotanconv16.ps1
Delete $INSTDIR\rotanconv11.ps1
Delete $INSTDIR\rotanconv10.ps1
Delete $INSTDIR\rotanconv7.ps1
Delete $INSTDIR\settings.vbs
Delete $INSTDIR\uninstall.exe
RMDir /REBOOTOK $INSTDIR

!insertmacro MUI_STARTMENU_GETFOLDER 0 $SMDir

Delete "$SMSTARTUP\Bang Wallpaper Plus.lnk"
Delete "$SMPROGRAMS\$SMDir\Bang Wallpaper Plus.lnk"
Delete "$SMPROGRAMS\$SMDir\Help.lnk"
Delete "$SMPROGRAMS\$SMDir\Settings.lnk"
Delete "$SMPROGRAMS\$SMDir\Uninstall.lnk"
RMDIR "$SMPROGRAMS\$SMDir"
SectionEnd

; Todo: registry key check via exec external vbs, request creation of startup folder items, dialog for registry modifications;

0 comments on commit 9f89ba8

Please sign in to comment.