Hello All,
I am new to VBScript and was hoping for some pointers. Basically, I created a DOS batch file at work that allows us to install several software packages in order after we tell it which drive to launch the packages from. The DOS batch file works like a dream, however, I would like to use VBScript to take this to the next level. I have figured out how to do certain things like display system specs and stuff like that, but some of the basic concepts are giving me problems. Here are the questions I have:
1. After setting up an Input Box that has the buttons OK and Cancel, how can I program the script to exit the program if the button Cancel is pressed? As it stands right now, regardless if the OK or Cancel button is pressed, the script will carry on to the next line of code.
2. In the DOS batch file, I was easily able to set up labels and tell DOS if a certain condition was met, goto label, If condition wasn't met goto this label. Basically, I was easily able to direct my script to jump to different parts of my code just by using the goto xxxx. Can I do this in VBScript? Right now, it seems like the Select Case and Do Loops just doesn't fit my needs but that is probably because I don't know how to use them properly for what I am trying to do.
3. I am currently using NotePad to develop my scripts and it is ok for the most part. However, if I run the program and receive an error in line 77, I have to count all the way down just to find out the line. Please tell me there is a better way! Right now I have decided to break my code down into sections and run one part at a time in seperate scripts just to see if it works.
4. Is there a way that I can display colored text in a message box? The goal is to have the system specs displayed and if any part of the system specs doesn't meet my software requirements, then I want it to display additional text (that is red) pointing this out.
Any help or advise would be appreciated. Thanks in advance!
I am new to VBScript and was hoping for some pointers. Basically, I created a DOS batch file at work that allows us to install several software packages in order after we tell it which drive to launch the packages from. The DOS batch file works like a dream, however, I would like to use VBScript to take this to the next level. I have figured out how to do certain things like display system specs and stuff like that, but some of the basic concepts are giving me problems. Here are the questions I have:
1. After setting up an Input Box that has the buttons OK and Cancel, how can I program the script to exit the program if the button Cancel is pressed? As it stands right now, regardless if the OK or Cancel button is pressed, the script will carry on to the next line of code.
2. In the DOS batch file, I was easily able to set up labels and tell DOS if a certain condition was met, goto label, If condition wasn't met goto this label. Basically, I was easily able to direct my script to jump to different parts of my code just by using the goto xxxx. Can I do this in VBScript? Right now, it seems like the Select Case and Do Loops just doesn't fit my needs but that is probably because I don't know how to use them properly for what I am trying to do.
3. I am currently using NotePad to develop my scripts and it is ok for the most part. However, if I run the program and receive an error in line 77, I have to count all the way down just to find out the line. Please tell me there is a better way! Right now I have decided to break my code down into sections and run one part at a time in seperate scripts just to see if it works.
4. Is there a way that I can display colored text in a message box? The goal is to have the system specs displayed and if any part of the system specs doesn't meet my software requirements, then I want it to display additional text (that is red) pointing this out.
Any help or advise would be appreciated. Thanks in advance!