473,386 Members | 1,830 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Process.Start don't work in Windows 7

Hi!
I have made a very simple forms application in VS2010 (C#) that is used by a vast number of people in my office and our offices around the world. It's a little app that lets an engineer handle the logistics of saving and opening documents from one place so to speak.
It's been working fine for a couple of years now until we started to switch to Windows 7 on the personnel computers.
Suddenly the below section of code works only for Excel documents but not for Pdf and Word in which case the system returns a FileNotFound exception:
Code:
fdiag = new OpenFileDialog();
tmpPath = buttonNodeTmp.Attributes.GetNamedItem("path").Valu e;
fdiag.InitialDirectory = Path.Combine(fPath, tmpPath);
fdiag.Title = caption;
if (fdiag.ShowDialog() == DialogResult.OK)
{
System.Diagnostics.Process.Start(System.IO.Path.Ge tFileName(fdiag.FileName));
}
//


I would be forever grateful if somebody could give me a hint on what has changed in Windows 7 such that the above code fails for some types of processes.

Kind Regards
Per Eriksson
Feb 24 '11 #1
1 2468
I have sorted the problem out and it seems that it was SBW...;-)
Feb 24 '11 #2

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

Similar topics

15
by: songie D | last post by:
H If I us Process.Start("DTSRun ...") on a computer that has SQL server installed, it can't fin DTSRun, claiming 'file not found'. Despite this, Shell("DTSRun...") from VB.NET works fine It also...
2
by: andreas | last post by:
hi, In windows xp in the start launch menu when i put notepad "c:\test.txt" i get notepad with test.txt in it. in vb.net when i state system.diagnostics.process.start("notepad.exe" i get...
1
by: Mike Kober | last post by:
I'm having difficulty getting this to work. Any help would be appreciated. What I'm trying to do is to open Explorer onto the Windows/fonts directory and then close it. I've added a font...
6
by: uuyytt | last post by:
I have a Windows service from which I want to start Internet Explorer with a particular URL as an argument. I don't know why my code (shown below) doesn't work. I know that IExplore.exe starts as I...
1
by: uuyytt | last post by:
I have a Windows service from which I want to start Internet Explorer with a particular URL as an argument. It can work well except when I run it on windows 2003 I allowed services explicitly to...
3
by: forest demon | last post by:
for example, let's say I do something like, System.Diagnostics.Process.Start("notepad.exe","sample.txt"); if the user does a SaveAs (in notepad), how can i capture the path that the user...
4
by: =?Utf-8?B?VkIgSm9ubmll?= | last post by:
I am at my witless end here, please help! I have an ASP.Net aspx web page, hosted on Windows Server 2003, that receives a query string with the path to an autocad drawing file selected from a...
2
by: Kurt Jakobsen | last post by:
Hello, I am trying to launch a pdf file from and C# .net page. Through previous postings on this site and others, I found that using System.Diagnositcs.ProcessStart should be able to do this for me....
4
by: Steven De Smet | last post by:
Hello, This is my first post. I searched on the internet for answers but I was unable to solve my problem. So I hope that you guy's can help me with my VB.NET problem I tried to create a...
12
by: =?Utf-8?B?ZXAu?= | last post by:
What is preferred method to start an app process and then fill in form fields? The following prog does not compile (b/c AppActivate does not have the correct param):...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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
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...

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.