473,779 Members | 1,912 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Issues with launching Batch files on Win2003 (not Win2000)

hi guys,

here is my problem:
i have to maintain a web vb.net application developped some times ago.
The application was developped on Windows2000 SP3 with Visual Studio
2003 (7.1).
and the application was running on windows 2000 SP3 with the usual IIS.
Right now i need to make it work, on a Windows 2003 SP1 server (but i
need the keep the dev environment on VisualStudio 2003).
this app need to run some batch file, unfortunately for me, on the
initial development instead of rely on the .NET1.1 references classe an
activex was use to run the batch files.
And as I fear this ActiveX doesn't exist on the win2003 OS, so i wrote
a quick launcher for batch file (as you can read below).
I test it under Win2000 OS, and it run fine giving the output of the
batch.
So i deployed the application on Win2003, the same way under
Windows2003.
(well registering .NET 1.1, and allowing it via inetmgr , I also put
trace on,
from web.config file
<identity impersonate="tr ue" />
<authenticati on mode="Windows" /></authentication>
<authorizatio n>
<allow users="*" / <!-- Allow all users -->
</authorization>
<trace enabled="true" requestLimit="1 0" pageOutput="fal se"
traceMode="Sort ByTime" localOnly="fals e" />
)

Then i log on the web app using a user registered on the domain, And i
would really love if the batch could launch.
but unfortunately the launcher return nothing from the StandardOutput
from the process.start.
but no error, no exception. I also check in the eventviewer if there
would be some error raised (i was thinking about silent impersonation)
but unfortuntely i can't found anything...
As i wasn't sure about the impersonation I checked the url :
http://support.microsoft.com/kb/306158/en-us , i implemented any
solution but i keep the same behaviour no error, and an empty result.

So if anybody could raise a solution from his hat it will really be
enjoyable.

Thank you so much in advance.
Kind regards,

Steve

ps : well i just can't make any change on the OS configuration (it's
another team which is responsible for this and they won't go this way)
pps : i run the batch by hand with the same user, and it run fine.

from web.config file
<identity impersonate="tr ue" />
<authenticati on mode="Windows" /></authentication>
<authorizatio n>
<allow users="*" / <!-- Allow all users -->
</authorization>
<trace enabled="true" requestLimit="1 0" pageOutput="fal se"
traceMode="Sort ByTime" localOnly="fals e" />

here is my launcher :
Function executeLocalBat ch(ByVal CommandeComplet e As String, ByVal
LesArguments As String, ByVal TimeOutInSecond s As Int32, ByVal laTrace
As TraceContext) As String

Dim resultat As String = ""
Dim myProcess As Process = New Process
Dim sin As StreamWriter
Dim sout As StreamReader
Dim serr As StreamReader

myProcess.Start Info.FileName = CommandeComplet e
myProcess.Start Info.Arguments = LesArguments
myProcess.Start Info.UseShellEx ecute = False
myProcess.Start Info.CreateNoWi ndow = True
myProcess.Start Info.RedirectSt andardInput = True
myProcess.Start Info.RedirectSt andardOutput = True
myProcess.Start Info.RedirectSt andardError = True
Try

myProcess.Start ()
sin = myProcess.Stand ardInput
sout = myProcess.Stand ardOutput
serr = myProcess.Stand ardError

myProcess.WaitF orExit(TimeOutI nSeconds * 1000)
resultat = sout.ReadToEnd( )
resultat += "Erreur :[" + serr.ReadToEnd( ) + "]"

Catch ex As Exception
Dim error_msg As String = handleText_Exce ption(ex, "erreur
dans l'execution ")
laTrace.Warn(er ror_msg)
resultat += error_msg
End Try
laTrace.Warn("e xec seems ok")

If Not myProcess.HasEx ited Then
myProcess.Kill( )
Throw New SystemException ("Erreur : l'application " +
CommandeComplet e + " ne s'est pas arreté normalement, son execution
s'est probablement mal passée")
End If
laTrace.Warn("e xec the result is = [" + resultat + "]")
Return resultat
End Function

Jul 13 '06 #1
0 1725

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

Similar topics

6
2427
by: ll | last post by:
Hi, I have some ASP pages(called dlls) running well on Win2000, but not Win2003. Got "Permission deny" when called Server.CreateObject("xx.xx"). Any ideas? Thanks...
5
3015
by: Paul | last post by:
I'm using Microsoft's ASPFileUpload routines and all works fine as long as my files are smaller than about 200K. For anything larger than about 210K, I get the following error: Error Type: Request object, ASP 0104 (0x80004005) Operation not Allowed On the .Upload method. Has anyone else experienced this problem with ASPFileUpload?
0
1517
by: Scott Townsend | last post by:
We are trying to get the Microsoft ASPFileUpload to work on both Win2003 and Win2000 http://support.microsoft.com/default.aspx?scid=kb;en-us;q299692 We can now get large and small files on our Development machine. (Win2003 IIS6) Though now that we have posted it to the Production server we cant seems to upload small files. The Production machine is a Win2000 IIS5 machine. It can take large files just fine. The Small files are what...
0
1428
by: natasha | last post by:
i develop applications in VisualStudio.net with win2003+iis6 and deploy them to the production server wich has win2000+iis5 on it. are there going to be problems on the production server?
0
1392
by: Randy | last post by:
Hi all, I'm a developer on the database backend and need to figure out how to get a c++ .net executable to run on a win2003 server. The executable transfers data between oracla and sql server for datawarehousing. I dont know much ..net. It works fine on win2000 and my group has set up another win2000 server and migrated to that one OK. On the win2003 the error in the log file is this : ERROR: Run_Spec_ADO_Curs::get_curr: caught...
0
5643
by: hockeyove | last post by:
Hi! Little help needed... This is my environment: Server: Windows 2003 Client: Windows 2000 and Windows XP
1
3439
by: Ryan Malone | last post by:
I have a situation where I need to download multiple files in a vb.net application. To speed up the process, I am trying to download multiple files at one time looping through each of the files and launching them in their own thread (code below). The problem is that when there are hundreds of files to download, it launches them all at the same time and half don't get downloaded. Any idea how I could control it to launch say 4 at a time,...
1
5096
by: Uday | last post by:
hi everyone, I searched in faq's but couldn't find and solution... so here I post the popular question.. Env: Win2003 server / IIS6.0 Simple ASP page that runs a batch file. When I run the asp page, I see some command line window pop-up on my screen for a second . But the batch file is not executed. I gave 'IUSR_*' account 'full control'.
9
2172
by: sesling | last post by:
We have several batch programs that users need to run each day to move data around our system. The batch files require the user to enter criteria when launching the program. To help simplify this I have created a form that contains several list boxes and a button to launch the batch file. This way the user does not need to type the information in. They will be able to select it from a list box. Is there a way to get the information...
0
9471
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
10302
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
10136
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...
1
10071
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8958
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...
0
6723
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4036
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
3631
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2867
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.