473,409 Members | 2,034 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Running Bat file from ASP on Windows Server x64 problem.

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.


Oct 10 '06 #1
3 4324
try running a simple bat file like

c:
cd\

see if that errors.


"GP" <su*****@powerfront.comwrote in message
news:uL**************@TK2MSFTNGP05.phx.gbl...
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.


Oct 10 '06 #2
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.

"Slim" <me@here.comwrote in message
news:uY**************@TK2MSFTNGP03.phx.gbl...
try running a simple bat file like

c:
cd\

see if that errors.


"GP" <su*****@powerfront.comwrote in message
news:uL**************@TK2MSFTNGP05.phx.gbl...
>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.



Oct 11 '06 #3
I would of thought that bat files run without cscript

"GP" <su*****@powerfront.comwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
>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.

"Slim" <me@here.comwrote in message
news:uY**************@TK2MSFTNGP03.phx.gbl...
>try running a simple bat file like

c:
cd\

see if that errors.


"GP" <su*****@powerfront.comwrote in message
news:uL**************@TK2MSFTNGP05.phx.gbl...
>>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.




Oct 12 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Frank Conte | last post by:
I'm having a problem running a simple printer friendly script written in PHP. I'm not sure whether the problem is with apache 1.3 or with the scripts. I updated apache's config file httpd.conf to...
3
by: Chung Ley | last post by:
Hi I am having problem running an .net application on a Windows2000 Terminal Server. The application seems to work fine on user's desktop The issues that I have with running the application on...
2
by: Lorin McCaffrey | last post by:
I have found that .NET applications made up from multiple assemblies do not run from file servers if Microsoft Client Service for NetWare is used to access the file server. When you try to do so,...
15
by: Andrew Chalk | last post by:
I have just moved a project to my laptop and get the message "Visual Studio ..NET has detected that the specified Web server is not running ASP.NET v1.1. You will be unable to run ASP.NET Web...
5
by: Chris Dugan | last post by:
Hi, has anybody come across a solution to running an Access97 database on Windows XP. The situation I have is an Access 97 database that runs perfectly from Win95/98 clients running Access97, the...
4
by: duzinga | last post by:
I am trying to have a server program that runs at startup and accepts several commands from the clients. One of the commands is to play an audio file. I am using...
12
by: tshad | last post by:
What would be a good way to check programmatically whether a service was running? We have a service that dies periodically and I need to check to see if this service is running. I know how to...
0
by: prateekbaxi | last post by:
Hi, I developed a web site for my client on .net 2.0 framework using asp.net 2.0. This web site will be hosted on Windows 2003 server. Web application runs the batch file on the user button...
4
by: devphylosoff | last post by:
hi how to print text messages on standard output (like a "std::cout << "text";) in below serwer : http://devphyl.rootnode.pl/com/SieveServer/ original site:...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.