I am trying to change a registry value that has the name Default. How do I change a registry value named Default? The Scripting Guy who writes this column spent a good 4 or 5 hours hacking away at blackberry bushes on Sunday, and by the time he was done the blackberries had been defeated.
In addition to that, the Scripting Guy who writes this column managed to make it into work on time Monday morning. Oh, and just to put a little icing on the cake, he also had enough fingers and toes left to enable him to write a script that changes a registry value with the name Default: So what is that trick?
Can we use this came script to modify a Default key on a remote computer? You already know the answer to that one: All we have to do is assign the name of that remote computer to the variable strComputer: No problem; we simply assign that entire path to the variable strKeyPath: Why does it work this way?
But it does work. So do the Scripting Guys know stuff like this because they are highly-trained, highly-paid professionals who have to know stuff like this? Instead, several years ago the Scripting Guy who writes this column was trying to write a script that would read information from the registry. Each time he ran the script, however, he got some very strange, very unexpected results.
Eventually, he figured out that he had forgotten to assign the variable strValueName a value. Because of that, his script was reading the Default value instead. But you know what we mean. And sure, you can use this exact same approach to read the Default value in a registry key. Give this script a try and see for yourself: Echo strValue That should do it, TL; like we said, this was actually an easy one, once you knew the trick. As it turns out, wielding a machete was equally easy and surprisingly fun.
Which, needless to say, came as a major disappointment to the Scripting Editor. After all, if anything ever happened to the Scripting Guy who writes this column, the Scripting Editor would finally be able to fulfill her lifelong dream: Sorry, Scripting Editor; not this time. You might still get your chance after all.
The Scripting Guy who still writes this column was really only interested in cutting down blackberry bushes. However, it turns out that machetes are also useful against zombies and vampires. Hacking at the hands will also help you avoid getting the blade stuck inside the zombie. As always, your objective should be to buy enough time to escape.