Вопрос

I have changed the shell key in windows registry to gain custom shell (Kiosk usage):

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]

I set shell key to a batch file which runs two applications as below:

start "myFirstAppTitle" "myAppPath\myApp1.exe"
start "mySecondAppTitle" "myAppPath\myApp2.exe"

Each application runs but the second application which needs some files to be excuted throws an error which says could not find dependency files. whereas the dependency files are adjoining to the exe file and the mentioned app works fine, when starts from startup.

Meanwhile when i run the batch file manually it rusn fine.

I added the PATH command to the batch file but it did't work too.

Это было полезно?

Решение 2

The problem solved strangely, i removed the title parameter of start command and it worked. In fact i used start command this fashion:

set PATH=%PATH%;C:\MyAppPath
start myapp.exe 
start myapp2.exe

Другие советы

Change the batch file to this:

set PATH=%PATH%;C:\MyAppPath

start "myFirstAppTitle" "myApp1.exe"
start "mySecondAppTitle" "myApp2.exe"

If you start executables without an absolute path, the path is relative to the current working directory. Also, when you specify an executable with a relative path, %PATH% is not searched for a matching subfolder with a matching executable.

Since the script worked when you manually started it, your working directory probably was C:\. However, when run at logon as a replacement shell, the working directory is most likely "%SystemRoot%\system32".

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top