Windows Key + X

Discussion in 'General Discussion' started by Ian, Jan 19, 2013.

  1. Ian

    Ian Administrator

    Joined:
    Jan 26, 2010
    Messages:
    550
    Likes Received:
    76
    Location:
    UK
    This is just a heads up post, as I've spoken to quite a few Windows 8 users that didn't know about the Windows Tools Menu. It's really handy, especially if you use the command prompt or some of the control panel applets.

    Just press Windows Key + X and this will appear:

    WindowsTools.png
     
    Ian, Jan 19, 2013
    #1
    clifford and Trouble like this.
    1. Advertisements

  2. Ian

    Trouble noob whisperer Moderator

    Joined:
    Jan 15, 2013
    Messages:
    715
    Likes Received:
    131
    Location:
    N.W. Indiana
    Thanks Ian.
    Yes this is in fact a very powerful and useful option... I've heard it referred to as the "Power Users Menu", don't know if that is an official title or not.
    In addition to the WinKey + X method of evoking the menu you can also hover your cursor at the bottom left of the screen and when the little switcher widget appears that allows you to toggle from desktop to start screen, simply right clicking that will bring the same menu up.
    Excellent tip and thanks again.
     
    Trouble, Jan 19, 2013
    #2
    Ian likes this.
    1. Advertisements

  3. Ian

    davehc

    Joined:
    Feb 2, 2010
    Messages:
    884
    Likes Received:
    152
    Location:
    Denmark
    It can also be customised. You can add or delete any items. I did once build it up with quite a number of programs, but it was too longwinded .-easier to use the modern screen. (or classic!)

    If you want to see where it is sitting, navigate in Windows Explorer to C:\Users\username\AppData\Local\Microsoft\Windows\WinX, - (You need to "unhide" the files in the options, to see them.)
    There are three folders in there: Group1, Group2, and Group3.You can remove files from here. It is also possible, to add files, through the registry. This is cumbersome, and is more easily done by using the attached file. Just quickly added Irfan View, for an example.

    Power.jpg
     

    Attached Files:

    davehc, Jan 19, 2013
    #3
    Ian, Core and Trouble like this.
  4. Ian

    Ian Administrator

    Joined:
    Jan 26, 2010
    Messages:
    550
    Likes Received:
    76
    Location:
    UK
    Yes, that's certainly a fitting name for the menu! I didn't know it could be summoned that way - handy to know :).

    Cheers Dave, I could do with adding a few more options to it (primarily server monitoring tools / MySQL admin stuff).
     
    Ian, Jan 20, 2013
    #4
  5. Ian

    Odili

    Joined:
    Jan 19, 2013
    Messages:
    12
    Likes Received:
    0
    Location:
    UK
    Huh, interesting.
    I never knew about it. :D Thanks.
     
    Odili, Jan 20, 2013
    #5
  6. Ian

    Ace

    Joined:
    Sep 13, 2011
    Messages:
    76
    Likes Received:
    13
    Location:
    Canada
    I've been working on a tool of my own for customizing this more easily. From what I know you could previously just add new shortcuts to this location, but not anymore as I think Microsoft doesn't want this turning into a new start menu. There's benefits to customizing it though for quick access to useful tools, where if you were to go to the tileview to run instead, could be a bit more hectic under certain cases. Now there's a specific hash applied to the shortcuts in the PropertyStoreDataBlock metadata for the .lnk file which is calculated, and compared to with the hash inside the file itself to validate whether this entry is valid or not. Other methods i've seen involve editing system files to disable this hash checking validation, although I don't find it as reliable, as this would potentially lower the security barrier on your system just to allow you to change some quick menu.
     
    Ace, Jan 20, 2013
    #6
  7. Ian

    davehc

    Joined:
    Feb 2, 2010
    Messages:
    884
    Likes Received:
    152
    Location:
    Denmark
    Not quite understanding most of the contents of your post, regarding hashes. . I haven't personally experienced, in the earlier releases, being able to add shortcuts to the Power menu, and I seriously doubt that it would be hindered by Microsoft., apart from their friendly warnings regarding the editing of the Registry.
    What is your objection to using the tool given, anyway? Why would you wish to make another? Their is no security penalty. An available shortcut is secure/insecure, wherever it may be found.
     
    davehc, Jan 20, 2013
    #7
  8. Ian

    Ace

    Joined:
    Sep 13, 2011
    Messages:
    76
    Likes Received:
    13
    Location:
    Canada
    It has changed to become more "secure" than previous versions of Windows 8 in the previews to the RTM version itself, so there must be a reason for it; this isnt' dealing with registry stuff though, this is more validation stuff which has only just made it harder to modify that menu... There would be a security penalty depending on how a particular method or tool goes about adding it's own entry to the list though. If you modify a system file, you have to grant yourself permission to make the necessary changes to that file, and just that by itself could be taken advantage of if a more observing virus comes along to see what it has access to before it manages to inject remote code into something or modify what it can on your system.

    I haven't even looked at the tool provided (until this post), I would just like my own tool that is a bit more "compact" and doesn't require the extra dll's for dependencies. Also, a good reason for making my own is that I know what i'm getting by doing it; accountability. If I didn't decompile that program you provided to see what it's doing I wouldn't have seen how that program works to add the entry, it seems to be doing exactly what my project is aiming for currently, but the stability or structure of the code i'm seeing there for how it works, isn't the greatest from a programmer's standpoint. Scary things with Thread.Sleep() going on in there, among a few other things...

    Although if I were to create my own tool, I could leave out all of the advertising junk that exists in that current program too.

    It's calling this function, and this is what everything revolves around; the hash that needs to be embedded within the .lnk file so that it doesn't get removed from the list after a reboot, and is recognized by the system as a valid link for that power WinX menu:

    Code:
    .method assembly hidebysig static pinvokeimpl("Shlwapi.dll") nomangle unicode winapi)
        int32 HashData (
            [in] uint8[] marshal(unsigned int8[ + 1]( pbData,
            int32 cbData,
            [out] uint8[] marshal(unsigned int8[ + 3]( piet,
            int32 outputLen
        ) cil managed preservesig
    {
    }
    The (P/Invoke'd) HashData function from the Shlwapi.dll.

    It's just my way of thinking... I like to be responsible for all the edits/mods that exist on my system. I wouldn't let any somewhat trusted or non-trusted program do anything on my system unless I could verify that it's doing things properly and I had the knowledge to do so.

    This program was written with the .NET framework and depends on .NET 4.5 though, so this is where my area of expertise lies, and I am able to judge for myself things about this program.

    It seems to work obviously, so I won't discourage others from using it. I'd just like to have my own code being run on my system through my own .NET assembly for this that's all :) Even if it's just for fun, or part of the learning experience for a better understanding of Windows 8.

    I will say that this program, if you're going to use any of the existing ones out there, is doing it in a way that you would want to be editing that menu, as it doesn't just bypass that hash validation, it will match the hash expected for a menu entry.

    ~Ace
     
    Ace, Jan 20, 2013
    #8
    Ian likes this.
  9. Ian

    Trouble noob whisperer Moderator

    Joined:
    Jan 15, 2013
    Messages:
    715
    Likes Received:
    131
    Location:
    N.W. Indiana
    Hey Ace.
    If you are going to take the time developing such a tool, please keep us informed.
    I, for one, would be happy to be one of the beta testers if you need some.
    Thanks
    Randy
     
    Trouble, Jan 20, 2013
    #9
  10. Ian

    Ace

    Joined:
    Sep 13, 2011
    Messages:
    76
    Likes Received:
    13
    Location:
    Canada
    I appreciate it :) I will make my project open source when I'm finished too.
     
    Ace, Jan 20, 2013
    #10
  11. Ian

    Epicfied

    Joined:
    Jan 21, 2013
    Messages:
    19
    Likes Received:
    1
    This is such an amazing tip!
    I'm still pretty new to Windows 8 and had absolutely no idea about this.
    I'll definitely keep this one in mind, thanks! :)
     
    Epicfied, Jan 21, 2013
    #11
  12. Ian

    davehc

    Joined:
    Feb 2, 2010
    Messages:
    884
    Likes Received:
    152
    Location:
    Denmark
    Nothing "scary" about the program. The owner of the site, from which it originates, has been offering these superb little titbits since Vista. I have frequently used them, without any problems (including security)
    Rafæl Rivera, a contributor to the site, is also a co founder of a better known site (http://www.withinwindows.com/), which provides similar info and has repute, even on Microsoft forums.
    As you say, the hash code needs to be imbedded. This is the purpose of the .DLLs. The majority of third party programs which are installed on an OS, do need a similar manipulation in order to complete a major establishment, within the OS. The more sophisticated programs , apart from the cheaper utilities, do, in fact, also provide DLLs. This is nothing new to Windows 8.
    As a matter of interest, what "advertising junk" are you referring to, in this utility?
    Most of the very popular Start menu add-ons, are using exactly the same (edited Shell) method of installation - so far without incident, as are several other desktop mods..
     
    davehc, Jan 21, 2013
    #12
  13. Ian

    Ace

    Joined:
    Sep 13, 2011
    Messages:
    76
    Likes Received:
    13
    Location:
    Canada
    When I said "scary", do realize I was talking directly about the code behind this program. If you'll see the examples i've posted below (just a few of the things I have reviewed), and you are a programmer yourself, you may see what I mean. Otherwise, you won't.

    Not an effective use of string.Concat here while there's faster and more efficient methods of combining a couple string properties with a space in between:
    Code:
    this.Text = string.Concat(Application.ProductName, " ", Application.ProductVersion);
    He's also got this bad habit of using while(true) which is a bad construct of the while loop and improper use for the way he's using it especially.
    Code:
    while (true)
    {
    datatableLoaded = !this.datatable_loaded;
    if (!datatableLoaded)
    {
    break;
    }
    Thread.Sleep(1000);
    num++;
    datatableLoaded = num != 15;
    if (!datatableLoaded)
    {
    break;
    }
    }
    *And this is where I'm talking about Thread.Sleep(), and yes this is "scary". If you don't believe me, then read Peter Ritchie's MVP Blog.

    "Thread.Sleep is a sign of a poorly designed program." - http://msmvps.com/blogs/peterritchi...p-is-a-sign-of-a-poorly-designed-program.aspx

    It wouldn't really matter how reputable his stuff is, I could assume and estimate that the majority of visitors to his website are just average computer users, and not programmers. No other experienced programmer would say differently than what i'm pointing out in his program though.

    It works though, so i'll give him that. But past that, the good programmers work for efficient and optimized code, and don't do some of the things he's done in his code.

    Code:
    while (true)
    {
    length = num < (int)directories.Length;
    if (!length)
    {
    break;
    }
    DirectoryInfo directoryInfo = directories[num];
    DirectoryInfo attributes1 = target.CreateSubdirectory(directoryInfo.Name);
    attributes1.Attributes = attributes1.Attributes | FileAttributes.ReadOnly;
    this.CopyDir(directoryInfo, attributes1);
    num++;
    }
    Note: He's even got a huge while(true) loop for doing stuff in the registry through the program...

    Bad error handling with try/catch blocks and empty catch's:
    Code:
    try
    {
    //Some code here
    }
    catch
    {
    }
    Many things I can find in this program that experienced programmers would not do.

    ... In terms of "Advertising junk", perhaps "junk" was a strong word, but there's no need for some of the things he's doing. My impression of his methods although, which is understandable, is to get traffic to his site, as this will boost his site's reputation in terms of SEO respectively as well.

    First his program checks this link for the most recent version: http://winaero.com/updates/winxeditor.txt

    After being compared to the version you have installed, he just uses the System.Diagnostics namespace to call the Process.Start() method to send you to his website so that you can look around and find the download:
    Code:
    Process.Start("http://winaero.com/comment.php?comment.news.30");
    There's a way to just download and replace the current instance of the program by running the updated version downloaded by the program for you, which is what I would've done... It's my personal choice to call programs that just send you to their website, "advertisers".

    Not sure if he wrote this in C# or VB.net, but I've been looking through the MSIL disassembly.
     
    Ace, Jan 21, 2013
    #13
  14. Ian

    Ace

    Joined:
    Sep 13, 2011
    Messages:
    76
    Likes Received:
    13
    Location:
    Canada
    Ace, Jan 21, 2013
    #14
  15. Ian

    davehc

    Joined:
    Feb 2, 2010
    Messages:
    884
    Likes Received:
    152
    Location:
    Denmark
    "It wouldn't really matter how reputable his stuff is, I could assume and estimate that the majority of visitors to his website are just average computer users, and not programmers. "
    Like us, possibly? And, of course, by your own admission, you are reputable?

    The program works pretty much instantly for me. As I said earlier, I have put it to use, but no longer have the need.
    You reference to "speed" is in the code area, and I doubt the difference would be discernible to most users.
    Quite frankly, I honestly believe, without offence, that very few visitors to pages such as this, would be over excited by your explanation of how the program works.
    But,
    " First his program checks this link for the most recent version: http://winaero.com/updates/winxeditor.txt
    After being compared to the version you have installed, he just uses the System.Diagnostics namespace to call the Process.Start() method to send you to his website so that you can look around and find the download:"
    Is that a compliment or a criticism?. Isn't it natural that he should check for you that you did, indeed, have the latest release?
    In fact, my attached zip is ver. 2.6.0.0. the only advertising is a voluntary link to his site - a fair function.
    But, a very small aside. Do take care of openly criticising other sites, it can sometimes boomerang.
     
    davehc, Jan 21, 2013
    #15
    clifford likes this.
  16. Ian

    Ace

    Joined:
    Sep 13, 2011
    Messages:
    76
    Likes Received:
    13
    Location:
    Canada
    I don't understand why you choose to show a differing opinion even though i've provided examples and proof. :(

    I'm not saying I'm reputable, nor do I have the audacity to say so, I'll let others decide for themselves, and if they choose against me I don't have a problem with that, to each their own, but I am MVP for .NET programming. Nobody starts out being reputable, they have to earn it somehow. If I can point out various things in this program as a very specific example... That should not still make this particular program "superior", just because it is popular. (Unless my points are wrong, but I have seen the disadvantages from personal experience with regards to some of the same things I'm seeing in this guys code, as well as the fact that I have provided evidence from other well formed .NET MVP programmers out there.)

    Yes I know, I didn't debate that this program doesn't work, I simply was trying to point out a few of the ineffective aspects of this program from a programmers perspective. A working program is a working program, but behind that, there is the difference between a good program and a lesser one. Notepad++ vs. Notepad for example. Not only does it have more features, but it works better at handling more text, over not just one, but multiple tabs. This IS the result of optimized code. Optimized code requires more time, analyzing, and refactoring, but in the end you can see the result; it's more powerful.

    I don't reference speed as the only outcome, I reference good coding habits, and good code conventions. Speed is only a fraction of that piece of pie, along with stability, reliability, and many other things.

    This, I 110% agree with, but as a programmer myself, I still find it appropriate, and respectful to make sure that a program works at it's best when another PC user is running your program. Not taking up as much CPU as possible, Memory, and all that good stuff. If all of this is too far out of wack, then it can be noticeable, without them even having to look at the code or know the first rule or fundamental of programming.

    You're right, my apologies, I didn't make that clear... My main point was to the Process.Start() line though in his code, not his code strategy for checking on updates. That much works, and is probably the exact way I would go about update checking. However, instead of Process.Start() which just opens up the user's default browser to that link address. I would probably go through the trouble of initializing a WebRequest to download the latest version for them, and replace the original if they chose to update, after my program displays that an update is available. I like making things easier, and more convenient for the user in my programs. I don't aim necessarily to advertise much other than my username at most, in my applications.

    Because, I get more enjoyment out of the programming aspect itself, and knowing that my program can help a few people, than trying to make profit off of it, or advertise more of my stuff. In return, I hope that some people can appreciate that as well :)

    I'm not criticizing his site, please don't twist my words around. If anything I am criticizing his program, but this comes with my own personal experience and understanding of a .NET assembly. I am entitled or should be entitled, to giving users awareness about the programs that they are using, at the least for their own benefit.

    I do not make stuff up, and as you can see, if you've read my entire post, I should have some credibility behind me, being that my statements are supported by evidence. Whether that's a link to some other external source explaining the wrongness, or just pointing out basic programming fundamentals. The use of the while loop here, in more than one place, is not a proper use of it's functionality at all.

    Other things in his code, if I could explain well enough for a non-programmer to fully understand, show the same trends in poor code. I should be more than enough, entitled to the concept of "freedom of speech" however.

    ~Ace
     
    Ace, Jan 21, 2013
    #16
  17. Ian

    Ace

    Joined:
    Sep 13, 2011
    Messages:
    76
    Likes Received:
    13
    Location:
    Canada
    Even for his other utility, hashlnk featured on GitHub, he did not write the full latest code himself. He had help from other programmers directly off GitHub. So he should be open to suggestions on improvement as seen previously. That was C++, this is .NET, but no different.
     
    Ace, Jan 21, 2013
    #17
  18. Ian

    davehc

    Joined:
    Feb 2, 2010
    Messages:
    884
    Likes Received:
    152
    Location:
    Denmark
    Apologies to thread readers for the digression. To drag the thread back to somewhere around post #11, this program (my original attachment) works . It is standalone. Best to make a folder and give it a recognisable name and unzip the contents into the folder. It is also perfectly safe, otherwise I would not have posted it! As far as I am concerned, however, as I said in my first post, it is more of a "fun" thing. It is far easier to use one of the third party start menus.
     
    davehc, Jan 22, 2013
    #18
    1. Advertisements

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Similar Threads
  1. gringo8

    Windows 8 Consumer Preview Product Key?

    gringo8, Mar 1, 2012, in forum: Installation, Setup and Upgrades
    Replies:
    1
    Views:
    3,269
    gringo8
    Mar 1, 2012
  2. allswl

    3 Key Features in Windows 8

    allswl, Oct 27, 2012, in forum: Windows 8 News
    Replies:
    3
    Views:
    1,610
    lucasbytegenius
    Nov 12, 2012
  3. AlanHo

    Product Key Anomoly

    AlanHo, Feb 18, 2013, in forum: Windows 8 Support
    Replies:
    11
    Views:
    22,357
    Trouble
    Feb 19, 2013
  4. GuyBall

    Windows 8 Key Recovery?

    GuyBall, Mar 3, 2013, in forum: Windows 8 Support
    Replies:
    13
    Views:
    5,605
    mike marler
    Sep 26, 2013
  5. davidhk129

    Product key

    davidhk129, Sep 11, 2013, in forum: General Discussion
    Replies:
    4
    Views:
    1,654
    davehc
    Jan 5, 2014
  6. amit kaushal

    keyboard left key not working in windows 8

    amit kaushal, Aug 16, 2014, in forum: Hardware
    Replies:
    3
    Views:
    1,099
    Trouble
    Aug 17, 2014
  7. Joker
    Replies:
    1
    Views:
    1,144
    davidhk129
    Nov 14, 2014
  8. Rajittaa
    Replies:
    9
    Views:
    1,650
    Trouble
    Jul 6, 2015
Loading...