Skip to content

Commit 8c76f42

Browse files
authored
Fully implemented enabling / disabling LTF
1 parent ca10c47 commit 8c76f42

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

RAM-Logger.ps1

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ $Lang = {
4848
[string]$l33 = "Make sure WinRM is running and properly configured."
4949
[string]$l34 = "For localhost monitoring select ""Monitoring current PC"" in app menu."
5050
[string]$l35 = "Creating CIM session for"
51+
[string]$l36 = "Enable saving log to file? (1 - Yes | 0 -No)"
5152
}
5253
elseif($lng -eq 2){
5354
[string]$l1 = "Вітаємо у RAM Logger!"
@@ -92,7 +93,7 @@ $Lang = {
9293
}
9394
$About = {
9495
Clear-Host
95-
[string]$ver = "1.3.1"
96+
[string]$ver = "1.4.0"
9697
Write-Host "$l1"
9798
Write-Host "$l2"
9899
Write-Host "$l3"
@@ -121,7 +122,7 @@ $Startlocallog = {
121122
catch {.$Invvalue}
122123
$freq = [math]::Round($freq, 0)
123124
if($freq -lt 1){.$Invvalue}
124-
$tofile = Read-Host "$l35"
125+
$tofile = Read-Host "$l36"
125126
if(($tofile -ne 1) -and ($tofile -ne 0)){.$Invvalue}
126127
Write-Host "`n"
127128
$computerlog = "localhost"
@@ -151,6 +152,8 @@ $Startremotelog = {
151152
catch {.$Invvalue}
152153
$freq = [math]::Round($freq, 0)
153154
if($freq -lt 1){.$Invvalue}
155+
$tofile = Read-Host "$l36"
156+
if(($tofile -ne 1) -and ($tofile -ne 0)){.$Invvalue}
154157
$computerlog = Read-Host "$l24"
155158
$computerlog = $computerlog -replace '\s\s',''
156159
if(($computerlog -eq "") -or ($computerlog -eq " ")){$computerlog = "localhost"}
@@ -247,8 +250,10 @@ $Stoplog = {
247250
if($tofile -eq 1){
248251
$lbreak | Out-File -filepath $logpath -Append String
249252
}
250-
Write-Host "`n"
251-
Write-Host "$l16 $logpath"
253+
if($tofile -eq 1){
254+
Write-Host "`n"
255+
Write-Host "$l16 $logpath"
256+
}
252257
.$Askadv
253258
}
254259
$Ask = {

0 commit comments

Comments
 (0)