Scripting Error

Anything VBScript-related, including Windows Script Host, WMI, ADSI, and more.
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 13 years and 1 month old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
User avatar
nanodroid
Posts: 12
Last visit: Thu Mar 22, 2012 6:19 am

Scripting Error

Post by nanodroid »

Hi, I'm a novice so please be kind. I have just started reading the VBScript WMI, ADSI unleashed. I'm currently on CH.2 and the exercise on creating a dialog box here is the command:

WScript.Echo "Display Output"

I saved it as a .vbs file and just downloaded WSH graphical version but still no luck. Although I don't have visual basic could this be that problem...
User avatar
nanodroid
Posts: 12
Last visit: Thu Mar 22, 2012 6:19 am

Scripting Error

Post by nanodroid »

Hi, I'm a novice so please be kind. I have just started reading the VBScript WMI, ADSI unleashed. I'm currently on CH.2 and the exercise on creating a dialog box here is the command:

WScript.Echo "Display Output"

I saved it as a .vbs file and just downloaded WSH graphical version but still no luck. Although I don't have visual basic could this be that problem...
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Scripting Error

Post by jvierra »

WHat are you asking?

You don't need to download anything. ALl components for VBScript are included on your machine. WSH is the whole sciptingenvironment and is installed with operating system.

You have to explain what is happening or what is NOT happening.

WScript.Echo send a text message to the console or display a system message box.

Try this at a prompt.

cscript //H:CSCRIPT
wscript testmb.vbs
cscript myscript.vbs //NOLOGO

Of course substitute you own file name
User avatar
nanodroid
Posts: 12
Last visit: Thu Mar 22, 2012 6:19 am

Scripting Error

Post by nanodroid »

The command is suppose to show a dialog box that states "Display Output" but its just opening the notepad. I tried the commands that you gave me but they didn't work. I'm at a brick wall......

User avatar
nanodroid
Posts: 12
Last visit: Thu Mar 22, 2012 6:19 am

Scripting Error

Post by nanodroid »

Figured it out I wasn't saveing the file correctly: I was saveing it without double quotations: ie. "Sample1.vbs" then the icon showed up on my desktop....thank Jvierra.
User avatar
nanodroid
Posts: 12
Last visit: Thu Mar 22, 2012 6:19 am

Scripting Error

Post by nanodroid »

Thanks jcierra I will do that...also what do you think of the book that I'm reading called VBScript WMI, ADSI unleashed. Is this good for beginners like miself.
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Scripting Error

Post by jvierra »

It is a good book however I would grab a basic WIndows book and a book on basic VBScript to run through first. I think it would make understanding the nuances of the advanced book easier to understand.

The WMI book does get fundamental but it will not explain simple WIndows issues like you just had. There will be more.

I would purchase an MCP Windows XP training book. YOu should be able to get one surplus for less that $5. That will give you all of the internal fundamentals.


This topic is 13 years and 1 month old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked