Windows Develop Bookmark and Share   
 index > ClickOnce and Setup & Deployment Projects > CD/DVD Autorun StartupPath problem
 

CD/DVD Autorun StartupPath problem

Hi

I currently work on a small project and I have some problems with the deployment. My program is a small web browser with additional functions written in C#. This browser should be started from an CD/DVD via autorun.inf without installing anything. The problem was to ensure that .net is installed. So I now use the ClickOnce installer to check if .net is installed. But ClickOnce does not start my application from the CD, it copies it to a temp folder and starts it from there.

The problem with this is, my program has to start a second application from the CD and I have to find out on which drive it lies. Before I used ClickOnce it was easy (Application.StartupPath), but what should I do now? Is it possible to get the drive from which my app is copied to the hard drive? Or is the only possibility to read all drives and search for the files ( :/ )?
orlor  Monday, July 20, 2009 11:47 AM

You can't access the information about the original drive. Why don't you use a setup& deployment package instead? You can still have it check for prerequisites, and I think you know where the installation came from.

RobinDotNet


Click here to visit my ClickOnce blog!
RobinDotNet  Tuesday, July 21, 2009 5:50 AM
Hi orlor,

Based on my experience, both ClickOnce and Setup project cannot meet this need perfectly. My suggestion is:
1. Make an empty project, that application do nothing. Deploy it with ClickOnce, you can select all the prerequisites.

2. Choose "Download prerequisites from the same location as my application" for that empty project. Burn it into Live CD also.

3. Still let "autorun.inf" point to the real application .EXE file.

4. Tell your customer, if you cannot run the application when insert CD, browse into the CD to click Setup.exe(actually that will check .NET Framework and install it).

5. So the next time your customer can run it smoothly after insert CD.

Do you think this suggestion is suitable?

Sincerely,
Kira Qian
Please mark the replies as answers if they help and unmark if they don't.
Kira Qian  Wednesday, July 22, 2009 3:29 AM

You can't access the information about the original drive. Why don't you use a setup& deployment package instead? You can still have it check for prerequisites, and I think you know where the installation came from.

RobinDotNet


Click here to visit my ClickOnce blog!
RobinDotNet  Tuesday, July 21, 2009 5:50 AM
The thing is I don't would install anything. This should be an like an live CD. You insert it, a program starts up und you can work with it. After removing the CD nothing is left on your disk.

Ok i can live with the ClickOnce "installation". 200KB will be copied to the disc in a temp folder (and I can be sure .net is installed). But I don't want do install a complete program package!
orlor  Tuesday, July 21, 2009 11:37 AM
Hi orlor,

Based on my experience, both ClickOnce and Setup project cannot meet this need perfectly. My suggestion is:
1. Make an empty project, that application do nothing. Deploy it with ClickOnce, you can select all the prerequisites.

2. Choose "Download prerequisites from the same location as my application" for that empty project. Burn it into Live CD also.

3. Still let "autorun.inf" point to the real application .EXE file.

4. Tell your customer, if you cannot run the application when insert CD, browse into the CD to click Setup.exe(actually that will check .NET Framework and install it).

5. So the next time your customer can run it smoothly after insert CD.

Do you think this suggestion is suitable?

Sincerely,
Kira Qian
Please mark the replies as answers if they help and unmark if they don't.
Kira Qian  Wednesday, July 22, 2009 3:29 AM

You can use google to search for other answers

Custom Search

More Threads

• Directly use ServiceInstaller.Install( IDictionary stateSaver )?
• setup wizard for the windows application?
• Include .NET framework with Application Setup
• Several quetsions about ClickOnce
• Performance and no-touch deployment
• Update files for a Clickonce install
• Launch Location of ClickOnce App Using UNC
• Catch 22 - Cannot locate resource <name>.xaml - Publish kills release
• display msi path
• Error downloading .application file