473,802 Members | 2,468 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

No application is associated with the specified file for this operation.

7 New Member
Hi,
the following code is working fine when i am running the application.exe file.
System.Diagnost ics.Process.Sta rt(filename);
But when i am opening it by using "Run As" option & giving user name & pwd it is throwing exception
No application is associated with the specified file for this operation.
plz help me out
Nov 7 '08 #1
5 13631
r035198x
13,262 MVP
Which following code?
Nov 7 '08 #2
sandhya20
7 New Member
try {
string fileName = Path.Combine(Pa th.GetTempPath( ), attachmentsList .SelectedItems[index].Tag.ToString() );

System.Diagnost ics.Process.Sta rt(fileName );
}
catch (Win32Exception ex) {
Logger.Write(ex .ToString() );
}
eg: i am giving file name as :
"C:\Documen ts and Settings\Cally Louis\Local Settings\Temp\t mp9414.gif"
in both cases

there is list view in my application which contains list of Icons on double clicking on those icons(bmp/jpg) that file is getting opened directly.
when i run my application using run as option that same file , it is throwing exception

11/6/2008 6:26:25 PM : 84 ms :System.Compone ntModel.Win32Ex ception: The specified executable is not a valid Win32 application.
at System.Diagnost ics.Process.Sta rtWithCreatePro cess(ProcessSta rtInfo startInfo)
at System.Diagnost ics.Process.Sta rt()
at System.Diagnost ics.Process.Sta rt(ProcessStart Info startInfo)
Nov 7 '08 #3
r035198x
13,262 MVP
The command that you pass to System.Diagnost ics.Process.Sta rt must be a valid command which you can run on the command prompt successfully.
Nov 7 '08 #4
sandhya20
7 New Member
thanq,
but the file name which i am specifying is working fine when i run directly .exe file
but when i am right clicking on that .exe file i have run - as option then double clicking on that icon same file is not getting displayed it is throwing the above mentioned exception
Nov 7 '08 #5
Plater
7,872 Recognized Expert Expert
Running non-binary files (like .GIF) relies on the shell configuration in the registry. Is it possible for the user you are providing, there is no default handler for those file types?
Nov 7 '08 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

2
2917
by: Jason Charalambides | last post by:
Hello, My question is: How do I get my application to start by double clicking on a file. I have made my application to save files with a specific extension. I associated those files to my application through the standard routine of windows (double clicking, a pop up menu asks me what application I want to start this file with etc.). However, if I click on a file, it does start the application but I do not see the contents of the file. ...
2
312
by: Phil Galey | last post by:
I created a VB.NET application, together with an associated installation project, and in the installation project I specified the ProductName. But when I run the application, if I try to retrieve the ProductName using Application.ProductName, it always returns an empty string. I've looked under Solution Properties, but haven't found anything. How do I get Application.ProductName to return the application product name? Thanks.
5
32750
by: GrantS | last post by:
Hi I am trying to use ShellExecute to launch an application to display a certain file. The variation on the theme is that I need to be able to specify the application to launch and not simply pass the file name (which will then result in the application associated with the file extension to launch). I want to prevent the application registered in the system as being associated with the file extension from opeing the file.
3
1543
by: VooDoo | last post by:
hi, is there a way to ensure an application will run a single instance (for example, like word that opens each document in a different word programm) via mfc features or do i have to code it myself. i did that once by having my application reserve a socket, but this is very not elegant. i dont want to use system registry or temp files since an abnormal termination may leave trash files that may not allow the program to run in following calls
1
1574
by: Vagabond Software | last post by:
I'm writing an application where then end-user will want to view and print (not edit) TIFF and JPEG images. For now, I simply use the System.Diagnostics.Process.Start method to open the desired image with the application currently associated with that file type. However, sometimes the wrong application is associated with a file type. For example, Microsoft Office Picture Manager will only display the first page of a multi-page TIFF...
0
1272
by: John Jenkins | last post by:
Hi, can anyone shed some light on an issue I have encountered. I have used a tool (Cape Clear) to generate a WSDL file for me. When I use the WSDL2Java tool provided by apache axis it creates proxies without any issues. When I use WSDL.exe I get the following: E:\XML\Schemas\Cape Clear>wsdl /server myEmployeeService.wsdl Microsoft (R) Web Services Description Language Utility Copyright (C) Microsoft Corporation 1998-2002. All rights...
0
1838
by: Uma | last post by:
Dear all, I have a problem while running a smart client application which was installed through CD-ROM. After installing the smart client setup the application is running properly. When running the same application second time, it is not working. First time the setup willbe installed through CD-ROM. If any version increase then the new version will be updated from an URL given in Updates dialog box while taking setup. I took setup...
0
1759
by: Bishoy George | last post by:
Hi, I have a asp.net 2.0 web application. I want to implement the asynchronous model through http handler in web.config ------------------------------------------------------------------------------------------------------------------------- My web.config file: ---------------------
40
29354
by: =?Utf-8?B?Um9iZXJ0IEUuIEZsYWhlcnR5?= | last post by:
What is the C# command to wait for a specified period of time? I am writing a windows service that will process a file once it has beed created or changed. I'm using the fileSystemWatcher to detect when a specific file has been created or changed. That works fine to a point. The event does fire when the file is being created or changed but I then blow up when I attempt to open the file because the creation or changing has not...
0
9699
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
9562
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,...
1
10282
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
10061
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
9111
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
7598
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
6838
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
5622
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3792
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.