如何使用vb6禁用exe? [英] How can I disable exe using vb6?

查看:112
本文介绍了如何使用vb6禁用exe?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道如何使用vb6禁用.exe文件:)
在此先感谢...

I want to know how can I disable an .exe file using vb6 :)
Thanks in advance...

推荐答案

为防止用户执行程序,您可以考虑调整对可执行文件的访问权限:
如何使用Visual Basic中的高级访问控制API
[^ ]

这将有效地禁用"可执行文件以供未经授权使用:)

有关Windows授权api的更多信息,请查看:
授权 [
To prevent users from executing the program you could consider adjusting the access rights to the executable:
How to use high-level access control APIs from Visual Basic
[^]

This will effectively "disable" the executable for unauthorized use :)

For more information on the windows authorization apis'' take a look at:
Authorization[^]

Regards
Espen Harlinn


这个问题以及您可能想要的东西根本没有道理.
不要创建EXE文件!

您无需解释此可执行文件的用法.
如果您的目的是防止该文件意外运行,则一个简单的技巧是:重命名其扩展部分.仍然可以通过显式调用CreateProcessEx将文件作为应用程序运行时加载(文件名并不表示其扩展名"部分确实没有什么特别的意思),但不会被Shell意外地运行.

—SA
The question and what you possibly may want makes no sense at all.
Don''t create EXE file!

You don''t explain the use of this executable.
If your purpose is to prevent accidental run of this file, one simple trick is: rename its extension part. The file still can be loaded run as application via a call to CreateProcessEx explicitly (file name does not really mean anything special as well as its "extension" part) but it won''t be accidentally run on click by the Shell.

—SA


您可以执行以下操作:

You could do something like this:


  1. 加密原始exe
  2. 在VB6中有一个存根exe,提示输入密码
  3. 如果密码正确,请解密原始exe并运行它
  4. 如果密码错误,则显示错误并退出
  5. 您还可以使用Windows auth来运行存根可执行文件的版本,以运行可执行文件(并且可以预先确定允许的列表)用户)

  1. Encrypt the original exe
  2. Have a stub exe in VB6 that prompts for a password
  3. If the password is correct, decrypt the original exe and run it
  4. If the password is wrong, show an error and exit
  5. You can also have a version of the stub executable that uses windows auth to run the executable (and you can have a pre-decided list of allowed users)


这篇关于如何使用vb6禁用exe?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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