473,699 Members | 2,799 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Running .exe file

Hello!
How to run .exe file, that will be in the same directory?
Nov 21 '05 #1
4 1219
"Leszek Gruszka" <le******@poczt a.onet.pl> schrieb:
How to run .exe file, that will be in the same directory?


Take a look at 'Microsoft.Inte raction.Shell' and
'System.Diagnos tics.Process.St art'.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Nov 21 '05 #2
shell(Applicati on..StartupPath & "\file.exe" )

hth

Peter

"Leszek Gruszka" <le******@poczt a.onet.pl> wrote in message
news:eK******** ******@tk2msftn gp13.phx.gbl...
Hello!
How to run .exe file, that will be in the same directory?

Nov 21 '05 #3
?? use the "Shell" Function in .NET:

http://msdn.microsoft.com/library/de...vafctshell.asp
"Leszek Gruszka" <le******@poczt a.onet.pl> wrote in message
news:eK******** ******@tk2msftn gp13.phx.gbl...
Hello!
How to run .exe file, that will be in the same directory?

Nov 21 '05 #4
Thanks!
It works ok, but there is a little problem...
I'm trying to execute "gpresult.e xe > 1.txt".
I don't know how to run it and i'm getting error at ">".
It cannot put stream into a file.

My code looks something like that:

Dim aplik as integer
aplik = Shell("""gpresu lt.exe"" >1.txt", , True)

Użytkownik "Will Gillen" <gi******@nsuok .edu> napisał w wiadomo¶ci
news:eT******** *******@TK2MSFT NGP09.phx.gbl.. .
?? use the "Shell" Function in .NET:

http://msdn.microsoft.com/library/de...vafctshell.asp

"Leszek Gruszka" <le******@poczt a.onet.pl> wrote in message
news:eK******** ******@tk2msftn gp13.phx.gbl...
Hello!
How to run .exe file, that will be in the same directory?


Nov 21 '05 #5

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

Similar topics

3
3676
by: Fabio Pliger | last post by:
Hi, is it possibile, in python, to check for an already running instance of an application? My problem is that, if my program i running and the user relaunch it, i don't want to open a new instance and have to instances of the same program running togheter... Can someone help me on this? Fabio P.
6
10521
by: Pierre-Yves | last post by:
Hello, I would like to prevent my perl program to be executed several times simultaneously (if the program is already running, I would like to display a message like "another instance of this program is already running, please try again in a couple of minutes). For doing this, I guess I have to check the running processes... but I don't know how to do that and how I can identify my program in the running processes.
15
1942
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.
3
2204
by: jliusolar | last post by:
Hi I am trying to figure out why an application get this error when I am trying to open the application's asmx file from localhost. I don't have indexing service running(it set as manual and not started). I also created an .aspx file to do testing The .aspx file opens fine in other directory from IE. As long as I put it in the application's directory, set a virtual directory trying to open it, it also gives me the following error. I don't...
8
1847
by: Alphonse Giambrone | last post by:
I have a small asp.net web app running on a shared host. It uses a Jet (Access) database. I included a routine to compact the database when the application_event fires if it has not been compacted for a certain period of time. A compact must be done into a new file. In other words mydb.mdb compacts into mydb2.mdb. The original file (mydb.mdb) then gets deleted and mydb2.mdb is renamed to mydb.mdb. This routine works fine on another shared...
0
2183
by: WATYF | last post by:
This is my problem... I have some code that starts a Process and returns it to a variable... (prcBat) At any time while that process is running... I want to be able to Kill it by pressing a command button in the application. So the code goes something like this: psiBat = New ProcessStartInfo(arrRun.Item(0)(1)) psiBat.WindowStyle = ProcessWindowStyle.Hidden
5
6577
by: mabond | last post by:
Hi recently read a posting and reply about Excel processs still running after the Appliction.Quit was called. Thought I might be able to use the same (System.Runtime.InteropServices.Marshal.ReleaseComObject(exApplication)) to solve my problem but could not. Background : My app uses a WebBrowser control to display to the user the contents of an Excel spreadsheet.:
4
1830
by: Michael Malinowski | last post by:
Is there a way to read the directory that the currently running python file is located in? Cheers Mike.
8
2773
by: geert | last post by:
Hi all, I have a mac mini running maocosx 10.5 leopard I want to deploy a django project on. My backend is MySQL, and I have it running as a 64- bit app. Of course, apache2 is also running as 64-bit. MySQLdb installs with the usual warnings after applying the various patches I found here and there. These patches consist of altering _mysql.c and site.cfg.
1
8141
by: =?Utf-8?B?Q2lhcmFuIE8nJ0Rvbm5lbGw=?= | last post by:
On reflection, you could possibly make the app a self extracting zip file which extracts the EXE and a settings file and then starts the app, then when you app closes, it can repack the settings file and itself into the exe. You would probably want a tool for this bit which could be in the zip too. So the app isnt single exe when running but when not running, it is. Just an idea for you to think about. Another option would possibly be to...
0
8687
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8615
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
9034
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
8914
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
8883
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
7750
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
6534
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
5874
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
4629
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.