This will shock everybody that knows me, but I'm using Windows 7 again! It was mostly because of school; I was spending too much time trying to get everything working under Linux. Anyway, I've discovered some cool things already. I've come to the conclusion that Windows can actually work really well, but you have to do some digging to get to this functionality.
Problem #1: I could not run a program from the command line; it said the command could not be found. The problem is that the system PATH variable (which lets the operating system find the program) does not include any of the folders in Program Files by default. Usually, the program installer will add its location to the PATH, either the system-wide PATH or the PATH for the current user. Since I install programs from the administrator account but do all my work from a different, standard account, some programs would put their location in the administrator PATH (the user that installed them) and would thus not be found when I tried to execute them from my normal account. I found out that I can create a personal environment variable called PATH, the contents of which will be automagically added to the system PATH, with no need to log in as administrator and edit any system variables. The process is very simple: Go to Control Panel ->
User Accounts and Family Safety -> User Accounts. There is an option to the left called "Change my environment variables". When you click this, you have the option to create a new variable. Call it PATH, and add to it the file path to the program you want to run, followed by a semicolon. For me, it was C:\Program Files\Mercurial; It will obviously be different for whatever program you're dealing with. Once you hit OK, you will be able to fire up the command prompt and run the program, this time with no issues!
Problem #2: I installed a program, but every time I tried to run it Windows would prompt for an administrator password because the publisher was "untrusted". The fix for this is easy. Logged in as administrator, go to the location of the executable file, and right click it. Select "properties". On the first tab of the resulting dialog, or at least on one of the tabs, there will be a button that says "unblock". Click this and hit "Apply". You can now run the executable from any account.
In the case of Problem #2, if you Googled it you would find a LOT of forum posts telling you how to disable User Account Control (the thing that prompts you for the administrator password in the first place). This is almost always a BAD IDEA, or at least an unnecessary idea. As you can see from my solution above, there are simple ways to make the UAC happy without disabling it entirely. If you disable it and an unwanted program tries to access system files, you will not be able to stop it or even know about it. The bottom line is, work WITH the system, not AGAINST it!
Also, you might want to take a minute to think about WHY the publisher is untrusted. In my case, I was installing the Eclipse IDE, which is well-known and widely used. On the other hand, if you just find a random program on the Internet and UAC pops up a warning, you need to think, "Do I really need this? Why am I installing it?". In other words, installing a lot of random crap and blithely disregarding UAC is asking for trouble.
Subscribe to:
Post Comments (Atom)
This is, indeed, shocking but welcome back!
ReplyDelete