![](/img/trans.png)
[英]How do I switch an image in “XAML for Windows Embedded (Compact 2013)”
[英]How do I automatically launch a non-Surface application in Windows Embedded 8?
如何在Windows Embedded 8中自动启动非Surface应用程序?
我想在Windows Embedded 8中启动时自动启动GUI应用程序,但是我不知道该怎么做。 我一直在阅读Sean Liming的《 Windows Embedded 8 Standard专业指南》 ,在第8章中,他介绍了如何修改设备体验。 他列举了一个Windows 8应用程序启动器的名称,但仅适用于Surface应用程序。 他还介绍了Shell Launcher模块,但我的应用程序不是Shell。 他还提到了他在此处编写的shell,但是通读其文档并没有描述如何在该shell中自动启动程序。
据我所知,他没有描述如何在任何地方自动启动非Surface应用程序,并且Google和Stack Exchange没有给我带来任何结果(大多数结果仅以Windows 8而不是Windows 8来帮助我) Windows Embedded 8)。 还是我弄错了? Shell Launcher是否足以启动非Shell应用程序? 实际上,启动的应用是否成为“外壳”?
旁注:可能值得一提的是,我要启动的应用程序是Java应用程序。 我将包括书中提到的基于模块的Java JRE安装程序,但是如果在WE8S中启动Java应用程序还有其他规定,请发表评论。
感谢您的时间和反馈!
这适用于Windows Embedded Standard 7和Windows Embedded 8 Standard:
我通常使用标准外壳安装Windows Embedded Standard。 在WE8S中,这将是Metro UI。 一旦安装和配置完成,并且您的应用程序成功运行,我将使用注册表项来修改启动时启动的应用程序。
例如,要启动VLC媒体播放器作为外壳,并连续循环播放d:\\文件夹中的媒体文件,例如d:\\ media,我在.bat文件中以管理员身份运行以下内容。
这必须在登录到将启动自定义外壳程序的用户中运行
创建一个新的.bat文件:
将以下内容粘贴到文件中
右键单击文件->“以管理员身份运行”
c:\\Windows\\system32\\reg.exe DELETE "HKLM\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon" /v Shell /f c:\\Windows\\system32\\reg.exe ADD "HKLM\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon" /v Shell /t REG_SZ /d explorer.exe c:\\Windows\\system32\\reg.exe ADD "HKCU\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon" /v Shell /t REG_SZ /d "c:\\program files\\vlc\\vlc.exe -f --loop ""d:\\media""" c:\\Windows\\system32\\reg.exe DELETE "HKLM\\Software\\Microsoft\\Windows NT\\CurrentVersion\\IniFileMapping\\system.ini\\boot" /v Shell /f c:\\Windows\\system32\\reg.exe ADD "HKLM\\Software\\Microsoft\\Windows NT\\CurrentVersion\\IniFileMapping\\system.ini\\boot" /v Shell /t REG_SZ /d "USR:Software\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon" pause
这将修改!Current User!的外壳。 (即已登录的用户)以在登录时启动VLC.exe。 (我使用reg.exe,因为某些精简安装可能不包含regedit.exe)
这意味着,当以管理员用户身份登录时(如果通常禁用了管理员配置文件,则可以通过安全模式访问)仍然可以访问完整的用户界面,因为所有其他用户的外壳仍然是资源管理器外壳。
当具有自定义外壳程序的用户登录时,您仍然可以使用Metro UI启动资源管理器外壳程序。 要从运行VLC(自定义)外壳的用户启动浏览器外壳,请执行以下操作:
更重要的是,为了运行Java应用程序,请在上方.bat中更改以下条目
从:
c:\Windows\system32\reg.exe ADD "HKCU\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" /v Shell /t REG_SZ /d "c:\program files\vlc\vlc.exe -f --loop ""d:\media"""
至
c:\Windows\system32\reg.exe ADD "HKCU\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" /v Shell /t REG_SZ /d "java [any other JVM options you need to give it] -jar "path\jar-file-name.jar""
如果您的Java应用程序不包含清单,则以上操作将无效!
试试这个(我还没有测试过):
java -cp jar-file-name.jar full.package.name.ClassName
要撤消用户对外壳的更改,即恢复为原始设置:
!必须在使用自定义外壳程序登录用户时运行!
创建一个新的.bat文件:
将以下内容粘贴到文件中
右键单击文件->“以管理员身份运行”
c:\\Windows\\system32\\reg.exe DELETE "HKLM\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon" /v Shell /f c:\\Windows\\system32\\reg.exe ADD "HKLM\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon" /v Shell /t REG_SZ /d explorer.exe c:\\Windows\\system32\\reg.exe DELETE "HKLM\\Software\\Microsoft\\Windows NT\\CurrentVersion\\IniFileMapping\\system.ini\\boot" /v Shell /f c:\\Windows\\system32\\reg.exe ADD "HKLM\\Software\\Microsoft\\Windows NT\\CurrentVersion\\IniFileMapping\\system.ini\\boot" /v Shell /t REG_SZ /d "SYS:Microsoft\\Windows NT\\CurrentVersion\\Winlogon" c:\\Windows\\system32\\reg.exe DELETE "HKCU\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon" /v Shell /f pause
您可以将Windows配置为自动登录到特定的用户配置文件。
下次启动Windows时,将自动加载您选择的用户帐户
试一试,但尽可能使用测试环境。如果您可以启动外壳程序,那么其他人也可以。 使用键盘过滤器可以过滤出已知的按键组合,并仅由您自己创建一个,也许维修技术人员会知道。 使用自定义外壳删除用户的管理员权限使用统一写过滤器(或增强型Wright过滤器/基于文件的写过滤器)。 仅在进行更改时取消保护。
非常感谢 Sean Liming及其所做的工作-他启发了这一点。
MarkBöhmerWindows Embedded Specialist南非
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.