简体   繁体   English

是否可以在VISTA中静默运行NSIS安装程序?

[英]Is it possible to silently run an NSIS installer in VISTA?

I made an updater which silently runs in XP and works just fine. 我制作了一个更新程序,该更新程序可以在XP中静默运行,并且工作正常。 But when it comes to Vista, the idea of silent installation gets ruined when UAC prompts the user to cancel or allow the user from running the program. 但是对于Vista,当UAC提示用户取消或允许用户运行该程序时,无提示安装的想法就破灭了。

Is there anything at all we can do about this? 我们对此无能为力吗?

Thanks... 谢谢...

I know this post is old... 4 months to be exact. 我知道这篇文章很旧...确切地说是4个月。 But Actually, yes it is VERY VERY possible. 但是,实际上,这是非常可能的。 I wish to correct the people above. 我想纠正上面的人。

Just add this line to your NSIS script. 只需将此行添加到您的NSIS脚本中即可。

RequestExecutionLevel user RequestExecutionLevel用户

This line tells Windows Vista and Windows 7 that this program does not require administrative access, which Vista/7 thinks. 此行告诉Windows Vista和Windows 7该程序不需要管理访问权限,Vista / 7认为。

Unfortunately there's no way around this. 不幸的是,这没有办法。 UAC is actually intended specifically to prevent this type of thing where programs install software or make changes to the machine without the user's awarness. 实际上,UAC专门用于在程序安装软件或对计算机进行更改而不会引起用户警觉的情况下防止此类事件。

This is effectively a side effect of UAC and user permissions. 这实际上是UAC和用户权限的副作用。 From a security perspective, it does make sense. 从安全角度来看,这确实是有道理的。

If this is something you need to do, you should look to implement a system that is designed to run patching and deployments with elevated permissions. 如果这是您需要做的事情,则应考虑实施一个旨在以提升的权限运行修补程序和部署的系统。 Microsoft's own Systems Management Server would do the trick, but is obviously quite a large scale solution! 微软自己的系统管理服务器可以解决这个问题,但是显然是一个大规模的解决方案!

You can read about it here . 你可以在这里阅读。

UAC for non-MSI installs is a bit of a grey area, with signed MSI packages things get much easier and less confusing for the user. 用于非MSI安装的UAC只是一个灰色区域,带有签名的MSI软件包使事情变得更加容易,并且对用户而言也不会造成混乱。

You might want to take a look at Clickonce Deployment which may solve some of your problems. 您可能需要看一下Clickonce部署 ,它可以解决一些问题。

Actually, it is possible, under very preconceived circumstances. 实际上,在非常先入为主的情况下,这是可能的。 Specifically, "service" can launch an installer, in a user session, with full privileges and bypass UAC prompting (already has it). 具体来说,“服务”可以在用户会话中以完全特权启动安装程序,并绕过UAC提示(已经拥有)。

Of course this requires your user to have already installed your service, which DOES require Admin approval. 当然,这需要您的用户已经安装了您的服务,这确实需要管理员的批准。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM