diff --git a/cmd/watchdog/installer/install_windows.go b/cmd/watchdog/installer/install_windows.go index 0ea74e7..aae1a12 100644 --- a/cmd/watchdog/installer/install_windows.go +++ b/cmd/watchdog/installer/install_windows.go @@ -74,6 +74,9 @@ func install(c *Config) error { // "C:\Users\aj\.local\opt\appname\appname.js /c -p 8080" // "C:\Program Files (x64)\nodejs\node.exe /c C:\Users\aj\.local\opt\appname\appname.js -p 8080" regSZ := bin + setArgs + strings.Join(c.Argv, " ") + if len(regSZ) > 260 { + return fmt.Errorf("data value is too long for registry entry") + } fmt.Println("Set Registry Key:") fmt.Println(autorunKey, c.Title, regSZ) k.SetStringValue(c.Title, regSZ)