|
46 | 46 | ;Name and File
|
47 | 47 | Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
|
48 | 48 | OutFile "Hubble-${PRODUCT_VERSION}-Setup.exe"
|
49 |
| - |
| 49 | + |
50 | 50 | ;Default Installation folder
|
51 | 51 | InstallDir "C:\${PFILES}\Hubble"
|
52 |
| - |
| 52 | + |
53 | 53 | ;Get installation folder from registry if available
|
54 | 54 | InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" ""
|
55 | 55 | ShowInstDetails show
|
56 | 56 | ShowUnInstDetails show
|
57 |
| - |
| 57 | + |
58 | 58 | ;Request application privileges for Windows Vista
|
59 | 59 | RequestExecutionLevel highest
|
60 | 60 |
|
|
136 | 136 |
|
137 | 137 | ${NSD_CreateText} 0 43u 100% 12u $IndexName_State
|
138 | 138 | Pop $IndexName
|
139 |
| - |
| 139 | + |
140 | 140 | ${NSD_CreateLabel} 0 60u 100% 12u "Indexer:"
|
141 | 141 | Pop $Label
|
142 | 142 |
|
|
146 | 146 | nsDialogs::Show
|
147 | 147 |
|
148 | 148 | FunctionEnd
|
149 |
| - |
| 149 | + |
150 | 150 | Function pageHubbleConfig_Leave
|
151 | 151 |
|
152 | 152 | ${NSD_GetText} $HECToken $HECToken_State
|
|
172 | 172 | SetCtlColors $CheckBox_Hubble_Start "" "ffffff"
|
173 | 173 | # This command required to bring the checkbox to the front
|
174 | 174 | System::Call "User32::SetWindowPos(i, i, i, i, i, i, i) b ($CheckBox_Hubble_Start, ${HWND_TOP}, 0, 0, 0, 0, ${SWP_NOSIZE}|${SWP_NOMOVE})"
|
175 |
| - |
| 175 | + |
176 | 176 | # Create Start Hubble Delayed Checkbox
|
177 | 177 | ${NSD_CreateCheckbox} 130u 102u 100% 12u "&Delayed Start"
|
178 | 178 | Pop $CheckBox_Hubble_Start_Delayed
|
|
241 | 241 | Section "MainSection" SEC01
|
242 | 242 |
|
243 | 243 | SetOutPath "$INSTDIR\"
|
244 |
| - SetOverwrite ifdiff |
| 244 | + SetOverwrite ifdiff |
245 | 245 | CreateDirectory $INSTDIR\var
|
246 | 246 | CreateDirectory $INSTDIR\etc\hubble\hubble.d
|
247 | 247 | File /r "..\..\dist\hubble\"
|
248 | 248 |
|
249 | 249 | SectionEnd
|
250 |
| - |
| 250 | + |
251 | 251 | Section -Post
|
252 | 252 |
|
253 | 253 | WriteUninstaller "$INSTDIR\uninst.exe"
|
|
287 | 287 |
|
288 | 288 | ExecWait 'powershell -ExecutionPolicy Bypass -WindowStyle Hidden -File .\prerequisites.ps1 "$INSTDIR" -FFFeatureOff'
|
289 | 289 | ExecWait 'powershell -ExecutionPolicy Bypass -WindowStyle Hidden -File .\osqueryd_safe_permissions.ps1 "$INSTDIR" -FFFeatureOff'
|
290 |
| - ExecWait 'powershell -ExecutionPolicy Bypass -WindowStyle Hidden -File .\hubble_config_permissions.ps1 "$INSTDIR" -FFFeatureOff' |
291 | 290 | RMDir /R "$INSTDIR\var\cache" ; removing cache from old version
|
292 | 291 |
|
293 | 292 | ${if} $HECToken_State != "xxxxx-xxx-xxx-xxx-xxxxxx"
|
294 | 293 | ${AndIf} $HECToken_State != ""
|
295 | 294 | Call makeUserConfig
|
296 | 295 | ${endif}
|
297 |
| - |
| 296 | + |
298 | 297 | Push "C:\${PFILES}\Hubble"
|
299 | 298 | Call AddToPath
|
300 | 299 |
|
301 | 300 | Delete "$INSTDIR\vcredist.exe"
|
302 | 301 |
|
303 | 302 | SectionEnd
|
304 |
| - |
| 303 | + |
305 | 304 | Section Uninstall
|
306 | 305 |
|
307 | 306 | Call un.uninstallHubble
|
|
388 | 387 | "$(^Name) was successfully removed from your computer." \
|
389 | 388 | /SD IDOK
|
390 | 389 | FunctionEnd
|
391 |
| - |
| 390 | + |
392 | 391 |
|
393 | 392 | ;--------------------------------
|
394 | 393 | ;functions
|
|
447 | 446 | skipUninstall:
|
448 | 447 |
|
449 | 448 | FunctionEnd
|
450 |
| - |
| 449 | + |
451 | 450 | Function .onInstSuccess
|
452 | 451 |
|
453 | 452 | ; If StartHubbleDelayed is 1, then set the service to start delayed
|
|
461 | 460 | ${EndIf}
|
462 | 461 |
|
463 | 462 | FunctionEnd
|
464 |
| - |
| 463 | + |
465 | 464 | ;--------------------------------
|
466 | 465 | ;Helper Functions Section
|
467 | 466 |
|
|
707 | 706 | !macroend
|
708 | 707 | !insertmacro RemoveFromPath ""
|
709 | 708 | !insertmacro RemoveFromPath "un."
|
710 |
| - |
| 709 | + |
711 | 710 | ;--------------------------------
|
712 | 711 | ;Specialty Fuctions
|
713 | 712 | Function makeUserConfig
|
714 |
| - |
| 713 | + |
715 | 714 | confFind:
|
716 | 715 | IfFileExists "$INSTDIR\etc\hubble\hubble.d\user.conf" confFound confNotFound
|
717 | 716 |
|
|
726 | 725 | goto confFind
|
727 | 726 |
|
728 | 727 | confLoop:
|
729 |
| - |
| 728 | + |
730 | 729 | FileWrite $9 "hubblestack:$\r$\n"
|
731 | 730 | FileWrite $9 " returner:$\r$\n"
|
732 | 731 | FileWrite $9 " splunk:$\r$\n"
|
@@ -790,7 +789,7 @@ Function parseCommandLineSwitches
|
790 | 789 | ${ElseIf} $IndexName_State == ""
|
791 | 790 | StrCpy $IndexName_State "index"
|
792 | 791 | ${EndIf}
|
793 |
| - |
| 792 | + |
794 | 793 | # Hubble Config: Indexer
|
795 | 794 | ${GetOptions} $R0 "/indexer=" $R1
|
796 | 795 | ${IfNot} $R1 == ""
|
|
0 commit comments