The difference between them is more or less only that output from your script will be written to a window that pops up (wscript.exe) and wait’s until it gets closed before it continues or to the command line (cscript.exe).īut we don’t want to run it this way. If you do this, the script will be executed by either wscript.exe or cscript.exe within the Windows Scripting Host. If you run a script you normally just double-click it. We simply start our script with a debugging option (How easy was that?). We need to debug them so let’s start with the most direct approach. Strange errors with “Object required” are popping up running us mad. OK, we just wrote a bunch of scripts and nothing works as it should. But there are still a couple places where to get them, just be creative -). But for some reason they dropped the debugging support in it. There isn’t any official download from Microsoft, currently they only offer the Visual Studio Express 2008 version. If you don’t have access to a full version of Visual Studio, just grab any version of Visual Studio Express 2005 (Web Developer should be enough). This will work in most Development Environments.But this documentation and examples are based on Visual Studio 2008. So just follow me through the rest of this post and make your life easier. This post is dedicated to you and to save you a bit time!!! □Īctually all I wanted to have available for my script debugging as mentioned before is already there. And for the vague chance that there is any other poor guy (or girl, even if the percentage of females within IT is quite small) also dealing with this. Call it ignorance, laziness or simply foolishness □ Shame on me. To be honest, I wasn’t aware that this is possible. Most of you will now say “ Why didn’t you just do it that way?“. Go through the code line by line and check the current status of variables. Sometimes I asked myself why it wasn’t so easy to debug this damn vbscripts like it is in VB.Net. So if anything happens you can at least localize the area of the possible cause. So I personally always try to add a lot of logging information in everything I write. Especially if they become larger and larger or even worse reference other scripts during runtime. Finding those errors can become a cumbersome task sometimes. Net?).Īs writing on those scripts you often have to deal with some problems, errors, etc. This is simply about the fact that I had to deal with VBScript quite a lot, especially in the last time due to some Deployments ( Hey Microsoft! When will Windows PE support. I’m not going to talk about the why and why not. I know the future is Powershell but there are still so many existing scripts flying around and also there are some situations where you simply need to use something “old” like VBScript. Many of us have to deal with some kind of scripts.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |