-
-
Notifications
You must be signed in to change notification settings - Fork 42
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
'unknown error occurred': It implicitly requires to be run as Administrator on Windows #11
Comments
Interesting, but I don't have a way to test that (due to how broken Windows is I somehow am the built-in admin account). |
Are you on the latest version? |
yes, i met this error immediately after |
What happens if you pass |
Weird. Don't have this problem on Win10 64-bit. Which version of Windows do you use? |
I'm on Win10 x86_64, too, so that might manifest only on earlier versions 🤔 |
I'm on Win10 x86_64 (build 1607), not an earlier version. |
I'm on build 1607 too... @nabijaczleweli Do we write into any directory other than %USERPROFILE% and temporary directory on Windows? |
Well, we don't even write it, we open Edit: Okay, I lied, we rename and create a file in |
Usually, on windows, the |
My cargo home is Yesterday I did a fresh install of cargo-update, i.e. uninstall & reinstall (cargo install ...), the same error occurred. Just now I found that the icon of
I'm really sure that, all Let me know if I need to do something more. |
I did a fresh install of
|
I cloned this repo, and |
NoteHello everyone. Finally I did more investigation, and the result is a bit frustrating. The short answer is, you can't name your executable as If an For example, good name: Enable or disable Windows Defender doesn't affect the result. I've no other security software installed. I'm on Windows 10 Home, x86_64, version 1607. I DON'T KNOW WHY. Closing. This is not an issue direct related to this repo. May be an issue of Windows itself. Sorry. |
Wow, now that's insane. Thanks for investigating this. |
The binaries need a manifest specifying asInvoker explicitly. All of the autodetection stuff is compatibility. Ping rust-lang/rfcs#721 or something. As a workaround you should be able to create
|
I'll put a notice for that in the README 👍 |
My windows is the education version, fresh installed. Don't have this issue. Is your windows upgraded from an old version, @liigo ? |
Maybe yes or not. I can't remember that, sorry! |
Manifests may help. Another simple workaround is renaming the repo /.exe (I already hinted this in a previous comment). @nabijaczleweli |
Renaming's too much of a breaking change to be viable, but when RFC721 lands I'll embed the manifest to remove the need to make one yourself. |
Or as for now @nabijaczleweli you could add some code in |
Into the install dir at install? I didn't think it possible, maybe that's the way to go. |
When installing a package via Cargo home directoryObviously, if there exists Created Time and Modified TimeI don't know does there exist functions in the std library which modify these metadata. P.S.: Creating manifest file for binaries is conceptually a part of build progress on Windows platform, so I think putting the manifest file writing code into |
You can just embed the manifest properly with build.rs, e.g. https://github.com/TheCatPlusPlus/rust-manifest-test (though dunno whether you can archive MSVC's RC output and have it work the same way) |
I sought for manifest in resources but didn't succeed, good to see that it's doable. |
@nabijaczleweli The demonstration gist of writing manifest file in |
@TheCatPlusPlus The manifest file we need here is just a kind of static file (the contents won't be changed), so just inlining its content into |
This would be much cleaner if the build scripts were actually fucking documented properly Gigantic thanks to @TheCatPlusPlus who saved the day once again (solution heavily based on https://github.com/TheCatPlusPlus/rust-manifest-test) Ref: #11 Closes #13
Released in |
Embedding a manifest resource can resolve this issue (see comments above). Done on gnu toolchain, work in progress on msvc toolchain. Reopening... |
…istics. See comments on nabijaczleweli#11 for more information. Fixes nabijaczleweli#11 Fixes nabijaczleweli#14
If run it as administrator, it works.
Update: to know the reason and workaround, see comments after this
The text was updated successfully, but these errors were encountered: