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

shortcut leads to eclient.pyw #3

Open
Josakko opened this issue Nov 11, 2023 · 1 comment
Open

shortcut leads to eclient.pyw #3

Josakko opened this issue Nov 11, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@Josakko
Copy link

Josakko commented Nov 11, 2023

shortcut created by installer leads to eclient.pyw but its just path leading to python file so that shortcut should contain something like this:

pythonw C:/path/path/path/eclient.pyw 

or you should make it run an executable like this:

#include <windows.h>


int main() {
    // script to run
    char *command = "pythonw.exe eclient.pyw";

    PROCESS_INFORMATION pi;
    STARTUPINFO si;

    ZeroMemory(&si, sizeof(si));
    si.cb = sizeof(si);
    ZeroMemory(&pi, sizeof(pi));


    if (CreateProcess(NULL, command, NULL, NULL, FALSE, CREATE_NEW_PROCESS_GROUP | DETACHED_PROCESS, NULL, NULL, &si, &pi)) {
        CloseHandle(pi.hProcess);
        CloseHandle(pi.hThread);

        // TerminateProcess(GetCurrentProcess(), 0);
        return 0;
    } else {
        return 1;
    }
}

just compile and make shortcut point to it and thats it

@v-pun215
Copy link
Owner

ok I'll look into it. Thanks!

@v-pun215 v-pun215 added the bug Something isn't working label Nov 17, 2023
@v-pun215 v-pun215 pinned this issue Nov 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants