473,509 Members | 2,946 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to use Dispatch to open an application in win32com.client

Hi'
I am trying to launch an application. When I try like that
When I try like that Excel is opening
import win32com.client
object = win32com.client.Dispatch("Excel.Application")
object.Visible = 1

But when I try my application which is QeepIt.exe
which is in the c:\ drive it is not running
Any body tell me how to give path to open an exectable application in
Dispatch modules
I try like that
object = win32com.client.Dispatch("c:\Folder\QeepIt.exe")
It give an error.

Feb 17 '07 #1
4 16952
En Fri, 16 Feb 2007 23:36:26 -0300, vithi <vi*****@hotmail.comescribió:
I am trying to launch an application. When I try like that
When I try like that Excel is opening
import win32com.client
object = win32com.client.Dispatch("Excel.Application")
object.Visible = 1

But when I try my application which is QeepIt.exe
which is in the c:\ drive it is not running
Any body tell me how to give path to open an exectable application in
Dispatch modules
I try like that
object = win32com.client.Dispatch("c:\Folder\QeepIt.exe")
It give an error.
The above code is used to launch a COM server registered under the name
"Excel.Application" and then control it. If you don't know what a COM
server is, surely your application can't be used this way.

For launching another program, perhaps sending it some text, and capturing
its output, look at the subprocess module. If you are only interested in
executing it, with no additional communication, os.system() may be enough.

--
Gabriel Genellina

Feb 17 '07 #2
En Fri, 16 Feb 2007 23:36:26 -0300, vithi <vi*****@hotmail.comescribió:
I am trying to launch an application. When I try like that
When I try like that Excel is opening
import win32com.client
object = win32com.client.Dispatch("Excel.Application")
object.Visible = 1

But when I try my application which is QeepIt.exe
which is in the c:\ drive it is not running
Any body tell me how to give path to open an exectable application in
Dispatch modules
I try like that
object = win32com.client.Dispatch("c:\Folder\QeepIt.exe")
It give an error.
The above code is used to launch a COM server registered under the name
"Excel.Application" and then control it. If you don't know what a COM
server is, surely your application can't be used this way.

For launching another program, perhaps sending it some text, and capturing
its output, look at the subprocess module. If you are only interested in
executing it, with no additional communication, os.system() may be enough.

--
Gabriel Genellina

Feb 17 '07 #3
Hi
Since I haven't see any help or tutorial on com there is a application
is installed in the server I am login to the server then what code do
I have to implement to launch the application registered in a server.
how do I write a code to tell my computer to go in to the perticular
server and launch program "XYZ "

do you think this code alone enough to go and look for xyz
application in the server, I don't get it
Give me any sample code or more help. It help me a lot.
object = win32com.client.Dispatch("xyz.Application")
On Feb 16, 11:56 pm, "Gabriel Genellina" <gagsl...@yahoo.com.ar>
wrote:
En Fri, 16 Feb 2007 23:36:26 -0300, vithi <vith...@hotmail.comescribió:
I am trying to launch an application. When I try like that
When I try like that Excel is opening
import win32com.client
object = win32com.client.Dispatch("Excel.Application")
object.Visible = 1
But when I try my application which is QeepIt.exe
which is in the c:\ drive it is not running
Any body tell me how to give path to open an exectable application in
Dispatch modules
I try like that
object = win32com.client.Dispatch("c:\Folder\QeepIt.exe")
It give an error.

The above code is used to launch a COM server registered under the name
"Excel.Application" and then control it. If you don't know what a COM
server is, surely your application can't be used this way.

For launching another program, perhaps sending it some text, and capturing
its output, look at the subprocess module. If you are only interested in
executing it, with no additional communication, os.system() may be enough.

--
Gabriel Genellina

Feb 17 '07 #4
En Sat, 17 Feb 2007 17:47:23 -0300, vithi <vi*****@hotmail.comescribió:
Hi
Since I haven't see any help or tutorial on com there is a application
is installed in the server I am login to the server then what code do
I have to implement to launch the application registered in a server.
how do I write a code to tell my computer to go in to the perticular
server and launch program "XYZ "
Try to explain a bit better what do you want to do.
What is "the server"?
Do you want to open and execute a program on "another" computer?
Or is it on the "same" computer?
do you think this code alone enough to go and look for xyz
application in the server, I don't get it
Give me any sample code or more help. It help me a lot.
object = win32com.client.Dispatch("xyz.Application")
Does the manual for "xyz" say that it is a COM application?
Did someone told you that "xyz" works that way?
Did you find "xyz" actually registered as a COM application?
If not, forget about that line, won't work at all.

--
Gabriel Genellina

Feb 17 '07 #5

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

Similar topics

1
10470
by: David Nicolson | last post by:
Hi, I have been successfully using iTunes' COM interface with Python using either of the following lines successfully: iTunes = win32com.client.gencache.EnsureDispatch("iTunes.Application")...
3
5782
by: muttu2244 | last post by:
Hi all Am trying to read an html page using win32com in the following way. from win32com.client import Dispatch ie = Dispatch("InternetExplorer.Application")
5
21835
by: kbperry | last post by:
On my machine, this runs fine, but when I try to run it on someone elses machine it blows up with an attribute error: <code> import win32com.client, pythoncom ...
3
6899
by: tyler.schlosser | last post by:
Hi there, I am trying to launch a program called AmiBroker using the command: AB = win32com.client.Dispatch("Broker.Application") However, I have a dual-core CPU and would like to launch two...
4
6816
by: mirandacascade | last post by:
O/S : Win2K vsn of Python: 2.4 Hoping to find information that provide information about error messages being encountered. Pythonwin session: Traceback (most recent call last): File...
0
421
by: vithi | last post by:
Hi' I am trying to launch an application. When I try like that When I try like that Excel is opening import win32com.client object = win32com.client.Dispatch("Excel.Application") object.Visible...
2
9145
by: Ray | last post by:
Hi, I need to use cell's background color. when I record a macro from excel, it shows: Rows("7:7").Select With Selection.Interior .ColorIndex = 8 .Pattern = xlSolid
1
3008
by: SPJ | last post by:
Sorry, forgot to mention Subject in my earlier post, hence reposting. ------------ I am writing a script which need's to convert an excel file to csv (text) format. For that I am using the...
3
15212
by: Amelie Lesser | last post by:
Hello, I'm trying to use the in32com.client for writing into Excel with Dispatch() (on a windows machine using python 2.7.1). I downloaded pywin from http://sourceforge.net/projects/pywin32/ into...
0
7234
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
7344
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
7412
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...
1
7069
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...
0
7505
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
4730
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...
0
3216
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...
0
1570
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 ...
0
441
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...

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.