windows: Fix build termination
This commit is contained in:
parent
6b4e6548e5
commit
51f93e5852
|
@ -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>
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue