This will create a folder named `static` with a file in it. You will then need to copy that folder to your `$GOPATH/src/` (usually C:\Users\Username\Go\src\).
```
# Build the setup application.
go build -o setup.exe -ldflags "-s -w -H=windowsgui"
Credential seems to be what makes it admin or not: https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/set-service?view=powershell-6
// here we'll read the file from the virtual file system
b,err:=static.ReadFile("server.exe")
iferr!=nil{
log.Fatal(err)
}
// Copy file from virtual filesystem to real filesystem
err=ioutil.WriteFile("server.exe",b,0644)
iferr!=nil{
fmt.Println("Error creating","server.exe")
fmt.Println(err)
return
}
// Get current working directory and set it to 'dir'.
dir,err:=os.Getwd()
iferr!=nil{
log.Fatal(err)
}
// Set server file path to 'file'
varfile="-Program '"+dir+"\\server.exe'"
//Create firewall rule
cmdinstance:=exec.Command("powershell.exe","-WindowStyle","Hidden","-Command","New-NetFirewallRule","-DisplayName","'Go Web Server'","-Direction","Inbound",file,"-Action","Allow")
cmdinstance.SysProcAttr=&syscall.SysProcAttr{HideWindow:true}// Make it silent.