WinXShell - a portable shell and zero dependencies for boot.wim,winre.wim

Place for posting compiled applications and code snippets
slore
Code Baker
Posts: 59
Joined: Sun 06 Jun, 2021 12:00 pm

WinXShell - a portable shell and zero dependencies for boot.wim,winre.wim

Post by slore »

What is me?
a portable shell program(desktop, startmenu, quick launch, taskbar, notifyarea, clock), whitch can run in Windows XP, 2003(need rebuild),
Windows 7, 8, 8.1, 10, 11, Windows Server 2008, 2012, 2016, 2019, 2022 and the Windows Preinstallation Environment(WinPE), and both x86, x64 environment.
UI_Stuffs_en05b9.png
UI_Stuffs_en05b9.png (837.55 KiB) Viewed 32759 times
with customizable modern UIs.

UI_Volume, UI_WIFI, UI_Calendar, UI_Settings,
UI_Laucher, UI_Resolution, UI_Shutdown, UI_SystemInfo
RC4.0_blue4fb0.png
RC4.0_blue4fb0.png (282.24 KiB) Viewed 32759 times
rc4.0_dark_2b5cb.png
rc4.0_dark_2b5cb.png (271.67 KiB) Viewed 32759 times
slore
Code Baker
Posts: 59
Joined: Sun 06 Jun, 2021 12:00 pm

Re: WinXShell - a portable shell and zero dependencies for boot.wim,winre.wim

Post by slore »

How to use?
in normal windows:
1. terminate the origin shell.
hold CTRL+SHIFT and right click the taskbar, select the "Terminate Explorer". (or force end in taskmgr.exe)

2. run "WinXShell.exe"

in PE:
press SHIFT+F10 to startup cmd.exe,
just run "WinXShell.exe -winpe"


WinXShell v4.6.0 Released (2021.11.11)
WinXShell_RC4.6.0.7z
(2.59 MiB) Downloaded 5900 times
Last edited by slore on Mon 15 Nov, 2021 3:20 pm, edited 1 time in total.
slore
Code Baker
Posts: 59
Joined: Sun 06 Jun, 2021 12:00 pm

Re: WinXShell - a portable shell and zero dependencies for boot.wim,winre.wim

Post by slore »

# 更新历史记录

## WinXShell 4.6 (2021.11.11)
这是一个主要更新。添加和改善了以下内容:

* 修复 亮度调节功能占用256MB内存的问题。
* 改进 任务栏按钮显示风格。(适配Windows主题,解决Windows 11按钮高亮显示不自然的问题)
* 新增 任务栏程序快速关闭按钮(可通过配置文件进行设定)。
* 新增 UI组件
* UI_LED 屏幕提示信息(可滚动)。
* UI_TrayPanel 显示系统信息,日历,调度调节控件。
* 改进 UI组件
* 当显示设置发生变化时,将调用 ondisplaychanged() 函数,可用来调整窗口位置或更新数据。
* UI_Settings DPI设置新增225%, 250%, 275%, 300%选项。
* UI_SystemInfo 适配Windows 11。
* UI_Calendar 改善界面,新增亮度调节控件(可通过-brightness=true|false参数控制)。
* 改进 lua接口
* 新增 app:info('FirmwareType') 方法
* 新增 app:info('IsUEFIMode') 方法
* 新增 sui:title(str) 方法
* 新增 sui:info('rect') 方法
* 新增 sui:info('wh') 方法
* 新增 FolderOptions:Toggle(opt) 方法
* 其他细节更新


## WinXShell 4.5 (2021.04.04)
这是一个主要更新。添加和改善了以下内容:

* 新增 任务栏窗口预览功能(thumbnail)。
* 改进 lua接口
可使用Desktop对象,可通过此对象更改壁纸,实时改变桌面图标大小,
布局等表示样式,可直接刷新桌面。
* 改进 UI组件
* UI_Settings 支持设置屏幕亮度
* UI_SystemInfo 支持读取OEM信息
* UI_SystemInfo 修复无法正确显示机器名的问题
* UI_SystemInfo 调整界面字体,布局等细节
* UI_WIFI 可直接输入回车键进行连接
* UI_WIFI 【网络和Internet 设置】可打开【网络连接】页面(更改适配器选项)
* UI_WIFI 修复启动窗口闪烁问题
* UI_WIFI 修复在外壳启动前运行时,弹出连接窗口会覆盖任务栏的问题

