• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 190
  • Last Modified:

run .vbs file

can java run a .vbs file? and pass it a value?
0
ellandrd
Asked:
ellandrd
  • 4
  • 3
  • 3
6 Solutions
 
objectsCommented:
not directly. You'd need to use wither Runtime.exec() or JNI.
0
 
CEHJCommented:
Yes, java can execute any command (Runtime.exec())
0
 
ellandrdAuthor Commented:
and pass it a value?
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
CEHJCommented:
The value is passed in with the program args to Runtime.exec
0
 
objectsCommented:
> and pass it a value?

sure, if using exec() you'd pass it the same way you pass any arg to an application
if using JNI, you'd pass the value as a parameter to the JNI function.
0
 
ellandrdAuthor Commented:
so say something like:

Runtime.getRuntime().exec( "http://192.168.0.2/file.vbs?value=" + value ) ;
0
 
CEHJCommented:
No. The test is to run it in the same way as you would invoke the vb interpreter from the command line
0
 
objectsCommented:
> Runtime.getRuntime().exec( "http://192.168.0.2/file.vbs?value=" + value ) ;

no, you'd need to pass the vbs file to an interpreter to run it
and in your case one that was capable of running it from a url

0
 
ellandrdAuthor Commented:
thank you!
0
 
CEHJCommented:
:-)
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 4
  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now