Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.


Rickles

2938 posts

Uber Geek

Trusted

#138597 10-Jan-2014 09:13
Send private message

It's been many years since I've created BAT files to run on Windows machines, and encountered a small problem. I have two BAT files that utilise Android and Java apps, and they both run when executed separately.  Putting them both in one BAT file (so that they execute sequentially) runs into problems ... I'm sure it's something simple but can't pin it down.

The files/lines are -

START C:\Development\adt-bundle-windows-x86-20130917\sdk\platform-tools\adb.exe shell

and

START C:\androidscreencast(1).jnlp

As I say, both work individually, but not together ... tried putting second line in same directory as first, and also a CHDIR to ensure second line points to C; drive.

Error says "Windows cannot find C:\androidscreencast(1).jnlp ... "

Any clues, suggestions would be welcomed.

R.


Create new topic
gehenna
8510 posts

Uber Geek

Moderator
Trusted
Lifetime subscriber

  #964292 10-Jan-2014 09:18
Send private message

Why not create a batch that calls both other back files, rather than one batch that calls both executables, e.g:

@echo off
call \path\batch1.bat
call \path\batch2.bat

edit: bearing in mind I haven't written a batch file in 17 years :)



Rickles

2938 posts

Uber Geek

Trusted

  #964301 10-Jan-2014 09:24
Send private message

Hi Michael, yeah, I'm in the same boat and went up into the attic to find my copy of DOS 5 to recall basic commands .

Will try your suggestion though.

R.

andrewNZ
2487 posts

Uber Geek
Inactive user


  #964305 10-Jan-2014 09:33
Send private message

Does the second one need to be run after the first has completed loading?

I thought the start command instantly moved on. Maybe add a 3 second pause

START C:\Development\adt-bundle-windows-x86-20130917\sdk\platform-tools\adb.exe shell
ping 1.1.1.1 -n 1 -w 3000 > nul
START C:\androidscreencast(1).jnlp



Rickles

2938 posts

Uber Geek

Trusted

  #964314 10-Jan-2014 09:45
Send private message

Andrew ... a time pause may be an idea, will give it a go .

R.

Rickles

2938 posts

Uber Geek

Trusted

  #964541 10-Jan-2014 14:07
Send private message

UPDATE: Thanks people, the short pause was enough to allow the first executable to open and stabilise before being hit with another command ... in fact the pause need only be 1.5 seconds .

Cheers,

R.

Create new topic





News and reviews »

Air New Zealand Starts AI adoption with OpenAI
Posted 24-Jul-2025 16:00


eero Pro 7 Review
Posted 23-Jul-2025 12:07


BeeStation Plus Review
Posted 21-Jul-2025 14:21


eero Unveils New Wi-Fi 7 Products in New Zealand
Posted 21-Jul-2025 00:01


WiZ Introduces HDMI Sync Box and other Light Devices
Posted 20-Jul-2025 17:32


RedShield Enhances DDoS and Bot Attack Protection
Posted 20-Jul-2025 17:26


Seagate Ships 30TB Drives
Posted 17-Jul-2025 11:24


Oclean AirPump A10 Water Flosser Review
Posted 13-Jul-2025 11:05


Samsung Galaxy Z Fold7: Raising the Bar for Smartphones
Posted 10-Jul-2025 02:01


Samsung Galaxy Z Flip7 Brings New Edge-To-Edge FlexWindow
Posted 10-Jul-2025 02:01


Epson Launches New AM-C550Z WorkForce Enterprise printer
Posted 9-Jul-2025 18:22


Samsung Releases Smart Monitor M9
Posted 9-Jul-2025 17:46


Nearly Half of Older Kiwis Still Write their Passwords on Paper
Posted 9-Jul-2025 08:42


D-Link 4G+ Cat6 Wi-Fi 6 DWR-933M Mobile Hotspot Review
Posted 1-Jul-2025 11:34


Oppo A5 Series Launches With New Levels of Durability
Posted 30-Jun-2025 10:15









Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.