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.
Locked
User avatar
nanodroid
Posts: 12
Joined: Thu Feb 24, 2011 3:10 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
Joined: Thu Feb 24, 2011 3:10 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: 14691
Joined: Tue May 22, 2007 9:57 am
Answers: 7
Has voted: 2 times
Been upvoted: 5 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
Joined: Thu Feb 24, 2011 3:10 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
Joined: Thu Feb 24, 2011 3:10 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
Joined: Thu Feb 24, 2011 3:10 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: 14691
Joined: Tue May 22, 2007 9:57 am
Answers: 7
Has voted: 2 times
Been upvoted: 5 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.



Locked