File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18,17 +18,20 @@ package vmware
1818
1919import (
2020 "fmt"
21- "golang.org/x/sys/windows/registry "
21+ "os "
2222 "path/filepath"
23+
24+ "golang.org/x/sys/windows/registry"
2325)
2426
27+ // https://docs.microsoft.com/en-us/windows/deployment/usmt/usmt-recognized-environment-variables
2528
2629func DhcpConfigFiles () string {
27- return `C:\ProgramData\ VMware\vmnetdhcp.conf`
30+ return filepath . Join ( os . Getenv ( "ALLUSERSPROFILE" ), ` VMware\vmnetdhcp.conf`)
2831}
2932
3033func DhcpLeaseFiles () string {
31- return `C:\ProgramData\ VMware\vmnetdhcp.leases`
34+ return filepath . Join ( os . Getenv ( "ALLUSERSPROFILE" ), ` VMware\vmnetdhcp.leases`)
3235}
3336
3437func SetUmask () {
@@ -67,5 +70,5 @@ func setVmwareCmd(cmd string) string {
6770}
6871
6972func getShareDriveAndName () (string , string , string ) {
70- return "Users" , "C: \\ Users" , "/hosthome"
73+ return "Users" , os . Getenv ( "PUBLIC" ) , "/hosthome"
7174}
You can’t perform that action at this time.
0 commit comments