Click here to Skip to main content
15,885,365 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
In visual studio default location of setup deployment tool is [ProgramFilesFolder][Manufacturer]\[ProductName]. So installation go under 'C:\\Program Files'. But I want default location at under 'D:\\'. How to change it. Thanks

What I have tried:

I tried [D:][Manufacturer]\[ProductName]
Posted
Comments
Philippe Mori 13-Feb-16 22:17pm    
Never do that. Program Files is the folder where application must be installed.
Many systems does not even have a D: drive. If they do, it might be a CD-ROM drive, a restauration partition, a network drive, a thumb drive or a drive not protected by adequate security.

Over the year Microsoft have made an effort to properly organize an hard drive. You should follow the rules or stop doing software development. You have to respect other people computers. It is not to you to decide where a program is installed. You should not even be allowed to do software development if you don't respect rules.

1 solution

WHY oh WHY are you putting an application anywhere but under Program Files? This is very much HATED by system admins because it's more work for them to setup security policies and more work to make sure improperly placed data is backed up when the machine is reslammed with a fresh O/S.

You better have a really good reason to want to place program files and data in non-standard locations because you're just making more work for everyone else.
 
Share this answer
 
Comments
Member 12179895 15-Feb-16 1:03am    
Under program files my application sql mdf database become read-only and can't modify data. Please advice me if u have any idea to save database which can modify.
Dave Kreskowiak 15-Feb-16 8:40am    
You really need to study why Windows has standard locations for certain types of files.

You can put a database under one of several locations, but which is appropriate for your database depends on your requirements.

Read up on Environment.GetFolderPath Method (System)[^] and Environment.SpecialFolder Enumeration (System)[^]. All of the "Common" folders are, well, common to all users on a system. Typcially, a database in use by all users of a system is put in a folder under CommonApplicationData.
Member 12179895 16-Feb-16 21:47pm    
Ok Thanks

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900