Здравствуйте, гость ( Вход | Регистрация )

> Run .bat file with execandwait()
neves
сообщение 3.4.2020, 17:40
Сообщение #1


***

Novice
Сообщений: 64
Регистрация: 4.10.2019
Группа: Пользователи
Наличность: 0
Пользователь №: 19.419
Возраст: 19



I have very long .bat file with many settings, which STARTS and .exe file. I wanna execute this .bat file using execandwait() function, but it waits for the cmd to be executed and doesn't waits for the script in bat to be executed.
Example:
Lets say I have this test.bat file:
Код
START C:\Windows\NOTEPAD.EXE

With notepad.exe is hard to see the problem, so change the path to any application which loads slower. (Ex: D:\Game\CLIENT.EXE)
Then I start this script:
Код
--lua
wait(1000)
execandwait("D:\\test.bat")

And script stops before the given .EXE is executed.
Does anyone faced this problem and can it be solved?
Пользователь в офлайнеDelete PostОтправить личное сообщение
Вернуться в начало страницы
+Ответить с цитированием данного сообщения
 
Ответить в эту темуОткрыть новую тему
Ответов
neves
сообщение 3.4.2020, 19:58
Сообщение #2


***

Novice
Сообщений: 64
Регистрация: 4.10.2019
Группа: Пользователи
Наличность: 0
Пользователь №: 19.419
Возраст: 19



I have very long .bat file with many settings. I gave notepad.exe as an example.
Lets say that my bat looks like:
Код
start game.exe;name=user;ip=36.29.147.162;port=4747

I cannot start the .exe file without these settings, so I can't just use execandwait("game.exe") if you understand.
I need somehow to run that .bat file and wait for the program to load.
Пользователь в офлайнеDelete PostОтправить личное сообщение
Вернуться в начало страницы
+Ответить с цитированием данного сообщения



Ответить в эту темуОткрыть новую тему
2 чел. читают эту тему (гостей: 2, скрытых пользователей: 0)
Пользователей: 0

 

- Текстовая версия | Версия для КПК Сейчас: 31.12.2025, 18:42
Designed by Nickostyle