evaluate.vbs

jstevens
GoldLounger
Posts: 2628
Joined: 26 Jan 2010, 16:31
Location: Southern California

evaluate.vbs

Post by jstevens »

I'm not sure if this should posted in the Excel forum but feel free to move it if necessary.

I just noticed a file named "evaluate.vbs" and cannot determine what it is used for. Under Windows Explorer, the file type lists it as a VBScript Script File.

I have not found anything searching the web.

Regards,
John
Regards,
John

User avatar
HansV
Administrator
Posts: 78446
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: evaluate.vbs

Post by HansV »

VBScript is a programming language that closely resembles VBA. It can be used in web pages (just like JavaScript), but is can also be used in stand-alone script files with extension .vbs. The file you found is one of those. You can investigate a .vbs file by opening it in Notepad or any other text editor, and you can run it by opening (double-clicking) it from Windows Explorer. But don't run a .vbs file if you don't know what it does!

See VBScript on Wikipedia for more information.
Best wishes,
Hans

jstevens
GoldLounger
Posts: 2628
Joined: 26 Jan 2010, 16:31
Location: Southern California

Re: evaluate.vbs

Post by jstevens »

Hans,

Looking at the file with Notepad, the contents is: "Wscript.echo eval(WScript.Arguments(0))".

I'm not sure what this does or how it got there.

Regards,
John
Regards,
John

User avatar
HansV
Administrator
Posts: 78446
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: evaluate.vbs

Post by HansV »

How it got there, I don't know - perhaps you downloaded it?

The script can be used as a kind of primitive calculator from a command prompt window.

I created a text file Evaluate.vbs with the line that you posted (without the quotes) in the root of C:.
Next, I opened a command prompt window at C:\.
In this window, I typed evaluate 3+4, then I pressed Enter.
Here is the result:
x89.png
You do not have the required permissions to view the files attached to this post.
Best wishes,
Hans

jstevens
GoldLounger
Posts: 2628
Joined: 26 Jan 2010, 16:31
Location: Southern California

Re: evaluate.vbs

Post by jstevens »

Hans,

I determined how it got there. I run a batch file that uses the evaluation.

It just took me awhile to get to the bottom of it.

Regards,
John :flee:
Regards,
John