Running Bat file from ASP on Windows Server x64 problem.

G

GP

Hi,

I'm having trouble running a bat file from an ASP page.
It works fine on Windows 2003 Std x32 server but fails now we have upgraded
to the x64 edition

In the ASP we are trying to run the following

Set oWSH= Server.CreateObject("WScript.Shell")

errmsg = oWSH.Run("d:\\scripts\\copyiissettings.bat 10.0.0.156",0,True)

set oWSH = nothing

The errmsg is returning 1 (not very helpful)

In the BAT file we are running the following command:
cscript.exe c:\windows\system32\iiscnfg.vbs /copy /ts %1 /tu machineusername
/tp machinepassword

I am sure the permissions are setup correctly in IIS as both the Application
Pool and Authenticated Anonymous User are set as the Administrator. We are
also running IIS with he following flag enabled Enable32BitAppOnWin64=True
I can only think maybe there is a problem being related to the fact we are
running x64 and perhaps there is a registry setting or group policy setting
i need to change?

Thanks,
Greg.
 
G

GP

i figured it out.

problem is that when you call the bat from the ASP it runs as a 32 bit
process and runs the cscript.exe from the syswow64 directory and this fails.
i copied the cscript.exe from the system32 into the syswow64 directory and
this fixed the problem

g.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top