process.start

Starting Firefox using Process.Start: Firefox not starting when you set Usename and Password

Hi there. When I try to start Firefox using Process.Start and ProcessStartInfo (.NET) everything seems to work fine. But when I specify a username and password of another account (a member of Users), nothing seems to happen. The same code works fine with Calc.exe or IE. This is weird. Any ideas? Here is the code: System.Diagnostics.Pr...

How to bring up the "Windows cannot open this file" dialog?

My users can attach documents to various entities in the application. Of course, if user A attaches a .TIFF file, user B may not have a viewer for that type of file. So I'd like to be able to bring up this dialog: My application is C# with VS2005. Currently I do Process.Start and pass in the file name. If no association is found,...

How to detect an unmanaged app has aborted

I have a C# app which invokes an unmanaged C++ application via Process.Start() On some machines, if this C++ app aborts, I'm left with the Just-In-Time error dialog showing Is there a way from C# to detect that the C++ app has errored and just restart it (I don't have the source to and therefore can't modify the C++ app) ...

C# Process.Start() Dialog Box for BAT file

I have a C# program that needs to spawn a .BAT command file during its execution. No problem. I can just use (for example)... System.Diagnostics.Process.Start("PublishFeed.bat", "file.xml"); ...in order to run the cmd with a parameter. In the debugger, this works fine. However, when I run the executable in production, Windows pops up ...

System.Diagnostics.Process.Start("http://google.com") crashes IE

Okay I'm having a brain fart here. This should be simple, but I'm missing something. I've got a win form and I'm trying to launch a web page when I click a button. The code for the button is here: private void button2_Click(object sender, EventArgs e) { try { System.Diagnostics.Process.Start("http://www...

Start Process - then add to it later (MS Excel Example)

I've got a data collection routine that takes about 10 seconds to run, then it saves data to a CSV file: string file = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "Book1.csv"); StreamWriter streamWriter1 = new StreamWriter(File.Open(file, FileMode.Create, FileAccess.Write)); DataTable table = GetMyData...

Replacing Process.Start with AppDomains

Background I have a Windows service that uses various third-party DLLs to perform work on PDF files. These operations can use quite a bit of system resources, and occasionally seem to suffer from memory leaks when errors occur. The DLLs are managed wrappers around other unmanaged DLLs. Current Solution I'm already mitigating this is...

Starting a process with Windows start-up (can not find supporing files)

I programmed (C# .Net 3.5) a process to start when windows (XP) starts. This process uses other files in the same folder as itself. Moreover, it starts another process, again located in the same folder. However, it seems like the process cannot find the files in the same folder (they are there). Instead, it looks in "C:\Documents a...

Process.Start fails when attempting to redirect the output

I've been working on automating our build processes and wanted to come up with a painless way to run unit tests on a regular basis. To that end I've thrown together a simple app that examines the project files and prepares a list of solutions to test. The prototype works in that the tests are executed with the expected results, but as ...

Specify DLLs for an exe launched with Process.Start?

I'm trying to launch an executable with Process.Start(). When the exe has no DLL dependencies, it works fine. However, when I need to include 2 DLLs, it doesn't work. I've tried setting the WorkingDirectory, and have verified that the 2 required DLLs are present there. Any ideas? ProcessStartInfo startInfo = new ProcessStartInfo(); ...

Launching Web Browser from Windows Service

Is it possible to launch a web browser from a windows service? I have created a basic service in C# and installed it under the "LocalSystem" security profile. The code for the service looks as follows: namespace Bootloader { public partial class Service1 : ServiceBase { public Service1() { Initializ...

StartProcess using value from Properties.Settings causes Unusual Results

Hello All, I am seeing odd behavior when trying to launch an application using an application name stored in Properties.Settings. If I don't re-set the value (to the same value) before using it, the launched application will fail to get the correct location for its application settings. Perhaps showing the code will clear up what I'm ...

Windows Explorer argument not being interpreted?

I'm currently using: Process.Start("explorer.exe", "/Select, " + fullPath); //with file name.extension That basically tells windows explorer to open the folder where the file is in, with the given file selected. But, by the forces of evil, sometimes it works and sometimes it just opens the file ("/select" is... ignored) Has anyone e...

Execute C++ exe from C# form using Process.start()

Hi, I'm trying to create a C# form app that will allow me to use all of my previous C++ programs from one central program. I'm able to open the exes with Process.start, however it does not compile the code correctly. Example code: Process.Start("C:\\Documents and Settings\\dan\\Desktop\\test.exe"); This will bring up the console and ...

Setting ProcessStartInfo.WorkingDirectory to an UNC Path

I have a utility that I have written in VB.net that runs as a scheduled tasks. It internally calls another executable and it has to access a mapped drive. Apparently windows has issues with scheduled tasks accessing mapped drives when the user is not logged on, even when the authentication credentials are supplied to the task itself. O...

No application is associated with the specified file exception

UnhandledException: System.ComponentModel.Win32Exception: No application is associated with the specified file for this operation at System.Diagnostics.Process.StartWithShellExecuteEx(ProcessStartInfo startInfo) at System.Diagnostics.Process.Start() at System.Diagnostics.Process.Start(ProcessStartInfo startInfo) at System.Dia...

How to start application from C# application?

hi all, how can i start any application from C# i mean for example, if i have an openfiledialog and the user opened it and selected any file and opened it, i need this file to opened in its application whatever its extension and its default start application. i have googled and found that Process.Start takes the file name and its appli...

.NET 4: Process.Start using credentials returns empty output

I run an external program from ASP.NET: var process = new Process(); var startInfo = process.StartInfo; startInfo.FileName = filePath; startInfo.Arguments = arguments; startInfo.UseShellExecute = false; startInfo.RedirectStandardOutput = true; //startInfo.RedirectStandardError = true; process.Start(); process.WaitForExit(); Console...

Mimic Windows' 'Run' window in .NET

I would like to mimic the Run command in Windows in my program. In other words, I would like to give the user the ability to "run" an arbitrary piece of text exactly as would happen if they typed it into the run box. While System.Diagnostics.Process.Start() gets me close, I can't seem to get certain things like environment variables suc...

running a process in c#

i want to run a process programaticaly in c#. with process.start i can do it. but how can i prommt user when the process asks for some user input in between and continue again after providing the input. ...