473,725 Members | 2,243 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to execute a batch file without showing the execution?

Hi Everybody,

Is anybody knows how to Hide Execution of batch file at background? I mean
without displaying the DOS Prompt window while batch file is being executed.
I used code below to execute batch file. Is there other ways to do this? I
need help. Thanks.

Code:
System.Diagnost ics.Process.Sta rt("batchfile1. bat");
den2005
--
MCP Year 2005, Philippines
Nov 1 '05 #1
2 7248
Den,

I thought that it was this one.

Using.......... ......
\\\
Process p = new Process();
p.WindowStyle = ProcessWindowSt yle.Hidden;
p.FileName = "batchfile1.bat ";
p.Start();
///
I hope this helps,

Cor

"den 2005" <de*****@discus sions.microsoft .com> schreef in bericht
news:3D******** *************** ***********@mic rosoft.com...
Hi Everybody,

Is anybody knows how to Hide Execution of batch file at background? I
mean
without displaying the DOS Prompt window while batch file is being
executed.
I used code below to execute batch file. Is there other ways to do this? I
need help. Thanks.

Code:
System.Diagnost ics.Process.Sta rt("batchfile1. bat");
den2005
--
MCP Year 2005, Philippines

Nov 1 '05 #2
Thanks Cor, but I solved it earlier when I found clues on another forum at
VBCity.com. But thanks anyway.

den2005
--
MCP Year 2005, Philippines
"Cor Ligthert [MVP]" wrote:
Den,

I thought that it was this one.

Using.......... ......
\\\
Process p = new Process();
p.WindowStyle = ProcessWindowSt yle.Hidden;
p.FileName = "batchfile1.bat ";
p.Start();
///
I hope this helps,

Cor

"den 2005" <de*****@discus sions.microsoft .com> schreef in bericht
news:3D******** *************** ***********@mic rosoft.com...
Hi Everybody,

Is anybody knows how to Hide Execution of batch file at background? I
mean
without displaying the DOS Prompt window while batch file is being
executed.
I used code below to execute batch file. Is there other ways to do this? I
need help. Thanks.

Code:
System.Diagnost ics.Process.Sta rt("batchfile1. bat");
den2005
--
MCP Year 2005, Philippines


Nov 3 '05 #3

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

Similar topics

0
1363
by: Sojwal | last post by:
We're trying to trigger execution of some WSH scripts from a batch file which in turn is called from an ASP script. The ASP code looks like: <% Dim oShell,sResult,sPath Set oShell = Server.CreateObject("Wscript.Shell") sPath= server.MapPath("test.bat") sResult = oShell.run(sPath, 0, FALSE) 'asynchronous Response.Write sResult %>
4
2476
by: carrot | last post by:
With .Net Studio, I have a solution includes some projects. I want to execute a batch file during build solution time. For example, 1'st project is builded. 2'nd project is builded. " a batch file is executed." 3'rd project is builded.
2
2814
by: DB | last post by:
Hi All, I have to execute dos command containing batch file using asp.net application. Code for batch file execution is working properly when I tried it with console application but same code is not working with ASP.net application. Help will be useful......... Thanks n Regards, Deepak
2
586
by: den 2005 | last post by:
Hi Everybody, Is anybody knows how to Hide Execution of batch file at background? I mean without displaying the DOS Prompt window while batch file is being executed. I used code below to execute batch file. Is there other ways to do this? I need help. Thanks. Code: System.Diagnostics.Process.Start("batchfile1.bat");
3
7592
by: JoelBrimm | last post by:
I have a batch file that executes a command line utility to do a secure file copy from our server to a 3rd party server. The batch file works fine, but when I call it from the web service the log file shows that it hangs up on the execution of the utility ( an exe ). Batch files without an exe work fine. I also tried running the exe from the web service ( rc = shell(application,hide,true) ) but it didn't work either.
1
3765
by: Crash | last post by:
Hi, ..NET v1.x SP1 VS 2003 SQL Server 2000 SP3 Server 2000, XP, Server 2003 I would like to programmatically execute {possibly many} SQL Server batch scripts. Aka I have many scripts that drop/add stored procedure definitions, alter table definitions & constraints, etc... and I would
0
1725
by: ee_stevek | last post by:
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,...
1
5274
by: byjufromgamut | last post by:
I created a batch file, when executes gives a preview window(using swings & JFrame). I created another java fie in which used a Process object and Runtime.getRuntime().exec(path) , where path specifies the location of above batch file. when indepedantly executes i am able to execute the bath file through this second program. Now the problem is that i want to execute the batch file in my JSP where i have tried a lot to execute the batch file...
2
2579
by: abhaybhat | last post by:
I run a batch file, which is nothing but a make file of my project. It also does linting for me. Hence the execution of the batch file in the DOS window can be seen, which is very huge(i have around 2000 .c files in the project) Here i need to log the execution of the batch file in a .txt file so that i can analyse the details of the execution. The execution is so huge that i loose most of the execution-data from
0
9401
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...
1
9179
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
9116
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8099
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
6702
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
6011
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();...
0
4519
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
4784
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3228
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

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.