如何使使用InstallShield创建的exe在Windows上为所有用户(管理员和非管理员)运行? [英] How to make an exe created using InstallShield run for all users(admin and non-admin) on windows ?

查看:278
本文介绍了如何使使用InstallShield创建的exe在Windows上为所有用户(管理员和非管理员)运行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我已经使用InstallShield软件创建了一个可执行文件(test.exe).但是,当我为非管理员用户运行相同命令时,它将失败.如何使它为所有用户安装?我对InstallShield非常陌生.

在此先感谢...

Hi,

I have created an executable(test.exe) using InstallShield s/w. But when I run the same for non-admin user it fails. how to make it install for the all the users?? I am very new to InstallShield.

Thanks in advance...

推荐答案

这与您的安装并没有真正的关系.问题是:您的应用程序本身需要提升的特权.您要么做错了事,要么由于执行应用程序而导致的系统更改确实需要管理权限.

这种出错"可能很简单,例如访问某些目录,该目录对于Windows 7中非特权用户来说是非法的,例如根目录(如"C:\")或Windows目录.甚至您甚至都可以使用一些硬编码的路径名,永远不要这样做.

也就是说,您需要检查您的应用程序.只需在调试器下运行它,然后查看在何处引发了异常.您还可以在每个线程的堆栈框架顶部捕获所有异常,并转储完整的异常信息,以查看OS不允许执行哪些操作.之后,决定是要更改它还是确定您是否确实有合理的理由使用提升的特权.

如果您确实需要它,则可以在Windows 7下进行以下选择: http://www.sevenforums.com/tutorials/11841-run-administrator.html [ ^ ].

请理解,如果这样做,将无法避免每次都输入管理员密码.

—SA
This is not really related to your installation. The problem is: your application itself needs elevated privileges. You either do something wrong, or the changes to the system incurred from the execution of your application really required administration privileges.

This "something wrong" could be as simple as accessing some directory which is not legal for access by a non-privileged user in Windows 7, such as root directory (like "C:\") or Windows directory. Maybe you even use some hard-coded path names, which should never be done.

That said, you need to examine your application. Simply run it under the Debugger and look where the exception is thrown. You can also catch all exceptions on top of the stack frame of each thread and dump full exception information to see which operations are not allowed by OS. After that, decide is you want to change it or if you really have a legitimate reason to work with elevated privileges.

If you really need it, here are your options assuming Windows 7: http://www.sevenforums.com/tutorials/11841-run-administrator.html[^].

Please understand that if you do it, you cannot avoid typing administrator password every time.

—SA


这篇关于如何使使用InstallShield创建的exe在Windows上为所有用户(管理员和非管理员)运行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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