Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I'm trying to call a vbscript that runs two command line programs on the server that convert an ESRI .shp file to a transparent .gif
The vbs itself works, it runs fine from the server itself. However, I'm trying to call that script from and .asp page (I want it to run on the server). Everything that I can find in reference books or on the internet indicate I have the setup correct, but the script just doesn't run.
Does anyone have any experience of this?
My code is as follows:
On the .asp page:
Dim oWSH
Set oWSH = Server.CreateObject("WScript.Shell")
oWSH.Run "c:\arcims\website\routeP~1\routin~1\create~1.vbs"
Set oWSH = NothingIn the vbs:
Dim MyTest
Set MyTest = CreateObject("Wscript.Shell")
'Run AutoImager to Create .gif from .shp
MyTest.Run "C:\Progra~1\Mystik~1\AutoIm~1\AutoIm~1.exe /f f:\ArcIMS\Website\ROUTEP~1\ROUTEI~1\route_3a.shp /c GIF /oc 8 /u /oq 90"
'Wait for 4 second while AutoImage completes
Wscript.sleep(4000)
'Run Giffy to convert to a transparent .gif
MyTest.run "f:\arcims\website\routeP~1\routeI~1\giffy.exe /ty \\gisdev\gisdev\arcims\website\routeP~1\routeI~1\route_3a.gif \\gisdev\gisdev\arcims\website\routeP~1\routeI~1\route_3a.gif"
Set MyTest = Nothing

Most web servers do not allow you to make all types of objects from ASP, because it is a security risk. It is possible that the server you are trying to create the WScript.Shell object on does not allow you to create such an object.
If this is your server (meaning you administer it yourself and have physical or VPN access to) then you can set the permissions for the WScript ActiveX DLL to allow it to be created by a script.
If this is NOT your server (meaning it is a Host's server that you pay to have your web site on) then you will have to ask them if they would allow the WScript object to be created from your asp page.
Hope This Helps,
Chi Happens

![]() |
BAT Files
|
popular languages of toda...
|

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |