简体   繁体   English

无法从启动目录Windows 8.1启动Delphi XE 5应用程序

[英]Delphi XE 5 Application Not Starting up from startup Directory Windows 8.1

I am trying to get my application to start at startup. 我试图让我的应用程序在启动时启动。 So far i have tested it on windows xp and windows 7 and it works like a charm. 到目前为止,我已经在Windows XP和Windows 7上对其进行了测试,它的工作原理很吸引人。 But in windows 8.1 the shortcut is in the startup directory C:\\Users\\Administrator\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\\Startup but it does not start. 但是在Windows 8.1中,快捷方式位于启动目录C:\\Users\\Administrator\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\\Startup但无法启动。

If i check with the task manager under the start up tab the application is there and is enabled. 如果我在“启动”选项卡下与任务管理器联系,则该应用程序在那里并且已启用。 But it just doesn't start on start up. 但是它只是不会在启动时启动。

Can anybody please assist? 有人可以帮忙吗?

Update 1: 更新1:

I have found the problem. 我发现了问题。 I marked the application to run as administrator. 我将应用程序标记为以管理员身份运行。 When i removed that privileges the application started at start up. 当我删除该特权时,应用程序将在启动时启动。 Why would this interfere? 为什么这会干扰? i ran it as administrator in windows 7. and since have tested it on windows 8 and also had to set it to run as administrator, even then it worked. 我在Windows 7中以管理员身份运行了它,并且由于已经在Windows 8上对其进行了测试,因此还必须将其设置为以管理员身份运行,即使这样也可以。 Only in 8.1 did it cause the software not to start up. 仅在8.1中才导致软件无法启动。

Does anybody know why? 有人知道为什么吗?

UPDATE 2: 更新2:

OK to be clearer on the above mentioned update. 单击确定,可以更清楚地了解上述更新。 and comments. 和评论。

The program works fine. 该程序工作正常。 Nothing is wrong with it. 这没什么不对的。 When it is checked to run as administrator it does not auto start. 当选中以管理员身份运行时,它不会自动启动。 When the admin rights are removed. 删除管理员权限后。 It does auto start. 它会自动启动。

I have done a simple test to see if the software even launches and it does not so logging wont help. 我已经做了一个简单的测试,看看该软件是否能启动,但它不能启动日志记录。 I set a message to appear if the application launches so before anything is processed i get notified. 我设置了一条消息,如果应用程序启动,那么在处理任何事情之前都会收到通知。 Before there can be any errors in code it will tell me. 在代码中可能有任何错误之前,它将告诉我。

SO the problem is not the coding in the program. 因此,问题不在于程序中的编码。 The problem clearly is windows 8.1 which does not let my application auto launch on start up when it has admin rights. 问题显然是Windows 8.1,当它具有管理员权限时,它不允许我的应用程序在启动时自动启动。

It transpires that the issue is that you wish the program to run elevated which results in a UAC dialog being shown. 可以看出,问题是您希望程序运行在高位,从而导致显示UAC对话框。 Windows blocks autostart programs that requested elevation. Windows阻止请求海拔的自动启动程序。 You report a difference between Windows 7 and Windows 8 but I suspect that the real difference is your UAC settings on the two machines. 您报告了Windows 7和Windows 8之间的差异,但我怀疑真正的差异是两台计算机上的UAC设置。

This is discussed in more detail in these links: 在以下链接中对此进行了更详细的讨论:

In all cases, the recommendation is to use the task scheduler to cache admin credentials and so avoid facing the UAC dialog. 在所有情况下,建议使用任务计划程序来缓存管理员凭据,因此避免面对UAC对话框。

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

相关问题 Windows应用程序启动错误异常代码:0xe0434352 - Windows Application Startup Error Exception code: 0xe0434352 启动时启动Java应用程序 - Starting a Java application at startup 在32位Windows XP上部署64位Windows Delphi Xe7应用程序 - Deployment 64-bit windows Delphi Xe7 application over 32-bit Windows XP 打开网络目录时的高流量,包括使用 Delphi XE 和 windows 资源管理器制作的可执行文件 - High traffic when opening a network directory including executables made with Delphi XE with windows explorer 从Windows服务启动应用程序 - Starting an Application from Windows Service 从Windows服务启动Windows应用程序 - Starting a windows application from a windows service Windows启动时启动我的应用程序(所有版本的Windows)? - Starting my application when windows starts up (All versions of Windows)? 如何让Windows 8.1意识到我的Delphi应用程序想要支持Per Monitor DPI? - How can I make Windows 8.1 aware that my Delphi application wants to support Per Monitor DPI? 从带有视图和数据库的Windows 8.1 / Windows Phone 8.1应用程序创建一个dll - Create a dll from a Windows 8.1 / Windows Phone 8.1 application with views and database 添加目录Windows 8.1的路径 - Adding a Path to Directory Windows 8.1
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM