Jump to content

vbscript


citro

Recommended Posts

What, exactly, are you trying to accomplish? I "believe" you can execute VBScript code that is included in the web pages the same as JavaScript - but it will ONLY work on IE. At least it used to. But, allowing that is a HUGE security risk, so it would be a safe bet that it might not work in current versions of IE. Or, are you trying to execute a vbs file that exists on the user's PC?

 

Either way, you are going to have some challenges to overcome. The only solution might be to have a Java Plug-In (not JavaScript) created to perform the actions you want performed. but, that would require the user to actually install the Plug-In.

Link to comment
Share on other sites

What, exactly, are you trying to accomplish? I "believe" you can execute VBScript code that is included in the web pages the same as JavaScript - but it will ONLY work on IE. At least it used to. But, allowing that is a HUGE security risk, so it would be a safe bet that it might not work in current versions of IE. Or, are you trying to execute a vbs file that exists on the user's PC?

 

Either way, you are going to have some challenges to overcome. The only solution might be to have a Java Plug-In (not JavaScript) created to perform the actions you want performed. but, that would require the user to actually install the Plug-In.

I have two computers. On first computer is .vbs scripts which executes "netsh" commands. I need to run script from second computer with web interface this script executes script on first computer. 

Link to comment
Share on other sites

OK, so on the Second Computer (The PC where the user is viewing the web page) you want to initiate the execution of the VBScript on the first computer (where the VBScript exists). Is the first computer also the one where the web server is running?

 

If yes, you can have a PHP script that uses exec() to run the VBScript file. The manual for that function has some examples.

 

If the first PC is not where the Web server is running it would get trickier. You would have to create some kind of service that runs on that PC waiting for a request to run the file. That service would need to monitor a certain port for a request. You could then create a PHP script that generates the request to that machine to run the file. It not impossible, but it beyond what I could help with.

Link to comment
Share on other sites

OK, so on the Second Computer (The PC where the user is viewing the web page) you want to initiate the execution of the VBScript on the first computer (where the VBScript exists). Is the first computer also the one where the web server is running?

 

If yes, you can have a PHP script that uses exec() to run the VBScript file. The manual for that function has some examples.

 

If the first PC is not where the Web server is running it would get trickier. You would have to create some kind of service that runs on that PC waiting for a request to run the file. That service would need to monitor a certain port for a request. You could then create a PHP script that generates the request to that machine to run the file. It not impossible, but it beyond what I could help with.

Web server is only on the second pc! If I can't run this .vbs script so easily maybe is some chance to run Windows CMD command line commands which are in .vbs script?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.