I have a .pyw script that works when I double click it etc and it stays open till I close it but I've added it to the registry to run at startup. It does run on startup but it doesn't stay open like its set to. It flashes the gui and then just closes.
Any ideas why this is happening or how to fix it?
P.S I don't want to create a shortcut in the startup folder linking to the .pyw file.
I added the my python script to the registry with another python script :p
import _winreg
aReg = _winreg.ConnectRegistry(None,_winreg.HKEY_LOCAL_MACHINE)
aKey = _winreg.OpenKey(aReg, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", 0, _winreg.KEY_WRITE)
_winreg.SetValueEx(aKey,"MyScript",0, _winreg.REG_SZ, myScript_path)
And when I browse that path in the registry: HKEY_LOCAL_MACHINE > SOFTWARE > Microsoft > Windows > CurrentVersion > Run it is there with the correct path in data and type REG_SZ