472,111 Members | 1,905 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,111 software developers and data experts.

WMI via VBscript & Apache

2
Can Apache run a VBScript that will do such things as Win32_LogicalDisk via the WMI? Any code samples to look at?

TIA!

Mark

PS: I've already tried this and Apache seems to ignore my request to do the operation. I tried it in Perl also and Apache seems to deny Perl's request to be able to create anything. I've got Admin rights to both machines but it is a no-go.
:-(
Nov 28 '06 #1
3 5916
sashi
1,754 Expert 1GB
Can Apache run a VBScript that will do such things as Win32_LogicalDisk via the WMI? Any code samples to look at?

TIA!

Mark
Hi there,

Apache cannot execute vbscript. in order to execute vbscript you need to save the scripts file as xyz.vbs. Kindly refer to below sample to execute the <.vbs> file, hope it helps. Good luck & Take care.

Expand|Select|Wrap|Line Numbers
  1.  cscripts.exe xyz.vbs
  2.  
Nov 28 '06 #2
markem
2
Errrrrr? Ummmmm....when I said "Apache" I meant that if you were using a web browser going to a website that the returned vbscript would not run the WMI part of the program. The reason is - is that Apache does not have any kind of authority (like Admin capabilities) to run the WMI stuff.

The problem is that even though you are running under your account and the browser is running under your account, there are security locks put in place that prevent certain parts of vbscript from executing. These parts deal with being able to access information you may normally be able to access via the cscript or wscript commands.

What I'm trying to do: My orders are to set up a methodology whereby all of the QA people can access a program that will allow us to monitor and correct problems on various servers we are setting up. I first tried vbscript but our manager doesn't want our source code to get out into the wild. So I then tried Perl and tried putting it behind a web server. (Again a no go because the Perl script would work if I just ran it but when Apache tried to run it, Apache had a different set of privileges and thus Perl simply returned error messages to that effect.) So I tried using vbscript in the hopes that if the vbscript would execute on the client's browser that it would be able to do the WMI stuff. But again - no go because now the browser is the one which is blocking the vbscript from running.

However, I think I've found the answer: Exescript. This program will take a vbscript and make it into a true executable where it will actually run on a Windows box. So it fullfills both of my needs. And for a reasonable price too. :-)
Nov 28 '06 #3
sashi
1,754 Expert 1GB
Errrrrr? Ummmmm....when I said "Apache" I meant that if you were using a web browser going to a website that the returned vbscript would not run the WMI part of the program. The reason is - is that Apache does not have any kind of authority (like Admin capabilities) to run the WMI stuff.

The problem is that even though you are running under your account and the browser is running under your account, there are security locks put in place that prevent certain parts of vbscript from executing. These parts deal with being able to access information you may normally be able to access via the cscript or wscript commands.

What I'm trying to do: My orders are to set up a methodology whereby all of the QA people can access a program that will allow us to monitor and correct problems on various servers we are setting up. I first tried vbscript but our manager doesn't want our source code to get out into the wild. So I then tried Perl and tried putting it behind a web server. (Again a no go because the Perl script would work if I just ran it but when Apache tried to run it, Apache had a different set of privileges and thus Perl simply returned error messages to that effect.) So I tried using vbscript in the hopes that if the vbscript would execute on the client's browser that it would be able to do the WMI stuff. But again - no go because now the browser is the one which is blocking the vbscript from running.

However, I think I've found the answer: Exescript. This program will take a vbscript and make it into a true executable where it will actually run on a Windows box. So it fullfills both of my needs. And for a reasonable price too. :-)
Hi there,

Good luck on your experiment, anyway, thanks for sharing the info with the rest. Take care.
Nov 28 '06 #4

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

3 posts views Thread by Stefan Weiss | last post: by
8 posts views Thread by Dave Thomas | last post: by
1 post views Thread by Tama | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.