如何默认选择不同的驱动器以使用C#将应用程序安装到C派生 [英] How Can I Default Select Different Drive For Install Application To C Derive Using C#

查看:80
本文介绍了如何默认选择不同的驱动器以使用C#将应用程序安装到C派生的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我似乎有一些解决方案,但我没有得到任何正确的解决方案。



好​​问题:



i成功编写了一个带有sql数据库的小应用程序,并使用sheidinstall安装应用程序。



这里当我点击安装程序进行安装时,它会将C://程序文件夹作为默认路径







i想要,它在客户端系统上选择不同的Drive,因为应用程序没有读取C:// program Folder中写入数据库的权限



请帮帮我

i Seem some solution for it but i don't get any right solution.

OK question :

i write a small application with sql database successfully and using "sheidinstall" to install application.

here when i click on setup to install, it get "C://Program Folder" as default path

and

i want, it select different Drive on client system because application don't have permission to read write database in "C://program Folder"

please help me

推荐答案

停在那儿!

Don'尝试更改安装文件夹:这是完全错误的方法!



相反,让用户将其安装在他想要的地方 - 并且 在程序文件或程序文件(x86)下, 对该文件夹没有写入权限。这是防范病毒的一部分! :笑:



并更改您的软件,为您的数据库和其他数据使用云纹敏感位置:一个可以具有读/写访问权限,因为它不包含exacutable文件。



看看这个:我应该在哪里存储我的数据? [ ^ ] - 这很容易做,从长远来看更安全!
Stop right there!
Don't try to change the installation folder: that is thoroughly the wrong approach!

Instead, let the user install it where he wants - and that should be under "Program Files" or "Program FIles (x86)" and it should not have write permissions to that folder. That's part of the protection against viruses! :laugh:

And change your software to use a moire sensible location for your database and other data: one that can have read / write access because it doesn't contain exacutable files.

Have a look at this: Where should I store my data?[^] - it's pretty easy to do, and a lot safer in the long run!


这篇关于如何默认选择不同的驱动器以使用C#将应用程序安装到C派生的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