473,666 Members | 2,069 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.CreateOb ject("WScript.S hell")

errmsg = oWSH.Run("d:\\s cripts\\copyiis settings.bat 10.0.0.156",0,T rue)

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\syst em32\iiscnfg.vb s /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 Enable32BitAppO nWin64=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 4342
try running a simple bat file like

c:
cd\

see if that errors.


"GP" <su*****@powerf ront.comwrote in message
news:uL******** ******@TK2MSFTN GP05.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.CreateOb ject("WScript.S hell")

errmsg = oWSH.Run("d:\\s cripts\\copyiis settings.bat
10.0.0.156",0,T rue)

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\syst em32\iiscnfg.vb s /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
Enable32BitAppO nWin64=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.comwro te in message
news:uY******** ******@TK2MSFTN GP03.phx.gbl...
try running a simple bat file like

c:
cd\

see if that errors.


"GP" <su*****@powerf ront.comwrote in message
news:uL******** ******@TK2MSFTN GP05.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.CreateOb ject("WScript.S hell")

errmsg = oWSH.Run("d:\\s cripts\\copyiis settings.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\syst em32\iiscnfg.vb s /copy /ts %1 /tu
machineusernam e /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
Administrato r. We are also running IIS with he following flag enabled
Enable32BitApp OnWin64=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*****@powerf ront.comwrote in message
news:%2******** ********@TK2MSF TNGP04.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.comwro te in message
news:uY******** ******@TK2MSFTN GP03.phx.gbl...
>try running a simple bat file like

c:
cd\

see if that errors.


"GP" <su*****@powerf ront.comwrote in message
news:uL******* *******@TK2MSFT NGP05.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.CreateOb ject("WScript.S hell")

errmsg = oWSH.Run("d:\\s cripts\\copyiis settings.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\syst em32\iiscnfg.vb s /copy /ts %1 /tu
machineuserna me /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
Enable32BitAp pOnWin64=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
3942
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 include the directives for running PHP as a loaded module and as CGI as noted in the documentation at php.net # Add to the end of the LoadModule section LoadModule php4_module "c:/php/sapi/php4apache.dll" # Add to the end of the AddModule...
3
2477
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 the Terminal Server are 1. When exiting the application, I got the following error dialog box Title: .Net-BroadcastEventWindow.1.0.5000.0.5:MyExecutable.exe - Application Erro Message: The instruction at "0x77f8910e" referenced memory at...
2
1733
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, you invariably get a System.IO.FileLoadException with an error message such as "Can not access file <assemblyName> because it is being used by another process." where <assemblyName> is the name of the second assembly loaded for your application. The...
15
1937
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 applications or services" Presumably there is a d/l on MSDN to rectify this, but I can't find it. Does anyone know the URL? Many thanks.
5
4060
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 database sits on a Windows2000 server to which everyone has full NTFS access rights. The problem is the WinXP and Win2k clients which appear to run fine (also running Access97) in reading any existing data but as soon as you attempt to edit a...
4
2100
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 Microsoft.DirectX.AudioVideoPlayback.Audio class for that purpose. My problem is whenever I send a command to the program windows gives an error related to the directX, and shuts down the program. However if I run the program manually after the startup it works just fine. I have...
12
14523
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 check to see if the status is in stopped or running mode. But that doesn't tell me if it is actually running. I need to know this so that if it happens I can programmatically start the same service on another machine.
0
1095
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 click. This batch file runs isql, isqlw or bcp utility of sql server to pull the data from database. This command generates the .csv file by executing the query. Initially this web app was hosted on Windows 2000/XP server and it worked fine. It had...
4
1879
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: http://msdn.microsoft.com/msdnmag/issues/0400/async/ unfortunately std::cout doesn't work, because serwer start and run in background, so my question is what I need to change in code.
0
8356
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8869
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8781
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7386
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6198
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4198
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4368
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2771
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1775
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.