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

deploying to a folder other than program files

P: n/a
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

Dec 21 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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.

qu********@hotmail.com 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
Dec 21 '06 #2

P: n/a
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

<qu********@hotmail.comwrote in message
news:11*********************@n67g2000cwd.googlegro ups.com...
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

Dec 21 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.