Click here to Skip to main content
15,898,035 members
Home / Discussions / C#
   

C#

 
QuestionGet path to location user started setup.exe from [modified] Pin
Dave Buhl7-Jun-08 21:08
Dave Buhl7-Jun-08 21:08 
Hi folks,

Hope I am not posting a dead horse here. My search-fu is weak with this topic. Very little relevant info from google or cp searches.

Here is the scenario.

I am building 2 projects. One is an admin module for a database that will install sql server and configure a connection string and dump it into and encrypted file. The admin will then copy this file to the location of the setup files for the user module. When the users/admin installs the user module, I would like to read the connection string from the file located in the setup location, which could be local or on a network share or anywhere else accessible. Sigh | :sigh:

How can I get the location of the setup.exe file that the user started at runtime. I am using VS2005 Pro, C#, .Net 2.0. I am not using clickonce, I have created a setup project and installer class with onafterinstall event handler.
Forgot to mention this is a Windows Vista/XP desktop application not a web app. D'Oh! | :doh:

I have looked at the Context[parameter] object, System.Reflection namespace, System.Environment, Application Object and am not getting it.Confused | :confused:

I would really appreciate any help you can give. I will probably feel really stupid when the answer hits. Big Grin | :-D


Thanks much

Dave

modified on Sunday, June 8, 2008 3:16 AM

AnswerRe: Get path to location user started setup.exe from Pin
mav.northwind7-Jun-08 23:30
mav.northwind7-Jun-08 23:30 
GeneralRe: Get path to location user started setup.exe from Pin
Dave Buhl8-Jun-08 8:09
Dave Buhl8-Jun-08 8:09 
GeneralRe: Get path to location user started setup.exe from Pin
mav.northwind8-Jun-08 19:01
mav.northwind8-Jun-08 19:01 
QuestionImmediate Help Pin
Saiyed Alam7-Jun-08 19:49
Saiyed Alam7-Jun-08 19:49 
AnswerRe: Immediate Help Pin
DaveyM697-Jun-08 20:41
professionalDaveyM697-Jun-08 20:41 
GeneralRe: Immediate Help Pin
Saiyed Alam7-Jun-08 21:13
Saiyed Alam7-Jun-08 21:13 
GeneralRe: Immediate Help Pin
DaveyM697-Jun-08 23:19
professionalDaveyM697-Jun-08 23:19 
GeneralRe: Immediate Help Pin
Saiyed Alam8-Jun-08 0:59
Saiyed Alam8-Jun-08 0:59 
GeneralRe: Immediate Help Pin
Colin Angus Mackay7-Jun-08 23:35
Colin Angus Mackay7-Jun-08 23:35 
AnswerRe: Immediate Help Pin
mav.northwind7-Jun-08 21:00
mav.northwind7-Jun-08 21:00 
GeneralRe: Immediate Help Pin
Saiyed Alam7-Jun-08 21:14
Saiyed Alam7-Jun-08 21:14 
GeneralRe: Immediate Help Pin
Colin Angus Mackay7-Jun-08 23:38
Colin Angus Mackay7-Jun-08 23:38 
JokeRe: Immediate Help Pin
MarkB7777-Jun-08 23:39
MarkB7777-Jun-08 23:39 
GeneralRe: Immediate Help Pin
Rob Smiley8-Jun-08 3:45
Rob Smiley8-Jun-08 3:45 
AnswerRe: Immediate Help Pin
RobScripta8-Jun-08 21:35
professionalRobScripta8-Jun-08 21:35 
QuestionHow to determine the user define, List and String using Reflection Pin
sourceisnothere7-Jun-08 19:17
sourceisnothere7-Jun-08 19:17 
QuestionHow can I hide notify icons programmatically? Pin
LordCover7-Jun-08 15:05
LordCover7-Jun-08 15:05 
AnswerRe: How can I hide notify icons programmatically? Pin
Gareth H7-Jun-08 22:12
Gareth H7-Jun-08 22:12 
GeneralRe: How can I hide notify icons programmatically? Pin
LordCover9-Jun-08 0:25
LordCover9-Jun-08 0:25 
GeneralRe: How can I hide notify icons programmatically? Pin
LordCover9-Jun-08 0:34
LordCover9-Jun-08 0:34 
AnswerRe: How can I hide notify icons programmatically? Pin
Giorgi Dalakishvili7-Jun-08 23:58
mentorGiorgi Dalakishvili7-Jun-08 23:58 
GeneralRe: How can I hide notify icons programmatically? Pin
LordCover9-Jun-08 0:29
LordCover9-Jun-08 0:29 
GeneralRe: How can I hide notify icons programmatically? Pin
Giorgi Dalakishvili9-Jun-08 1:03
mentorGiorgi Dalakishvili9-Jun-08 1:03 
QuestionDriveInfo - Removing a drive entry. Pin
Jammer7-Jun-08 12:28
Jammer7-Jun-08 12:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.