Login | |
|
 |
RE: Using SchTasks in vbScript - 5/11/2006 6:20:34 AM
|
|
 |
|
| |
ebgreen
Posts: 5246
Score: 31
Joined: 7/12/2005
Status: offline
|
I hate double quoting in VBScript. Here is how I approach any double quoting problem. First determine what command would do what you want from the command line. Next write a script that has 2 and only 2 lines in it (well 4 lines if you want to use Option Explicit). The 2 lines will be: strCmd = "THIS IS SOME COMMAND THAT YOU WANT TO RUN" WScript.Echo strCmd Obviously you will need to tweak that first line a bit. Now play around with double quoting until you get what you want to display correctly. Copy and paste into the script where you want to use it. I realize this is not a particularly palatable solution, but it is the only way that I have found that will always eventually wind up with the correct answer. There are some people around that can just look at a string and spot exactly where to use multiple quotes. I just don't happen to be one of them. There are also functions floating around that claim to do proper double quoting for you, but I have never found one that works to my satisfaction.
_____________________________
"... 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
|
|
| |
|
|
|
| |
|
|
 |
|
 |
|
|