在计算机启动时启动可执行 .jar,这样当 Windows 登录时用户就不会看到 Windows 桌面

在计算机启动时启动可执行 .jar,这样当 Windows 登录时用户就不会看到 Windows 桌面

我是论坛这个部分的新手,所以希望这不是题外话。

我希望在向用户显示 Windows 登录屏幕之前运行一个可执行 .jar 文件,以便当 Windows 登录显示桌面时,用户首先看到我的 .jar 显示的全屏视图,而不会看到 Windows 登录屏幕/Windows 主屏幕。

首先,(我已将 Windows 配置为在启动/重新启动时自动登录到非管理员用户配置文件。我想仅向非管理员用户显示我的 .jar UI 而不是 Windows 桌面)。

为了实现自动登录我做了以下事情:

I did Run> "control userpasswords2" 
checked "Users must enter a user name and password to use the computer"
added Non Admin user as a standard user with no password (no Administrator privileges)
I made sure the Non Admin user was selected and unchecked "Users must enter     
a user name and password to use the computer" then hit Apply. This caused the     
"Automatically Log On" window to pop up and I made sure the Non Admin user with 
no password was the selected user.

我的 .jar 配置为打开时位于最顶部的窗口(除非使用管理键盘,否则无法关闭),因此,当我的 .jar 打开并运行时,这实际上会导致桌面不可点击(这正是我想要实现的)。用户永远都不能点击 Windows 桌面,即使在重新启动时也只能点击我的 .jar 的用户界面。

您建议如何实现这一目标?

我努力了:

Run gpedit.msc (Win+R -> gpedit.msc)
Go to "Computer Configuration" -> Windows Setting -> Scripts (Startup/shutdown)->
Go to Startup properties -> Show Files -> Placed my .bat and .jar inside
C:\Windows\System32\GroupPolicy\Machine\Scripts\Startup then closed that directory and 
in Startup Properties Add-> Script Name -> mybatFile.bat

.bat 文件与我的 .jar 位于同一目录中C:\NonAdmin,包含以下内容:

java -jar %~dp0myjarfile.jar %*

注意:双击我的 .bat 确实可以成功启动我的 .jar

但是我无法让我的 .jar 在启动时启动,以便在登录时桌面隐藏在它后面。

所以我尝试了:

Log into Non Admin User > Put my .jar in C:\NonAdminProgram folder > Right Click > 
Create Shortcut > Press Windows + R keys > shell:startup > Explorer window showing > 
C:\Users\NonAdmin\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup > 
Drag Shortcut of .jar to this directory

但是这会在显示登录屏幕后启动 .jar,因此用户会在我的 .jar 接管并在顶部显示其 UI 之前短暂地看到登录屏幕。(不完全是我想要的但接近...

我想确保用户在重新启动或计算机启动/引导时永远不会看到桌面 - 他们看到的第一件事应该是我的 .jar 的 UI - 每次都是如此。

有什么想法吗?

相关内容