Make invisible eShell(kiosk) window on startup

258 Views Asked by At

I want my file to start on eShell minimized or even better hidden.

Here is my code at this moment:

$ShellLauncherClass = [wmiclass]"\\localhost\root\standardcimv2\embedded:WESL_UserSetting"
$ShellLauncherClass.SetDefaultShell("D:\uvs\WinPOS\run.bat", 0)
$ShellLauncherClass.SetEnabled($TRUE)

I can't find any kind of solution.

Edit:

Ok, so after a little bit research. This powershell just adds and enables eShell(Kiosk) function in windows that starts my run.bat. So if I add -WindowStyle Hidden into powershell, it just hides the powershell. The main thing that I need that this launched run.bat would be minimized on start or hidden

1

There are 1 best solutions below

0
Dainius On

Ok so solution was best to implement the -WindowStyle -Minimized implemedted into the shell script. Thank you Santiago for the answer ! Didn't get it in the first time what you been suggesting me.

Full code:

$ShellLauncherClass = [wmiclass]"\localhost\root\standardcimv2\embedded:WESL_UserSetting" $ShellLauncherClass.SetDefaultShell("powershell -window minimized -command D:\uvs\WinPOS\run.bat", 0) $ShellLauncherClass.SetEnabled($TRUE)