开发者

Any way to run a .exe without complaints from Windows? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 11 years ago.

I need to write a very basic program in C to do s开发者_StackOverflow中文版ome calculations for a colleague at work (not at all an entirely IT literate workplace) and from my experience, running any .exe in windows (7) makes it have an absolute fit, sometimes preventing it from running the program at all. Is there any way I can make the program just run without a fuss for my colleague?

EDIT: By 'have an absolute fit' I mean windows will either stop the user from running the .exe entirely, or ask for user permission x amount of times etc. It would probably be solved by turning UAC off, but trying to explain something even as simple as that down the phone probably isn't an option.


Two suggestions: a) Use static linking, try to include all exec you need to your application. Provide all dependencies that you can not link statically with your app. To check dependencies, use DependencyWalker for example.

b) Run as administrator your program on win7.


If your problem in UAC then simply arrange that your app doesn't do anything that requires administrator rights. In particular:

  • Don't write to the HKLM part of the registry.
  • Don't save files in restricted folders system32, Program Files etc.

Whatever you do don't ask users to turn off UAC and don't ask them to run as administrator.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