Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
windows-vm
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
pem
windows-vm
Commits
5a42da4a
Commit
5a42da4a
authored
Apr 23, 2025
by
César Galvis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: added wireguard shortcut
parent
13bba607
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
WireguardInstall.ps1
src/scripts/ps/WireguardInstall.ps1
+16
-0
No files found.
src/scripts/ps/WireguardInstall.ps1
View file @
5a42da4a
...
...
@@ -66,3 +66,18 @@ New-NetFirewallRule -DisplayName "WireGuard VPN" -Direction Inbound -Action Allo
# Output server info
Write-Host
"WireGuard server has been configured and started."
Write-Host
"Keys saved to:
$outputPath
\generated-keys.json"
# Add shortcuts
## Get the desktop path for the current user
$desktopPath
=
[
Environment]::GetFolderPath
(
"Desktop"
)
## PowerShell
### Create the shortcut path
$shortcutPath
=
Join-Path
$desktopPath
"WireGuard.lnk"
### Create the WScript.Shell COM object
$WshShell
=
New-Object
-ComObject WScript.Shell
### Create the shortcut
$shortcut
=
$WshShell
.CreateShortcut
(
$shortcutPath
)
### Set the target path to PowerShell
$shortcut
.TargetPath
=
"C:\Program Files\WireGuard\wireguard.exe"
### Save the shortcut
$shortcut
.Save
()
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment