Fixed calling PS script with two args.
This commit is contained in:
@@ -24,8 +24,8 @@ if not exist "Logs\" mkdir "Logs"
|
|||||||
set init=0
|
set init=0
|
||||||
set update=0
|
set update=0
|
||||||
|
|
||||||
for %%a in (%*) do if /i "%%~a" equ "/I" set init=1
|
if /i %1 equ "/I" set init=1
|
||||||
for %%a in (%*) do if /i "%%~a" equ "/U" set update=1
|
if /i %1 equ "/U" set update=1
|
||||||
|
|
||||||
@REM powershell -ExecutionPolicy RemoteSigned -File wDayzManager.ps1 -Init %init% -Update %update%
|
@REM powershell -ExecutionPolicy RemoteSigned -File wDayzManager.ps1 -Init %init% -Update %update%
|
||||||
powershell -ExecutionPolicy RemoteSigned -File wDayzManager.ps1 -Init %init% -Update %update% > Logs\%filename%
|
powershell -ExecutionPolicy RemoteSigned -File wDayzManager.ps1 -Init %init% -Update %update% > Logs\%filename%
|
||||||
|
|||||||
@@ -23,6 +23,12 @@ Param (
|
|||||||
|
|
||||||
[string]$myName = "wDayzManager"
|
[string]$myName = "wDayzManager"
|
||||||
[string]$myVersion = "v0.7"
|
[string]$myVersion = "v0.7"
|
||||||
|
|
||||||
|
if (($init -eq $true) -or ($update -eq $true)) {
|
||||||
|
Write-Error "Only one parameter is accepted - either 'Init' or 'Update'."
|
||||||
|
Exit
|
||||||
|
}
|
||||||
|
|
||||||
[string]$steamScript = $myName + ".txt"
|
[string]$steamScript = $myName + ".txt"
|
||||||
[string]$iniFile = $myName + ".ini"
|
[string]$iniFile = $myName + ".ini"
|
||||||
if (-not (Test-Path -Path $iniFile)) {
|
if (-not (Test-Path -Path $iniFile)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user