473,500 Members | 1,748 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Relative paths

3 New Member
Hi all,
this is my first post and I would like to say that this site has provided me with great help and that I'm shure it will continue to do so.
I'm new to the programming and I think this is a very easy issue.

I'm building an autorun app that starts when the cd is inserted and this is all OK but I need to start some external applications(and pdf files) from my application that are on the same cd only in the different folder. This is the structure:

CD root
----Folder1
----MyApp.exe

When I use the System.Diagnostics.Process.Start with absolute path it works great but I just can't get it right to work with relative path as the cd drive letter from user to user differs.
Also I have tryed
System.Diagnostics.Process.Start(application.start upPath & "\Folder1\Some.exe")
but still notthing.
Thank you in advance.
Apr 6 '07 #1
3 2177
ansumansahu
149 New Member
Hi all,
this is my first post and I would like to say that this site has provided me with great help and that I'm shure it will continue to do so.
I'm new to the programming and I think this is a very easy issue.

I'm building an autorun app that starts when the cd is inserted and this is all OK but I need to start some external applications(and pdf files) from my application that are on the same cd only in the different folder. This is the structure:

CD root
----Folder1
----MyApp.exe

When I use the System.Diagnostics.Process.Start with absolute path it works great but I just can't get it right to work with relative path as the cd drive letter from user to user differs.
Also I have tryed
System.Diagnostics.Process.Start(application.start upPath & "\Folder1\Some.exe")
but still notthing.
Thank you in advance.

Does copying the entire data from the CD onto the local drive help you run the exe.

thanks
ansuman sahu
Apr 6 '07 #2
GeeBee
3 New Member
Well, the exe works on the local drive. As I am using the relative path it should work from anywhere as long as data structure is copied as original.
Apr 6 '07 #3
GeeBee
3 New Member
A self reply, problem solved with:
System.Diagnostics.Process.Start(Environment.Curre ntDirectory & "\Folder1\MyApp.exe")
Apr 6 '07 #4

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

Similar topics

7
2768
by: Doug | last post by:
If I were to write an include with a relative path like include("../conf/config.php"); What is the use? As far as I understand it, the path is relative to the first script that is called by...
7
2820
by: mark | last post by:
I am designing a website at the moment and looking at the difference between relative and absolute url links which is driving me crazy! I would like to use relative paths, but it is proving very...
5
4094
by: jason | last post by:
Can anyone help me find a solution to quickly working out relative paths to a folder in the root of my server... Although it easy when you go - say - two levels down: .../includes it...
7
2075
by: jason | last post by:
I am getting twisted by the possibility that my virtual includes which currently work great on non-domain remote IP will crash if I purchase a domain and point it to one of my designated...
2
1844
by: Joe | last post by:
Hi, can someone tell me how to set up relativ paths in VS2003 C++ ? I have some source with a tree directory structure that segments include files in various directories: #include...
2
2351
by: Alex | last post by:
Hi. I need some help on this. I have a user control (a header) in my root directory, and all my pages use that control. Then a created a folder (in my root directory) and put a new page inside it,...
8
2590
by: JJ | last post by:
I'm confused about paths. I have a functionn that uses the mappath method, which I think requires a virtual path (is that the same as a relative path?). But this doesn't always work as the...
15
6434
by: Lars Eighner | last post by:
Aside from the deaths of a few extra electrons to spell out the whole root relative path, is there any down side? It seems to me that theoretically it shouldn't make any difference, and it would...
2
4279
by: BD | last post by:
Hi there. Using 8.2 on Windows. I have a situation where I have a db backup, which I want to deploy to a group of developer workstations. The target directory for the database files will be...
2
4291
by: Peted | last post by:
Hi i have a circumstance where a user unzips a file, with a certain layer of directories to get to a textfile. So in any directory on the HDD they may end up with something like ...
0
7136
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,...
1
6906
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
5490
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,...
0
4611
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
3110
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
3106
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1430
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 ...
1
672
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
316
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.