将支持的Lua函数和对象信息书写LUA_TEST.bat测试脚本(UTF-8编码,中文说明)。


## WinXShell 4.4 (2020.10.10)
这是一个常规更新。添加和改善了以下内容:

* 改善 lua_helper扩展
将winapi和lua扩展库编译到应用程序本身。
减小程序体积,简化结构,仅应用程序就可支持运行lua代码。

* 强化 UI组件
* UI_WIFI 支持连接隐藏网络
* UI_WIFI 支持多无线网卡进行网络连接
* UI_Calendar 支持显示农历信息
* UI_Settings 支持修改显示DPI


## WinXShell 4.3 (2020.04.04)
这是一个主要更新。添加和改善了以下内容:

* 改进 编译选项设置 “随机基址”和“数据执行保护(DEP)”。
* 新增 开始菜单项目,新增【网络连接】项目。
* 新增 UI_WIFI 新增 PPPoE拨号按钮,有拨号连接时显示。
* 新增 UI_WIFI,UI_Volume支持 -notrayicon 参数,不创建托盘图标。
* 改进 直接接管系统 声音,网络 托盘图标,点击调用 UI_Volume 和 UI_WIFI 组件。
* 原生状态指示图标
* 支持图标右键菜单
* 菜单支持全部语言
* 改善 lua_helper 函数库,WinXShell.lua 仅保留用户自定义函数和接口。
* 新增 wxs-ui:xxx, wxs-open:xxx 短命令协议接口。
例如: wxs-ui:wifi, wxs-open:system, wxs-open:networkconnections,
wxs-open:devices, wxs-open:printers
* 改善 控制面板中点击【连接到网络】,将打开 UI_WIFI 连接界面。
* 改善 ADSL拨号连接,将打开 UI_WIFI 连接界面。(正常系统下有效,PE下无效)
* 修复 我的电脑右键【属性】菜单没有菜单热键问题。
* 修复 点击控制面板无限弹出资源管理器问题。
* 改善 我的电脑右键【属性】默认显示系统属性界面。
* 新增 浅色主题支持。
* 任务栏 添加浅色主题
* 声音,WIFI,日历 添加浅色主题
* 改善 个性化设定界面,增加更多颜色相关设定选项。
* 改善 声音设定界面滑块移动流畅度提高,提示音不再阻塞。
* 修复 信息通知栏无法显示的问题。
Last edited by slore on Mon 15 Nov, 2021 3:17 pm, edited 1 time in total.
slore
Code Baker
Posts: 59
Joined: Sun 06 Jun, 2021 12:00 pm

Re: WinXShell - a portable shell and zero dependencies for boot.wim,winre.wim

Post by slore »

History.md (English)

## WinXShell 4.5 (2021.04.04)
This is a major update.The following was added and improved:

* Added task thumbnail feature.
* Improved the lua interface.
Add the Desktop object, through which you can change the wallpaper, change the size of the desktop icons, the layout and other presentation styles in real time,
and refresh the desktop directly.
* Improved UI components
* UI_Settings supports setting screen brightness
* UI_SystemInfo supports reading OEM information
* UI_SystemInfo fix the issue that the computer name cannot be displayed correctly
* UI_SystemInfo adjust interface font, layout and other details
* UI_WIFI add the enter key to connect
* UI_WIFI [network and Internet settings] link will open [Network connection] control panel window(change adapter options)
* UI_WIFI fix the flickering problem of the startup window
* UI_WIFI fix the problem that the connection window will cover the taskbar when the this is running before the shell starts.

Write the supported Lua functions and objects into the LUA_TEST.bat test script (UTF-8 encoding, in Chinese).


## WinXShell 4.4 (2020.10.10)
This is a regular update. The following were updated or improved:

