InstallShield 电池电量警告
如果用户在电池电量低于 5% 时尝试安装我的应用程序,是否有任何方法可以显示警告消息?我正在使用InstallShield。
Is there any way to display an warning message if the user tries to install my app when the battery level is under 5%? I'm using InstallShield.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
不知道 Installshield 是否直接支持此功能,但您可以创建一个自动运行菜单程序,该程序首先运行,检查电池电量,然后如果正常,则运行安装程序?
Don't know if Installshield supports this directly, but you could create a autorun menu program that gets run first, that checks battery level, then if its ok, runs setup ?
这个问题。至少 GetSystemPowerStatusEx 函数可能对您有帮助。
There are several .NET-related answers in this SO question. At least the GetSystemPowerStatusEx function could be helpful for you.
您使用的是什么版本、InstallShield 版本和项目类型?答案取决于情况,但一般来说InstallShield可以调用Win32、COM和托管API,因此只需一点点编码就可以实现。
我想知道你是否真的想检查 5%。我见过的大多数安装都只是在控制安装时检查您是否处于线路电源而不是电池状态。 5% 已经相当低了,现在可能会给你更多的时间来做你需要做的事情。
What version, edition of InstallShield and project type are you using? The answer depends, but generally InstallShield can call Win32, COM and Managed API's so it is very doable with a little bit of coding.
I'd wonder if you really want to check at 5% though. Most installs I've seen simply check that you are on line power instead of battery when gating the install. 5% is already pretty low and might now give you much time to do whatever you need.