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

Cannot run something else than cmd.exe as admin #7

Open
itsmepayback opened this issue Jan 15, 2022 · 0 comments
Open

Cannot run something else than cmd.exe as admin #7

itsmepayback opened this issue Jan 15, 2022 · 0 comments

Comments

@itsmepayback
Copy link

Hello i managed to change the code of the dll project to try to run something else that I made as admin but it doesn't seem to take any effect and it still runs cmd.exe instead of my Test.exe program. Here is the code i was trying to modify:
`systemPath = L"\test.exe";

	PROCESS_INFORMATION processInfo;
	STARTUPINFOW startupInfo{sizeof STARTUPINFOW, nullptr};

	if (!CreateProcessW(L"test.exe", nullptr, nullptr, nullptr, FALSE, 0, nullptr, nullptr, &startupInfo,
	                    &processInfo))
	{
		ExitProcess(GetLastError());
	}

	CloseHandle(processInfo.hProcess);
	CloseHandle(processInfo.hThread);

	ExitProcess(ERROR_SUCCESS);`

Is there any way to fix this issue?

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

No branches or pull requests

1 participant