* Improved the lua_helper extension.
Compile winapi.dll and lua extension helpers into the application itself.
Reduce the size of the program, simplify the structure, and only the application program can support running Lua code.
* Improved UI components.
* UI_WIFI supports connection to hidden network
supports multiple wireless network adapters for network connection
* UI_Calendar supports display of lunar calendar for Chinese OS
* UI_Settings supports modification and display of DPI
smopro
Newly Registered User
Posts: 3
Joined: Wed 26 Jan, 2022 7:17 am

Re: WinXShell - a portable shell and zero dependencies for boot.wim,winre.wim

Post by smopro »

How to disable right mouse click menu on toolbar? I need disable this menu because i will use another application to settings - how i can disable rmb click menu? WinxShell version 4.6
User avatar
Homes32
Code Baker
Posts: 52
Joined: Sun 06 Jun, 2021 8:10 pm

Re: WinXShell - a portable shell and zero dependencies for boot.wim,winre.wim

Post by Homes32 »

Does WinXShell allow OpenShell to run?

I see from the old source on github it is suppose to be creating ApplicationManager_DesktopShellWindow but OpenShell is unable to hook in.
slore
Code Baker
Posts: 59
Joined: Sun 06 Jun, 2021 12:00 pm

Re: WinXShell - a portable shell and zero dependencies for boot.wim,winre.wim

Post by slore »

smopro wrote: Wed 26 Jan, 2022 7:34 am How to disable right mouse click menu on toolbar? I need disable this menu because i will use another application to settings - how i can disable rmb click menu? WinxShell version 4.6

Do you mean the Settings, TaskManager contextmenu on taskbar?

You can find the MENU resource in rc file.

D:\dev\WinXShell\explorer-en.rc(68):IDM_DESKTOPBAR MENU

and the action when you right clicked the toolbar.

D:\dev\WinXShell\taskbar\desktopbar.cpp(521):

```cpp
case WM_CONTEXTMENU: {
POINTS p;
p.x = LOWORD(lparam);
p.y = HIWORD(lparam);
PopupMenu menu(IDM_DESKTOPBAR);
SetMenuDefaultItem(menu, 0, MF_BYPOSITION);
PopupMenu menu(IDM_DESKTOPBAR);
```

you can add an option for enable/disable the menu with JCFG2_DEF macro.

```diff
case WM_CONTEXTMENU: {
+ if (JCFG2_DEF("JS_TASKBAR", "contextmenu_enabled", true).ToBool()) {
...
...
+ }
break;
}

Here is the v4.6.3 for add the new option for it.
WinXShell_RC4.6.3.7z
(2.59 MiB) Downloaded 3355 times
slore
Code Baker
Posts: 59
Joined: Sun 06 Jun, 2021 12:00 pm

Re: WinXShell - a portable shell and zero dependencies for boot.wim,winre.wim

Post by slore »

Homes32 wrote: Mon 31 Jan, 2022 8:43 pm Does WinXShell allow OpenShell to run?

I see from the old source on github it is suppose to be creating ApplicationManager_DesktopShellWindow but OpenShell is unable to hook in.
OpenShell will check the shell application name, if it is not explorer.exe, it will not to hook in.

build the openshell with a patch, or just modify the unicode string directly.
The OpenShell should hook in.


JFYI:
D:\dev\WimBuilder2\Projects\WIN10XPE\01-Components\00-Shell\WinXShell\sublast.bat

Code: Select all

rem update ClassicStartMenu.exe binary
rem binmay.exe -u "%_MenuEXE%" -s u:explorer.exe\0\0 -r u:WinXShell.exe\0
set "_UStr_explorer=65 00 78 00 70 00 6C 00 6F 00 72 00 65 00 72 00 2E 00 65 00 78 00 65 00 00 00 00 00"
set "_UStr_WinXShell=57 00 69 00 6E 00 58 00 53 00 68 00 65 00 6C 00 6C 00 2E 00 65 00 78 00 65 00 00 00"
binmay.exe -u "%_MenuEXE%" -s "%_UStr_explorer%" -r "%_UStr_WinXShell%"
smopro
Newly Registered User
Posts: 3
Joined: Wed 26 Jan, 2022 7:17 am

Re: WinXShell - a portable shell and zero dependencies for boot.wim,winre.wim

Post by smopro »

slore wrote:
> you can add an option for enable/disable the menu with JCFG2_DEF macro.
>
> ```diff
> case WM_CONTEXTMENU: {
> + if (JCFG2_DEF("JS_TASKBAR", "contextmenu_enabled",
> true).ToBool()) {
> ...
> ...
> + }
> break;
> }

