By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,096 Members | 1,264 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,096 IT Pros & Developers. It's quick & easy.

Relative paths

P: 3
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
Share this Question
Share on Google+
3 Replies


100+
P: 149
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

P: 3
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

P: 3
A self reply, problem solved with:
System.Diagnostics.Process.Start(Environment.Curre ntDirectory & "\Folder1\MyApp.exe")
Apr 6 '07 #4

Post your reply

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