有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

java为什么我的应用程序在windows 10而不是windows 7上放置在C:\Program文件中时需要管理员权限?

我的Java RCP应用程序(App.exe)最近从32位转换为64位。由于它是一个64位的应用程序,我使用NSIS创建了一个安装程序,它将转储所有需要的文件以及应用程序。C:\Program文件中的exe。当应用程序启动时。exe运行时,当应用程序试图在编辑模式下打开文件(在C:\Program files中)以转储结果/日志时,我收到一个安全异常(拒绝访问)。当我运行应用程序时。作为管理员,它工作正常。即使在非管理模式下运行,它也可以在Windows7 64位计算机上正常工作

任何关于如何运行应用程序的想法。exe是否处于非管理模式

Note : This is not the problem of NSIS as samething was working fine as a 32-bit application.


共 (1) 个答案

  1. # 1 楼答案

    基本上,程序文件目录始终受到保护

    您应该检查WIN 7用户权限和用户的UAC设置

    与此同时


    您可能需要重新考虑将数据存储在何处

    有一篇关于那个的帖子here

    To put it straight, ProgramData contains application data that is not user specific.This data which will be available to all users on the computer. Any global data should be put in here.

    AppData folder contains configuration settings, downloaded information/files for a particular user. So, for example any user specific preferences and profile configurations can be stored in the AppData folder. The AppData folder is further divided into three subfolders
    Roaming - This folder contains data that can move with your user profile from a computer to another.
    Local - This folder contains data that will not move with your user profile.
    LocalLow - You can put in lowlevel access information such as information related to web browser running in a protected mode in this folder.