windows: Fix build termination

wfvm
adisbladis 2020-01-30 22:51:41 +00:00 committed by Stephan Maka
parent 6b4e6548e5
commit 51f93e5852
2 changed files with 8 additions and 9 deletions

View File

@ -267,6 +267,14 @@ let
</AutoLogon>
''}
<FirstLogonCommands>
<SynchronousCommand wcm:action="add">
<Order>1</Order>
<CommandLine>cmd /C shutdown /s /f /t 00</CommandLine>
<Description>ChangeHideFiles</Description>
</SynchronousCommand>
</FirstLogonCommands>
</component>
</settings>

View File

@ -84,16 +84,7 @@ func InstallBundle(bundlePath string) error {
return err
}
func Shutdown() {
if err := exec.Command("cmd", "/C", "shutdown", "/s", "/f", "/t", "00").Run(); err != nil {
fmt.Println("Failed to initiate shutdown:", err)
}
}
func main() {
defer Shutdown()
// Get path relative to binary
baseDir, err := filepath.Abs(filepath.Dir(os.Args[0]))
if err != nil {