@@ -18,7 +18,10 @@ Vagrant.configure("2") do |config|
18
18
type : "shell" ,
19
19
inline : <<-SHELL
20
20
\$ ErrorActionPreference = "Stop"
21
- netsh advfirewall firewall add rule name="Allow WinRM" localport=5985 protocol=tcp dir=in action=allow
21
+ echo "Windows Firewall rules..."
22
+ New-NetFirewallRule -Enabled True -Action Allow -Direction Inbound -DisplayName "Allow WinRM" -Protocol TCP -LocalPort 5985 | Out-Null
23
+ New-NetFirewallRule -Enabled True -Action Allow -Direction Inbound -DisplayName "Allow nodejs" -Program "c:\\ Program Files\\ nodejs\\ node.exe" | Out-Null
24
+ New-NetFirewallRule -Enabled True -Action Allow -Direction Inbound -DisplayName "Allow java" -Program "c:\\ jdk-17.0.2\\ bin\\ java.exe" | Out-Null
22
25
23
26
echo "Configuring auto-login..."
24
27
Set-ItemProperty -Path 'HKLM:\\ SOFTWARE\\ Microsoft\\ Windows NT\\ CurrentVersion\\ Winlogon' -Name DefaultUserName -Type String -Value IEUser
@@ -86,7 +89,6 @@ namespace Win32Api
86
89
echo "Installing node.js..."
87
90
\$ p = Start-Process msiexec.exe -ArgumentList "/I","c:\\ vagrant\\ software\\ node.msi","/quiet" -Wait -NoNewWindow -PassThru
88
91
if ( \$ p.ExitCode -ne 0 ) { exit \$ p.ExitCode }
89
- netsh advfirewall firewall add rule name="Allow nodejs" dir=in action=allow program="c:\\ Program Files\\ nodejs\\ node.exe" enable=yes
90
92
\$ Env:PATH += ";c:\\ Program Files\\ nodejs"
91
93
92
94
echo "Installing assistive-playwright-server..."
@@ -103,7 +105,6 @@ namespace Win32Api
103
105
104
106
echo "Installing java..."
105
107
Expand-Archive -Path C:\\ vagrant\\ software\\ openjdk.zip -DestinationPath C:\\
106
- netsh advfirewall firewall add rule name="Allow java" dir=in action=allow program="c:\\ jdk-17.0.2\\ bin\\ java.exe" enable=yes
107
108
108
109
echo "Installing selenium-server..."
109
110
Copy-Item "C:\\ vagrant\\ software\\ selenium-server.jar" -Destination C:\\
0 commit comments