Modifying the Windows Registry with Visual Basic

Guy Thomas, our Windows programming expert, provides simple tools to remove the annoying arrows on shortcuts.
55 answers Last reply
More about modifying windows registry visual basic
  1. ...orrr..... you can just use powertoys tweak ui to do it.....

  2. DAMN it... you beat me to it. 8O

    That is exactly what I was thinking. That is how I got rid of those darned arrows. While I do know VB .Net and those scripts made perfect sense, it seems like alot of effort when there is a free utility to do it for you with no nasty side effects and you don't have to fiddle with program code (I hate doing that).
  3. I know that in Vista its like alt+something.
  4. i don't know alot about vb or tweakui but is there a way you can find what file the little shortcut arrow graphic is being pulled from and just alter that file to replace the arrow graphic with a blank graphic?
  5. Quote:
    i don't know alot about vb or tweakui but is there a way you can find what file the little shortcut arrow graphic is being pulled from and just alter that file to replace the arrow graphic with a blank graphic?


    That is more effort than TweakUI. TweakUI is an official M$ tool for XP you can download straight from their website. Install it, run it and choose the explorer then short cut, click one radio button and click apply, it can't get any easier.

    Your suggestion sounds like a pain in the arse, honestly.
  6. search the windows system files for .ico files..might get lucky.
  7. Oh sure it can get easier :>

    While that clicking sounds easy enough, you finger and feet are gonna get awful sore around the 18,000 PC that you do that to.

    Scripting is often all about automation.
    While this script is a real basic script without major usefulness, it serves as a starting point for some folks who know nothing about scripting.
  8. Quote:
    Oh sure it can get easier :>

    While that clicking sounds easy enough, you finger and feet are gonna get awful sore around the 18,000 PC that you do that to.

    Scripting is often all about automation.
    While this script is a real basic script without major usefulness, it serves as a starting point for some folks who know nothing about scripting.


    How rich do you think I am... I don't have 18k computers :wink:

    If you really want to talk about deploying configurations... why not spend the time to use tweakui on a base install, ghost it, and use that image for every computer you setup. :o

    I understand your point, it is about automation, but scripts can have nasty side effects (which the author obviously knows about).
  9. C:\Windows\System32\shell32.dll

    this is where the little shortcut arrow icon is located
  10. Quote:
    C:\Windows\System32\shell32.dll

    this is where the little shortcut arrow icon is located


    Something fishy about that...

    Should the arrow file really be a dynamic link library 8O
  11. i think what he meant was that the code to add the arrow was in the dll file...
  12. Well that is entirely different. Hmmm.... *begins to ponder situation* lol.
  13. i don't know the right way to see it, only my way, ha....right click on one of your shortcut icons, click properties, then click the Change Icon button....then at the top of that window, browse to C:\Windows\System32\shell32.dll
    you will see bunches of icons, one of them being the shortcut arrow.

    Cant you just modifiy this file, or modify the reg to point to one of the blank icons that is in this file?
  14. Yeah, I know how you got there... just thinking of the best way to approach this because that file has alot of implications. From my understanding, Windows takes a base icon (whether it be in that dll file or not) and then "attaches" a piece of code and in essence meshes two separate icons together to get that annoying little arrow pasted on top of the base shortcut icon.

    The problem is, I have no idea where that code string is in the system, nor how to get to it.
  15. Just to be safe and make sure you get that d@mn arrow, go to C:\Windows\System32\shell32.dll and just delete the folder. If that pesky "Can Not Delete" message comes up go to google and find a program to force delete files.
  16. Quote:
    Just to be safe and make sure you get that d@mn arrow, go to C:\Windows\System32\shell32.dll and just delete the folder. If that pesky "Can Not Delete" message comes up go to google and find a program to force delete files.


    I wouldn't delete that file... it is used all over for icons and shortcut references, you would have to rebuild all your icons if you delete it. Doesn't sound like a good idea to me, although I could be wrong :?
  17. Quote:
    Just to be safe and make sure you get that d@mn arrow, go to C:\Windows\System32\shell32.dll and just delete the folder. If that pesky "Can Not Delete" message comes up go to google and find a program to force delete files.


    VERY BAD IDEA - DO NOT DELETE SHELL32.DLL!!!!


    just look for a way to saftely modify it
  18. Quote:
    Just to be safe and make sure you get that d@mn arrow, go to C:\Windows\System32\shell32.dll and just delete the folder. If that pesky "Can Not Delete" message comes up go to google and find a program to force delete files.

    Feeling suicidal are we???
  19. Open Regedit.exe in "Run" and find the Key called "IsShortcut"

    HKEY_CLASSES_ROOT, Inkfile and export the "IsShortcut" You might want to use it again...? Then delete "IsShortcut" ---> Log-off and Log-on...

    Shortcut arrows gone :)
  20. Quote:
    Open Regedit.exe in "Run" and find the Key called "IsShortcut"

    HKEY_CLASSES_ROOT, Inkfile and export the "IsShortcut" You might want to use it again...? Then delete "IsShortcut" ---> Log-off and Log-on...

    Shortcut arrows gone :)


    Exactly whats done in the script lol. :D


    ....more or less
  21. I was kidding. I didn't think he would take it seriously.
  22. I didn't check the script :) But this is how I remebered it... can make a script out of it... :lol:
  23. Quote:
    I didn't check the script :) But this is how I remebered it... can make a script out of it... :lol:


    Ah, good deal. I don't know near enough about the registry, rather not near as much as I should know. :?

    Quote:
    I was kidding. I didn't think he would take it seriously.


    :tongue:
  24. Well, they only have nasty side effects if you don't know what you are doing. I'm just pointing out a different perspective and how this type of thing can be useful. It's not really a home enthusiast tip, but more of a network admin type of tip.

    My perspective comes from what I do for a living, which is automating the deployment and configuration of many 1,000s or 10,000s of PCs across an organization.

    The primary issue with the article, is that it's just so out of place on this website. For a home enthusiast you point them to tweakui or just the reg file and dont even talk about WSH or VBS. This article should be more aimed at network admin type of people.

    In regards to Ghost, that is a good tip but again one in which scripting would still be useful. Example - When creating a "Ghost Image' of a new machine, you could have a 5 page document detailing everying that needs to be installed and tweaked or you could have a one line doc that says "click this" and sit back while it brings down Sun Jave, Adobe Reader, tweaks the registry, etc.. etc.. etc.. Then you take the ghost image to be deployed out.

    I get frustrated to no end with people who make these huge long documents with 100s of steps to configuring servers and/or PCs. It is so rare that a step is not missed since even if a person gets 99% right he will miss one thing. If he is 99.9% accurate, even then one in 10 goes out with one of the 100 items wrong.

    In my job, its all about automation, fallbacks, verification, etc...
  25. It may be provided on the MS website but I think they make it clear that you use the tools at your own risk and that there is no support. I downloaded those tools years ago but I like the annoying arrows because I can see at a glance that file is a shortcut and not the program. No big deal either way though.
    Quote:
    Note: We take great care to ensure that PowerToys work as they should, but they are not part of Windows and are not supported by Microsoft. For this reason, Microsoft Technical Support is unable to answer questions about PowerToys. PowerToys are for Windows XP only and will not work with Windows Vista.
  26. Quote:
    Oh sure it can get easier :>

    While that clicking sounds easy enough, you finger and feet are gonna get awful sore around the 18,000 PC that you do that to.

    What company with 1800 computers, or 10 computers for that matter, is going to give a crap whether their employees have arrows for their shortcuts or not? They probably would want the machines to be as close to stock as possible.
  27. Quote:
    It may be provided on the MS website but I think they make it clear that you use the tools at your own risk and that there is no support. I downloaded those tools years ago but I like the annoying arrows because I can see at a glance that file is a shortcut and not the program. No big deal either way though.
    Note: We take great care to ensure that PowerToys work as they should, but they are not part of Windows and are not supported by Microsoft. For this reason, Microsoft Technical Support is unable to answer questions about PowerToys. PowerToys are for Windows XP only and will not work with Windows Vista.


    No one ever said there was technical support for the app, the point is it was created by Microsoft, so it does work. There isn't much risk in the program because you don't alter really the core files, just a few options that should really be available in the control panel.

    Also, a company should let their employees change their desktop to a certain to degree. It just makes people happier being to put things where they like to see them. First thing I did when I got my corporate laptop was move all those damn icons. I hate desktop icons... I want them all gone lol.
  28. Quote:

    Also, a company should let their employees change their desktop to a certain to degree. It just makes people happier being to put things where they like to see them. First thing I did when I got my corporate laptop was move all those damn icons. I hate desktop icons... I want them all gone lol.


    That is so true.

    I remember years ago on Windows 95 a user had a very detailed picture on her granddaughter as a backdrop. We were able to determine this was causing her PC to crash and using the std wallpaper resolved the issue. I thought I had fixed her crashing. Her thoughts, "Gee, I guess I need to live with the crashing. Yes, the customization was more important to her than a stable PC.

    That makes my job far tougher in most cases.
    I can't be a PC Dictator, or folks will be unhappy.
    At the same time I need to ensure the PC remains operational.
    Talk about tightropes.
  29. Really, a background was causing crashes :?: .... however, that was Windows 95. I really do understand the tightrope you must walk (and agree with it), but Windows has also come a long way (good or bad, this isn't the place to debate that lol :wink:) from Win 95. You shouldn't be allowed to install random programs, random tweaks, but moving icons and tidying up of the desktop should be allowed.
  30. The shortcut arrows dont annoy me one bit. Why are they annoying??

    If you dont have them on there you have to right click it to know its a shortcut!

    .....I dont get it.
  31. Quote:
    ...orrr..... you can just use powertoys tweak ui to do it.....



    Why is it that someone can make something so easy into something so hard, and somehow justify several pages of an article to do it?
  32. Quote:
    The shortcut arrows dont annoy me one bit. Why are they annoying??

    If you dont have them on there you have to right click it to know its a shortcut!

    .....I dont get it.


    I know exactly what is a shortcut on my computer, I don't need an arrow to tell me it is.

    They really just bug the crap outta me.

    If you aren't bothered by them, fine, that's why we each have our own desktop configuration. :D

    Just set it up how you like it. :)
  33. Because he is trying to teach a concept more than he is trying to teach how to remove arrows in shortcuts.

    The author is a programmer by trade who is trying to show people some things that can be done via scripting.
  34. Guess I'm just lazy by nature. I usually seek the easiest way to do something, not the most complicated.
  35. Quote:
    Just to be safe and make sure you get that d@mn arrow, go to C:\Windows\System32\shell32.dll and just delete the folder. If that pesky "Can Not Delete" message comes up go to google and find a program to force delete files.


    don't you mean C:\Windows

    That way you can be sure everything is gone
  36. Quote:
    It may be provided on the MS website but I think they make it clear that you use the tools at your own risk and that there is no support. I downloaded those tools years ago but I like the annoying arrows because I can see at a glance that file is a shortcut and not the program. No big deal either way though.
    Note: We take great care to ensure that PowerToys work as they should, but they are not part of Windows and are not supported by Microsoft. For this reason, Microsoft Technical Support is unable to answer questions about PowerToys. PowerToys are for Windows XP only and will not work with Windows Vista.


    No one ever said there was technical support for the app, the point is it was created by Microsoft, so it does work. There isn't much risk in the program because you don't alter really the core files, just a few options that should really be available in the control panel.

    Also, a company should let their employees change their desktop to a certain to degree. It just makes people happier being to put things where they like to see them. First thing I did when I got my corporate laptop was move all those damn icons. I hate desktop icons... I want them all gone lol.
    1. I never said that anyone said there was support. I was just making it clear that there wasn't.
    2. I never said that companies should or shouldn't or did or didn't let their employees change their desktops. quite frankly I couldn't care less either way. I was responding to the quote below, which I attached to my original post.
    Quote:
    Oh sure it can get easier :>

    While that clicking sounds easy enough, you finger and feet are gonna get awful sore around the 18,000 PC that you do that to.


    The point that I was trying to make is that there wouldn't be any walking around for the IT techs to do because, although the company may allow the individual to make changes to their desktop, I seriously doubt that they would make a company wide policy to remove the stupid little arrows on all of the 18,000, or 10, computers. No wait, they probably would send a company wide memo and allow people to vote on their preference, then after determining that there were more people that wanted them removed they would make a company wide change remotely. Do you see how ridiculous that sounds?
  37. Sorry my 2nd paragraph wasn't directed at you in anyway, I forgot to put the tag to designate it as a response to Zen, not you. That is my fault.
  38. But many factors determine what is easiest.

    About 12 years ago on one of my first jobs, the IT director hired 15 contractors for a 90-day contract for about $250,000 to complete deploy and configure software across the enterprise.

    I walked into his office about an hour before quitting time and told him I could have the project done by tomorrow morning. I did and no I did not stay late.

    They had to find other things for those 15 people to do for 3 months.
    Now, in many ways what I did was difficult and would have been totally in appropriate for deploying and configuring software on a single PC. That would have taken 5 minutes. It took me an hour. However, at some point my method became the preferred method.

    Sure the task the authored was simple, but then again most posters here think it was quite complex. What the author provide was a framework that could easily be modified to perform and host of tasks as well as being easy to automate.

    IMHO, a whole series of these would be good and ones that build upon each other. However, they should be categorized into a scripting section. Scripting is generally not the most efficient method for the home enthusiast, but for many its the only possibility due to scaling.
  39. You would be surprised at what is or is not enforced in large companies.

    Frequently 100s of little interface options are enforced to make training easier. Ever sit down at a PC with the pointer changed to a Dinosaur or Horse? It takes you 10 minutes to figure out what part of the animal to click with. Now, if the shortcut Icon indicator is gone, this could greatly confuse people. So personally, I would be more likely to enforce this.

    But again, this is a simple script.
    The beauty of scripting is you can copy, mold, and form them to your needs.

    When I was about 10, I used to type BASIC computer programs into my PC so I could have games. I did not fully understand what I was doing but by finding typos I learned what sections of code did.

    Soon I was "writing" my own games by cutting and pasting code with slight tweaks. I could not write any of it from scratch since I did not understand it well enough.

    While by this time I am a fairly good coder, I often don't write my own code in it's entirity. Rather I look for somebody who has posted their source code to tackle a similar problem and then tweak it to fit my needs.

    When taking a programming class, one of the first programs anyone ever writes is one that displays the message "Hello, World!". Why? This serves no functional purpose. Could you imagine buying a product that put the message "Hello, World!" on your screen? Of course not. It's a building block.

    Here the author writes a simple script to modify some Windows registry settings and explains how it works.

    Perhaps next he could write one that parses the info in the registry and creates logical branches for writing to the registry before it does the write.

    Then next he could add in scripting to allow for input parameters and output return codes.

    It's all about building blocks.
    If he would have written a script to change the world, nobody would have had a clue about what he was talking about.
  40. Quote:
    Sorry my 2nd paragraph wasn't directed at you in anyway, I forgot to put the tag to designate it as a response to Zen, not you. That is my fault.


    No Problem.
  41. Quote:
    But many factors determine what is easiest.


    I think in simple, terms, what's easiest for me. Years ago I did write code and programing, in those simplistic days of Commodores, Apple IIe's, and the first IBM PC's, so I understand the basics of it all. I just find that if I can buy or download a program that does what I want, it saves me time in the long run. Sometimes I do go into the registries and change things for a particular purpose, but not if I find an easier way that accomplishes what I desire.
  42. Quote:
    You would be surprised at what is or is not enforced in large companies.

    Apparently I am having a hard time expressing myself. Let's see if I repost it will become clearer.
    Quote:
    What company with 1800 computers, or 10 computers for that matter, is going to give a crap whether their employees have arrows for their shortcuts or not? They probably would want the machines to be as close to stock as possible.

    and
    Quote:
    I never said that companies should or shouldn't or did or didn't let their employees change their desktops. quite frankly I couldn't care less either way.

    But I appreciate you reiterating that companies would not be inclined to remove the arrows on the shortcuts.

    Edit:SP
  43. Well that is the simplest tool. I read the whole article looking for Guy to mention it, but nevermind. Guess Guy learnt sometimes there's an easier way!
  44. It's a nice intro to what can be done with scripting, buyt most of us who would actually would (like to) try something with scripts probably know what can be done with them.
    I can do a bit of Java/object based programming (I recently programmed GPS software with a group for a college project) but I really don't know anything about other languages, like VBscript. Since you say you try to interest us for VBscripting, it would have been nice to see what
    Option Explicit
    Dim objShell, strRoot, strRead, strDelete, strCreate [/code:1:38f46c873f]means and does. And why do you set 'strDelete = null' (if the = sign is even used to set variables in this language)? Stuff like that would have been a welcome addition for me. The only 'in code comment' is the "create shell object" but that's the only thing I fully understood ;-)
  45. What sort of joke is this? Complete waste of time for THG or the FORUMZ. Microsoft's Power toy has been able to do this since XP came out! So has pretty of other programs. It also been available a REG fix for nearly as long.
    8O 8O
  46. Quote:
    the point is it was created by Microsoft, so it does work.


    That's so funny, I can't laugh......... :roll:
  47. Wow, umm this is nice an all, but I have to ask: Do we care?
    -Ace
  48. Nope
    8)
  49. Now we have arrows down. How do you change icons on vista? Let say you dont like one icon?
Ask a new question

Read More

Homebuilt Visual Basic Programming Registry Systems