Bug: Windows Server 2022 - Answer File (Unattend) Firewall Rule not set (0x1): Unterschied zwischen den Versionen

Aus Wiki-WebPerfect
Wechseln zu: Navigation, Suche
K
Zeile 11: Zeile 11:
  
 
== Workaround ==
 
== Workaround ==
*Define the first Windows Firewall Rule in the Answer File (Unattend) twice. ''In the picture above you can see the first Firewall Rule failed but the second is working!''
+
*Start the Windows Defender Firewall (mpssvc) before adding your Firewall Rules.''
  
 
=== Example ===
 
=== Example ===
 
<source lang="xml">
 
<source lang="xml">
 +
...
 
<RunSynchronousCommand wcm:action="add">
 
<RunSynchronousCommand wcm:action="add">
    <Description>ADD FW ICMP</Description>
+
<Description>Start Windows Defender Firewall to prevent errors while adding Firewall-Rules</Description>
    <Order>1</Order>
+
<Order>1</Order>
    <Path>netsh advfirewall firewall add rule profile=any name="All ICMP V4" dir=in action=allow protocol=icmpv4</Path>
+
<Path>net start mpssvc</Path>
</RunSynchronousCommand>
+
</RunSynchronousCommand>
 
<RunSynchronousCommand wcm:action="add">
 
<RunSynchronousCommand wcm:action="add">
    <Description>ADD FW ICMP</Description>
+
<Description>ADD FW ICMP</Description>
    <Order>2</Order>
+
<Order>2</Order>
    <Path>netsh advfirewall firewall add rule profile=any name="All ICMP V4" dir=in action=allow protocol=icmpv4</Path>
+
<Path>netsh advfirewall firewall add rule profile=any name="All ICMP V4" dir=in action=allow protocol=icmpv4</Path>
 
</RunSynchronousCommand>
 
</RunSynchronousCommand>
 +
...
 
</source>
 
</source>
  

Version vom 11. Januar 2022, 17:46 Uhr

Error

In the File C:\Windows\Panther\UnattendGC\setupact.log:
[SETUPUGC.EXE] Process returned with exit code 0x1.


Cause

Most likely, this is because Windows Defender Firewall (mpssvc) is not running at the time you set the rule.


Workaround

  • Start the Windows Defender Firewall (mpssvc) before adding your Firewall Rules.

Example

...
<RunSynchronousCommand wcm:action="add">
	<Description>Start Windows Defender Firewall to prevent errors while adding Firewall-Rules</Description>
	<Order>1</Order>
	<Path>net start mpssvc</Path>
</RunSynchronousCommand>			
<RunSynchronousCommand wcm:action="add">
	<Description>ADD FW ICMP</Description>
	<Order>2</Order>
	<Path>netsh advfirewall firewall add rule profile=any name="All ICMP V4" dir=in action=allow protocol=icmpv4</Path>
</RunSynchronousCommand>
...