Skip to content

Commit

Permalink
add optional props to install.bat as args
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanchriswhite committed Nov 15, 2019
1 parent 58e6d98 commit ac853a7
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions installer/windows/install.bat
Original file line number Diff line number Diff line change
@@ -1,17 +1,24 @@
@echo off
setlocal enabledelayedexpansion

rem count # of args
set argC=0
for %%x in (%*) do Set /A argC+=1

if not "%argC%"=="1" (
if not %argC% gtr 0 (
echo usage: %~nx0 ^<msi path^>
exit /B 1
)

set msipath=%1
set props=STORJ_WALLET="0x0000000000000000000000000000000000000000" STORJ_EMAIL="user@mail.example" STORJ_PUBLIC_ADDRESS="127.0.0.1:10000"
for %%x in (%*) do (
if not %%x==%msipath% set props=!props! %%x
)

rem uninstall existing storagenode product
echo uninstalling storagenode
msiexec /uninstall %1
msiexec /uninstall %msipath%

echo installing storagenode from %1
msiexec /i %1 /passive /qb /norestart /log %~dp1install.log STORJ_WALLET="0x0000000000000000000000000000000000000000" STORJ_EMAIL="user@mail.example" STORJ_PUBLIC_ADDRESS="127.0.0.1:10000"
echo installing storagenode from %msipath%
msiexec /i %msipath% /passive /qb /norestart /log %~dp1install.log %props%

0 comments on commit ac853a7

Please sign in to comment.