1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2
; "set program as default" script for vlc ;
3
; more infos at http://msdn.microsoft.com/en-us/library/bb776851%28VS.85%29.aspx ;
4
; and http://msdn.microsoft.com/en-us/library/bb776851%28VS.85%29.aspx ;
5
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
10
!define GetOptions `!insertmacro GetOptionsCall`
12
!macro GetOptionsCall _PARAMETERS _OPTION _RESULT
43
StrCmp $5$7 '0' notfound
44
StrCmp $5 '' trimright
70
StrCmp $7 0 trimleft trimright
118
WriteRegDWORD HKLM "Software\Clients\Media\VLC\InstallInfo" "IconsVisible" 0
119
SetShellVarContext all ; Set $DESKTOP to All Users
120
${Unless} ${FileExists} "$DESKTOP\VLC media player.lnk"
121
SetShellVarContext current ; Set $DESKTOP to the current user's desktop
123
${If} ${FileExists} "$DESKTOP\VLC media player.lnk"
124
Delete "$DESKTOP\VLC media player.lnk"
126
${If} ${FileExists} "$QUICKLAUNCH\VLC media player.lnk"
127
Delete "$QUICKLAUNCH\VLC media player.lnk"
130
!define HideIcons "!insertmacro HideIcons"
134
WriteRegDWORD HKLM "Software\Clients\Media\VLC\InstallInfo" "IconsVisible" 1
135
SetShellVarContext all ; Set $DESKTOP to All Users
136
${Unless} ${FileExists} "$DESKTOP\VLC media player.lnk"
137
CreateShortCut "$DESKTOP\VLC media player.lnk" "$EXEDIR\vlc.exe" "" "$EXEDIR\vlc.exe" 0
139
${Unless} ${FileExists} "$QUICKLAUNCH\VLC media player.lnk"
140
CreateShortCut "$QUICKLAUNCH\VLC media player.lnk" "$EXEDIR\vlc.exe" "" "$EXEDIR\vlc.exe" 0
143
!define ShowIcons "!insertmacro ShowIcons"
146
MessageBox MB_OK "Not implemented"
148
!define Reinstall "!insertmacro reinstall"
151
SetShellVarContext all
154
${GetOptions} $CMDLINE "HideIcons" $R0
157
!insertmacro HideIcons
160
${GetOptions} $CMDLINE "ShowIcons" $R0
163
!insertmacro ShowIcons
166
${GetOptions} $CMDLINE "Reinstall" $R0
169
!insertmacro Reinstall
174
;"setup" is aded to the file name to trigger the UAC heuristic and request admin privileges
175
OutFile "spad-setup.exe"
b'\\ No newline at end of file'