Just add in JS_TASKBAR section
"contextmenu_enabled": false (or true if i need enable popup menu)?
smopro
Newly Registered User
Posts: 3
Joined: Wed 26 Jan, 2022 7:17 am

Re: WinXShell - a portable shell and zero dependencies for boot.wim,winre.wim

Post by smopro »

YES! It works! Thank you!) But why when i start task manager, i don't see load monitor in tray? In winpe it work normal, but in win server 2019 and 2016 core don't work - just blink for seconds
User avatar
Homes32
Code Baker
Posts: 52
Joined: Sun 06 Jun, 2021 8:10 pm

Re: WinXShell - a portable shell and zero dependencies for boot.wim,winre.wim

Post by Homes32 »

slore wrote: Wed 02 Feb, 2022 2:56 pm
Homes32 wrote: Mon 31 Jan, 2022 8:43 pm Does WinXShell allow OpenShell to run?

I see from the old source on github it is suppose to be creating ApplicationManager_DesktopShellWindow but OpenShell is unable to hook in.
OpenShell will check the shell application name, if it is not explorer.exe, it will not to hook in.

build the openshell with a patch, or just modify the unicode string directly.
The OpenShell should hook in.


JFYI:
D:\dev\WimBuilder2\Projects\WIN10XPE\01-Components\00-Shell\WinXShell\sublast.bat

Code: Select all

rem update ClassicStartMenu.exe binary
rem binmay.exe -u "%_MenuEXE%" -s u:explorer.exe\0\0 -r u:WinXShell.exe\0
set "_UStr_explorer=65 00 78 00 70 00 6C 00 6F 00 72 00 65 00 72 00 2E 00 65 00 78 00 65 00 00 00 00 00"
set "_UStr_WinXShell=57 00 69 00 6E 00 58 00 53 00 68 00 65 00 6C 00 6C 00 2E 00 65 00 78 00 65 00 00 00"
binmay.exe -u "%_MenuEXE%" -s "%_UStr_explorer%" -r "%_UStr_WinXShell%"
Thanks for the tip. Patching StartMenu.exe does allow OpenShell to run and hook into explorer, however it is not able to take over the start button. Clicking the start button with OpenShell loaded results in nothing happening. Clicking the very right edge (border) of the start button will bring up the WinXShell menu. pressing the "Windows" key on the keyboard will bring up the OpenShell menu. Any Ideas?

WIn10 2004, Openshell v4.4.160
slore
Code Baker
Posts: 59
Joined: Sun 06 Jun, 2021 12:00 pm

Re: WinXShell - a portable shell and zero dependencies for boot.wim,winre.wim

Post by slore »

Try to set the start icon to be empty, and set the start icon of Open-Shell, could it be clicked ?

WinXShell.jcfg

Code: Select all

"JS_STARTMENU" : {
    "start_icon" : "empty",
    ...
}
I will try Openshell v4.4.160 this week later.
User avatar
Homes32
Code Baker
Posts: 52
Joined: Sun 06 Jun, 2021 8:10 pm

Re: WinXShell - a portable shell and zero dependencies for boot.wim,winre.wim

Post by Homes32 »

slore wrote: Mon 14 Feb, 2022 1:37 pm Try to set the start icon to be empty, and set the start icon of Open-Shell, could it be clicked ?

WinXShell.jcfg

Code: Select all

"JS_STARTMENU" : {
    "start_icon" : "empty",
    ...
}
I will try Openshell v4.4.160 this week later.
Setting the start button in Open-Shell resolves the issue. OpenShell can't find the button/control to hook so it needs
HKCU\SOFTWARE\OpenShell\StartMenu\Settings\EnableStartButton
to be enabled, then the start button is drawn and works correctly. Not something that is needed with explorer, but I can live with the solution if you can't find anything obvious to fix with WinXShell. Thanks again!