Status not displaye...
 
Notifications
Clear all

We had a major storm through here recently and we suffered damage to the house roof and ceilings. I just received the quote to repair. I’m hoping that a small fraction of the 80,000 odd people that download SDIO and/or Desktop Info every month won’t mind chipping in a few dollars to help out. Click on the big blue button at the bottom of the page to help us keep a roof over our heads, literally!

Guests have read-only access to our forums. If you wish to participate you will need to register. Be sure to activate your account from the email sent to you when you register.

Status not displayed

5 Posts
2 Users
0 Reactions
605 Views
Tof0006
(@tof0006)
Eminent Member Registered
Joined: 2 years ago
Posts: 19
Topic starter  

Hi,

I don't understand my problem.
I've added this to my .ini file

# Firewall Profile
COMMENT=text: ,font-size:50%
SET-SECTION=key:fwstatus,value:fwprof.ps1
CMD=interval:120,text:Firewall Profile,trim:1,file:powershell.exe, \
	parameters:%fwstatus% \
	display: %fwstate%,code-page:437,no-wait:1

[fwprof.ps1]
try {
	$fwstate = Get-NetFirewallSetting -PolicyStore ActiveStore | Select-Object -ExpandProperty ActiveProfile

	Write-Host "$fwstate"
}
catch {
	Write-Host '<error>'
}

When I execute this manually, I get this result: Domain, Public
But on the display, I get the result in the picture.
What's wrong?
Thanks


   
Quote
Glenn
(@glenn)
Member Admin
Joined: 7 years ago
Posts: 1779
 

1. place a comma after "parameters:%fwstatus%

2. display should show %4

# Firewall Profile
COMMENT=text: ,font-size:50%
SET-SECTION=key:fwstatus,value:fwprof.ps1
CMD=interval:120, text:Firewall Profile, trim:1, file:powershell.exe, \
	parameters:%fwstatus%, \
	display: %4, code-page:437, no-wait:1

   
ReplyQuote
Tof0006
(@tof0006)
Eminent Member Registered
Joined: 2 years ago
Posts: 19
Topic starter  

Thanks, late answer because I was full this week.

I've tried and it's OK as always when you're answering.

Why putting %4 at the display value?
What is it related to?
Thanks


   
ReplyQuote
Glenn
(@glenn)
Member Admin
Joined: 7 years ago
Posts: 1779
 

When you refer to the CMD item in the manual on page 74 and 75, you'll see that %4 returns the STDOUT output text of the command you are executing.


   
ReplyQuote
Tof0006
(@tof0006)
Eminent Member Registered
Joined: 2 years ago
Posts: 19
Topic starter  

Thanks Glenn... once again, I haven't reach page 74 of the manual. My bad.


   
ReplyQuote
Glenn's Page