PC Review


Reply
Thread Tools Rate Thread

C# 3.5 Setup Project

 
 
Will
Guest
Posts: n/a
 
      15th Nov 2007
All,

I am currently creating a Visual Studio 2008 Setup Project using C#. I
am successfully running some custom actions and need to add another
based on the current directory the application is running in. So far I
have tried:

Directory.GetCurrentDirectory()
Environment.CurrentDirectory

Nothing in the Environment.GetEnvironmentVariables Dictionary helps me
either.

No matter how I try to get the current directory, it always ends up
being c:\windows\system32. This is the case no matter where I run this
application from.

If I run the application from c:\TEMP I expect the current directory to
be c:\TEMP.

Can anyone shed some light on this issue?

Thanks.

*** Sent via Developersdex http://www.developersdex.com ***
 
Reply With Quote
 
 
 
 
=?Utf-8?B?RmFtaWx5IFRyZWUgTWlrZQ==?=
Guest
Posts: n/a
 
      15th Nov 2007
I think you should be looking at the [SOURCEDIR] setup variable.

"Will" wrote:

> All,
>
> I am currently creating a Visual Studio 2008 Setup Project using C#. I
> am successfully running some custom actions and need to add another
> based on the current directory the application is running in. So far I
> have tried:
>
> Directory.GetCurrentDirectory()
> Environment.CurrentDirectory
>
> Nothing in the Environment.GetEnvironmentVariables Dictionary helps me
> either.
>
> No matter how I try to get the current directory, it always ends up
> being c:\windows\system32. This is the case no matter where I run this
> application from.
>
> If I run the application from c:\TEMP I expect the current directory to
> be c:\TEMP.
>
> Can anyone shed some light on this issue?
>
> Thanks.
>
> *** Sent via Developersdex http://www.developersdex.com ***
>

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Setup and Deployment project does not compile project with localization Greg Microsoft Dot NET 0 7th Sep 2007 03:52 PM
Moving project from VS2003 - VS2005 Crystal reports and setup project Claire Microsoft C# .NET 4 30th Aug 2007 07:36 PM
How to establish a setup project including windows service project(s)? Daniel Xiao Microsoft C# .NET 3 24th Sep 2004 04:01 AM
How to establish a setup project including windows service project =?Utf-8?B?bW9vbnJpdmVy?= Microsoft C# .NET 1 23rd Sep 2004 12:53 PM
Weird error message from setup project generated setup.exe Jack Microsoft Dot NET 0 21st Jun 2004 08:59 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:48 PM.