@@ -48,6 +48,7 @@ $Lang = {
48
48
[string ]$l33 = " Make sure WinRM is running and properly configured."
49
49
[string ]$l34 = " For localhost monitoring select "" Monitoring current PC"" in app menu."
50
50
[string ]$l35 = " Creating CIM session for"
51
+ [string ]$l36 = " Enable saving log to file? (1 - Yes | 0 -No)"
51
52
}
52
53
elseif ($lng -eq 2 ){
53
54
[string ]$l1 = " Вітаємо у RAM Logger!"
@@ -92,7 +93,7 @@ $Lang = {
92
93
}
93
94
$About = {
94
95
Clear-Host
95
- [string ]$ver = " 1.3.1 "
96
+ [string ]$ver = " 1.4.0 "
96
97
Write-Host " $l1 "
97
98
Write-Host " $l2 "
98
99
Write-Host " $l3 "
@@ -121,7 +122,7 @@ $Startlocallog = {
121
122
catch {.$Invvalue }
122
123
$freq = [math ]::Round($freq , 0 )
123
124
if ($freq -lt 1 ){.$Invvalue }
124
- $tofile = Read-Host " $l35 "
125
+ $tofile = Read-Host " $l36 "
125
126
if (($tofile -ne 1 ) -and ($tofile -ne 0 )){.$Invvalue }
126
127
Write-Host " `n "
127
128
$computerlog = " localhost"
@@ -151,6 +152,8 @@ $Startremotelog = {
151
152
catch {.$Invvalue }
152
153
$freq = [math ]::Round($freq , 0 )
153
154
if ($freq -lt 1 ){.$Invvalue }
155
+ $tofile = Read-Host " $l36 "
156
+ if (($tofile -ne 1 ) -and ($tofile -ne 0 )){.$Invvalue }
154
157
$computerlog = Read-Host " $l24 "
155
158
$computerlog = $computerlog -replace ' \s\s' , ' '
156
159
if (($computerlog -eq " " ) -or ($computerlog -eq " " )){$computerlog = " localhost" }
@@ -247,8 +250,10 @@ $Stoplog = {
247
250
if ($tofile -eq 1 ){
248
251
$lbreak | Out-File - filepath $logpath - Append String
249
252
}
250
- Write-Host " `n "
251
- Write-Host " $l16 $logpath "
253
+ if ($tofile -eq 1 ){
254
+ Write-Host " `n "
255
+ Write-Host " $l16 $logpath "
256
+ }
252
257
.$Askadv
253
258
}
254
259
$Ask = {
0 commit comments