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
Question: If a GUI program has a space in its program exe file path, it'll failed started from windows service. #2205
Comments
Please ask general API questions on https://stackoverflow.com/ or https://learn.microsoft.com/en-us/answers/topics/windows-api.html |
Thanks very much for your reply, riverar : )
so, it's contradiction and confuse me, why GUI program exit immediately, path? security? or others? I don't know and I can't find any logs. |
Ok, thanks for relpy! |
This problem has sovled. When you use system user or start the program by user with administrator role from windows service, regardless of a space in the program path or not, it will start ok. |
Which crate is this about?
windows
Crate version
0.43.0
Summary
when I use CreateProcessAsUserW to start a GUI program from windows service, if the the GUI program file path has space in it, it will started and then quit immediately. if the program file path has no space, it will started OK.
additional: if start the GUI program not from windows service, it'll ok in spite of a space in file path or not.
Toolchain version/configuration
Default host: x86_64-pc-windows-msvc
rustup home: C:\Users\PC.rustup
stable-x86_64-pc-windows-msvc (default)
rustc 1.64.0 (a55dd71d5 2022-09-19)
Reproducible example
Crate manifest
Expected behavior
No response
Actual behavior
No response
Additional comments
No response
The text was updated successfully, but these errors were encountered: