Login | |
|
 |
RE: List add and remove programs - 1/4/2008 5:59:23 AM
|
|
 |
|
| |
DiGiTAL.SkReAM
Posts: 1097
Score: 6
Joined: 9/6/2005
From: Florida, USA
Status: offline
|
quote:
ORIGINAL: ebgreen @Digital: You would be amused to hear this story. I was at a work Christmas party and I saw someone that I don't see very often. She says to me "I thought that your hair was darker". My reply "You're right. Every time I get it cut it seems to be a little more grey". Heh heh heh That's ok. My dad had a serious medical problem when he was younger, about in his late 20's. The medical problem was that his wife at that time tried to poison him with arsenic. In any case, she ran off to Canada, and he lost all of his hair! Literally. Not a hair left on his body. Well, he turns 70 in 2 more years, and know what? His hair is just starting to grow back. So now he has grown a "Shaggy" beard (like from Scooby - a Fu Manchu), but it's all white. He was overheard lamenting the other day, "Last time I shaved, it was all dark hair. The next time I shaved, it was all white!"
_____________________________
"There's the one man who learns by reading, the two men that learn by watching, and the rest of us have to pee on the electric fence for ourselves." - Roy Rogers "Would you like to touch my monkey?" - Dieter (Mike Meyers)
|
|
| |
|
|
|
 |
RE: List add and remove programs - 1/4/2008 6:47:38 AM
|
|
 |
|
| |
ebgreen
Posts: 4595
Score: 29
Joined: 7/12/2005
Status: offline
|
"E:\Scripts\addremove.vbs(49, 1) Microsoft VBScript runtime error: Variable is undefined: 'scomp' " Then I suggest that you look at your code and determine what variable you meant to use instead of scomp.
_____________________________
"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm http://www.visualbasicscript.com/m_47117/tm.htm
|
|
| |
|
|
|
 |
RE: List add and remove programs - 1/4/2008 7:59:46 AM
|
|
 |
|
| |
ebgreen
Posts: 4595
Score: 29
Joined: 7/12/2005
Status: offline
|
Well commenting out Option Explicit is a classic example of fixing the wrong problem. What would you think of someone that simply put black tape over the check engine light in their car when it came on rather than finding out why the light was on in the first place? In this case since scomp was not declared that indicates that there probably is a declared variable that you should be using instead. I suggest reading your code and understanding what it is doing and why. Go through your code and comment out every place that you see WScript.Echo. Next go back and selectively put in one and only one WScript.Echo at the first place that you see a variable that you do not know exactly what it holds. Echo out the value of that one variable and only that variable. Now run your code so you can know what is in that variable. After you understand that variable, delete that WScript.Echo and continue reading your script and understanding it. Every time tht you come to something that you don't understand exactly what it is doing, go ahead and temporarily put in an echo that will let you understand it. Continue doing this until you know exactly how your script works. I know that this sounds like I am just trying to avoid helping you, but I really am not. I'm happy to answer any questions about some specific part of the script that you can't figure out on your own. Regardless learning how to do this is in my personal opinion one of the most important parts of learning to script or to program for that matter. Eventually you will get to the point where you won't have to put echos in at all except for when you aren't sure what you are getting back from things that are outside your script (WMI for example). I have always called this Bench Testing a script. The practice of walking through it line by line and ubderstanding what it is doing. You essentially have your script completed and in reality you are debugging its behavior now and not really writing a new script any more. In that vein, let me leave you with this quote: "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." --Brian W. Kernighan So until you understand the code that you have, you won't be able to mold it and reshape it to what you really want. I apologize if I am frustrating you, but I really do prefer to teach rather than do it for people. Or with another quote: "Build a man a fire and he will be warm for a day. Set a man on fire and he will be warm for the rest of his life." --Anonymous as far as I know
_____________________________
"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm http://www.visualbasicscript.com/m_47117/tm.htm
|
|
| |
|
|
|
 |
RE: List add and remove programs - 1/4/2008 5:45:57 PM
|
|
 |
|
| |
Meg
Posts: 123
Score: 2
Joined: 7/13/2006
From: Australia
Status: offline
|
ebgreen's forum style is teaching while mine is just doing it. I do it that way because I am just learning VBSript and as you aburt have noted in this thread, doing is better for learning rather just being shown an answer. Fair enough. It upsets me though that that in earlier thread (exactly same topic) I noted your comments, removed all the HTML thus making the add remove program script compatible with your use, posted a plain VBS version and what do I get? Nothing, (total ignore mode) you abandoned your original thread and started another exactly same one. http://visualbasicscript.com/m_53899/mpage_1/key_/tm.htm#54023 I have two or three new original fantastic scripts that I have nearly finished and was going to post here, but why bother, there is never any feedback unless I prod someone with a stick. I will go away now. Goodbye.
|
|
| |
|
|
|
 |
RE: List add and remove programs - 1/4/2008 6:05:34 PM
|
|
 |
|
| |
ebgreen
Posts: 4595
Score: 29
Joined: 7/12/2005
Status: offline
|
I won't comment on the other thread or it's abandonment, however I will comment on getting feedback. If you want feedback you should ask for it. You seem like you know what you are doing so to be honest with you I don't look at your code a lot. If you want myself or others to look at it further, post up some code with a specific question.
_____________________________
"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm http://www.visualbasicscript.com/m_47117/tm.htm
|
|
| |
|
|
|
|