PC Review


Reply
Thread Tools Rate Thread

deploying to a folder other than program files

 
 
queanbeyan@hotmail.com
Guest
Posts: n/a
 
      21st Dec 2006
Hi

I have found that many of my potential users of my application are not
able to write to their program files directory on C:\program files,
however they have access to 'My documents'.

i have mapped some code to 'c:\documents and
settings\%username%\documents' but I dont know how to map the default
deployment application folder to that directory. The current default
is [ProgramFilesFolder]\[product] which maps to 'c:\program files\hilda
helpa'- what is the equivilent for 'c:\documents and
settings\%username%\documents' in the default application folder?

If this is not the best way to do it, please explain an alternative
that is relatively simple.

Thanks

Doug

 
Reply With Quote
 
 
 
 
Mugunth
Guest
Posts: n/a
 
      21st Dec 2006
Doug,
It's usually bad design to deploy an application to a folder other than
program files.
>From your question, I understand that, you want to create some files on

the same
directory as your application, but you fear that it would be
problematic to limited users.

With windows 2000 (i guess) and above, applications should not write or
create any folder within program files (except setup programs). All
application related settings/data should be stored in
c:\documents and settings\<username>\Application Data\<Company
Name>\<Product Name>
All temporary files should be created at location,
c:\documents and settings\<username>\Local Settings\Application Data\
(the text within quotes are variables.)

where C is your system drive.

System.IO.Path.GetTempPath(), a static function will give you the
current users temporary directory.
Similarly, there are functions that will get you the my documents
folder, (which I don't remember now).

Hope that helps.

(E-Mail Removed) wrote:
> Hi
>
> I have found that many of my potential users of my application are not
> able to write to their program files directory on C:\program files,
> however they have access to 'My documents'.
>
> i have mapped some code to 'c:\documents and
> settings\%username%\documents' but I dont know how to map the default
> deployment application folder to that directory. The current default
> is [ProgramFilesFolder]\[product] which maps to 'c:\program files\hilda
> helpa'- what is the equivilent for 'c:\documents and
> settings\%username%\documents' in the default application folder?
>
> If this is not the best way to do it, please explain an alternative
> that is relatively simple.
>
> Thanks
>
> Doug


 
Reply With Quote
 
Ignacio Machin \( .NET/ C# MVP \)
Guest
Posts: n/a
 
      21st Dec 2006
Hi,

You should keep the code in Program Files, you should then store ALL
personalizable data under one of the folder from Environment.SpecialFolders
like ApplicationData for example.


--
Ignacio Machin
machin AT laceupsolutions com

<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi
>
> I have found that many of my potential users of my application are not
> able to write to their program files directory on C:\program files,
> however they have access to 'My documents'.
>
> i have mapped some code to 'c:\documents and
> settings\%username%\documents' but I dont know how to map the default
> deployment application folder to that directory. The current default
> is [ProgramFilesFolder]\[product] which maps to 'c:\program files\hilda
> helpa'- what is the equivilent for 'c:\documents and
> settings\%username%\documents' in the default application folder?
>
> If this is not the best way to do it, please explain an alternative
> that is relatively simple.
>
> Thanks
>
> Doug
>



 
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
Program Files folder switched to Pictures Folder type... ontherebound Windows Vista File Management 2 16th Apr 2008 08:07 PM
Problem deleting vista RC windows folder and program files folder =?Utf-8?B?Um9iIEhvbG1lcw==?= Windows Vista Administration 0 8th Aug 2007 08:42 PM
deleting vista RC windows folder and program files folder Rob Holmes Windows Vista File Management 0 6th Aug 2007 04:52 PM
Spyware .exe program won't save or run into Program Files folder =?Utf-8?B?TGl0dGxlIExpbA==?= Windows Vista General Discussion 3 20th Mar 2007 11:14 PM
Program Files folder thinks its a Music style folder, HELP! =?Utf-8?B?Y2hvcHNuc2F1Y2U=?= Windows XP Help 0 6th Jan 2004 07:46 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:25 AM.