-
Notifications
You must be signed in to change notification settings - Fork 1
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
WinPath.Updater returns %PROGRAMFILES(X86)% #71
Comments
There are several issues with your WinPath.Updater code:
Finally, why bother with writing a command line tool (with an updater no less!) when half the functionality already exists in the setx command, not to mention that you can download a simple and nice GUI tool for that from my website? :-) |
Hello @levicki, thanks for pointing out issues.
Yes, that's why it was a concern; that commented code was returning
Yep, originally, the code to start WinPath.Updater is from WinPath, and yes, it does start it as an administrator and handles everything. The code behind very very messy, but that's only because I plan to replace WinPath.Updater entirely with v0.4.0 (see #67 for more details).
That's actually the entire problem in the first place. Refer to this image (x64 host running both x86 and x64 binaries respectively): (in reply to that comment on the other issue;
Yea, I don't do that, I know that. The current structure is very confusing
That's pretty much like saying "why make something when it already exists" my good man. But the main reason I wanted to do that is for
On a foot note; can you share your gui application of yours, I would love to take a look at it. |
Ok, but this issue of yours has to do with
In the documentation for So, it turns out that 32-bit program cannot get path to 64-bit Program Files on 64-bit OS (and by "cannot" I only mean "cannot in a legitimate way" because I am sure it is possible in some other way). Basically all that boils down to "works as designed", "won't fix", etc, so I think it would be best if you removed your post from that other issue and I can then remove mine where I told you I will respond here. You have two options:
OR
Any other option will just cause you more trouble. The above was a comment from a developer perspective, what follows is from a user perspective. As a computer user I very much dislike the idea of every program having its own update checking (be it on startup, as a scheduled task, or worse as an always running background service), not to mention its own hand-rolled installers and updaters which often do not respect system conventions and/or system preferences, and have no rollback functionality to restore the system to a known working state if something goes wrong. If you want to distribute your programs, you either provide them as a simple
It is great as a learning experience, but I was confused by the need for another command line version of SETX :-) A final friendly advice: C# and .Net are great productivity tools. They enable you to churn out enormous amount of functional code in a rather short time. That's great when you are working on client/server architecture projects (ASP.NET, MVC, etc), but when you are working on a Windows platform and writing console, desktop, or Windows service applications you cannot skip the basics. Depending on the application type you might need to know about any of the following:
And the list goes on. For those who started with C/C++, this was the only way to go, but people starting with .Net usually don't have that platform knowledge and aren't aware they will need it as soon as they aren't happy with how some .Net WinForms control or library API is working. As for my GUI version, you can download it from my website downloads section. It's called SmartPathEditor. |
That's exactly what I said over there, sure it was about Environment.SetEnvironmentVariable but was not limited to that. I think it should be pretty obvious that my side note also refers to other such variables and actions.
Of course, of course, recall the issue I referred to you in my previous message. I'm going to deprecate support (possibly keep backwards compatibility for a bit) for
I agree with this to be honest, and I completely understand that. If you didn't realize that yet, WinPath never checks for update. The user doesn't even need to go beyond v0.1.0, I think it's a "fully shipped" release, it has the core features meant for it. The only way the user can update is by running
I agree, but that makes sense when the application is actually big enough. WinPath is literally just a standalone not even a megabyte big: I also eventually decide to roll out an installer script that basically sets this up for the user, though not compulsory, it just eases the process of installation.
Sorry, what's your point? I don't quite understand what you're trying to say here. Oh and, thanks for your time, it really helps getting strong feedback. |
It seems we are talking past each other. The issue "over there" was limited to The issue with Your issue was that you did not understand how underlying Win32 API which you are calling through C# wrapper actually works -- you complained about expected and documented behavior. The fact that both
What I was trying to say is that you need much better understanding of the Windows platform before reporting issues with Windows platform API, and I gave you a list of things which I consider necessary knowledge if one is to write Windows applications. Furthermore, you should always open a new issue for each problem you discover -- developers don't like when people report multiple issues in a single ticket and there are many good reasons to avoid that. Finally, hijacking discussion threads that you perceive as related to your issue is generally frowned upon in every discussion forum on the internet, and most people consider it rude.
You are welcome. |
Everything is settled, relating to this issue. We will not (and can not by semver) change this current system until v0.4.0 in favor of an elevated manager. There is nothing to discuss regarding this topic. |
On a x86_64 computer, WinPath.Updater returns
%PROGRAMFILES(x86)%
, this is a bug and a concern as Windows team is planning to allow the user to change the default hard disk -- as of writing this issue, this value is hard coded.I looked into this issue and apparently it happens because of a 32-bit application being run on a 64-bit host environment. Please see #64 for more information.
The text was updated successfully, but these errors were encountered: