File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -18,17 +18,20 @@ package vmware
18
18
19
19
import (
20
20
"fmt"
21
- "golang.org/x/sys/windows/registry "
21
+ "os "
22
22
"path/filepath"
23
+
24
+ "golang.org/x/sys/windows/registry"
23
25
)
24
26
27
+ // https://docs.microsoft.com/en-us/windows/deployment/usmt/usmt-recognized-environment-variables
25
28
26
29
func DhcpConfigFiles () string {
27
- return `C:\ProgramData\ VMware\vmnetdhcp.conf`
30
+ return filepath . Join ( os . Getenv ( "ALLUSERSPROFILE" ), ` VMware\vmnetdhcp.conf`)
28
31
}
29
32
30
33
func DhcpLeaseFiles () string {
31
- return `C:\ProgramData\ VMware\vmnetdhcp.leases`
34
+ return filepath . Join ( os . Getenv ( "ALLUSERSPROFILE" ), ` VMware\vmnetdhcp.leases`)
32
35
}
33
36
34
37
func SetUmask () {
@@ -67,5 +70,5 @@ func setVmwareCmd(cmd string) string {
67
70
}
68
71
69
72
func getShareDriveAndName () (string , string , string ) {
70
- return "Users" , "C: \\ Users" , "/hosthome"
73
+ return "Users" , os . Getenv ( "PUBLIC" ) , "/hosthome"
71
74
}
You can’t perform that action at this time.
0 commit comments