Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can't run VB script on IIS the machine beeps when run

Status
Not open for further replies.

999Dom999

Technical User
Apr 25, 2002
266
GB
I have a VB script that I call with a php file, it runs a script that gets free diskspace from a group of servers and writes results to a csv file, it runs locally no problem.

When accessed via php page it does actually run the script because it outputs to a file and writes the headings but I don't get any results and the IIS server does a single beep. This must be some sort of permissions issue, I have looked through logs but I can't see anything explaining the error.

I have removed anonymous access and left integrated windows authentication, I have logged in with the domain admin account and still doesn't work.

Any ideas?
 
I used the exec command in a php page this opens a shortcut .lnk file that opens my diskspace.vbs file, the idea is to run the script locally on the server.

I put some auditing on the server and saw that I'm accessing with the administrator account so really confused.

I did try copying the code into a .asp page but I get an error:
Microsoft VBScript runtime (0x800A0046)
Permission denied: 'GetObject'
/Script/index.asp, line 21

Apparantly its a security issue internet explorer will not run the GetObject command.

I'm about to give up on this idea and look at a different approach.
 
I have a VB script that I call with a php file, it runs a script that gets free diskspace from a group of servers and writes results to a csv file, it runs locally no problem.
It runs locally because more than likely you are using impersonationLevel=impersonate which would use the creadentials of the logged on user, assuming that would be you and that you have the rights required to enumerate the servers.
You can set it to Delegate, which allows remote computer to impersonate you and give your credentials (or credentials of an account that has the rights to enumerate the servers). It's just a bad idea that can be a security risk, I recommed avoiding it if you can. Google "VBScript ImpersonationLevel Property: for more info.
What I would do, and nothing against PHP, is build a form to input the server names and run the VBScript through and ASP page. You could get the results back in the same window using the SPAN tag, or have the results open in a new window, format it as you like, say a table. Print out or export results into a .csv file.

Jesse Hamrick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top