I need to write a batch script that will iterate through 1st level subfolders in search for a defined list of executables, which will need to be executed in order.
Here's an example on what needs to be achieved:
Code: Select all
8.1_x64
4g_sp72426
audio_sp77176
bluetooth_broadcom_sp70725
bluetooth_intel_sp72619
bluetooth_realtek_sp74337
camera_sp76199
card_sp75104
fingerprint_wbf_synaptics_sp74390
lan_sp74233
mobile_broadband_hp_sp74017
mouse_synaptics_sp75231
usb30_sp72692
video_amd_sp76589
video_hybrid_sp74524
video_intel_sp78116
wireless_button_sp74484
wireless_lan_broadcom_sp72927
wireless_lan_Intel_sp76279
wireless_lan_realtek_sp77436
Iterate through all subfolders of 8.1_x64 but only 1st sub-level (not recurse) and execute, in order the following only if the executable does not exist:
Code: Select all
setup.exe -S
hpucdsilent.exe /loud
HPInstaller.exe
*.exe
So if setup.exe does not exist, launch hpucdsilent.exe, if this also does not exist try HPInstaller.exe, and even this does not exist launch any executable.
Thank you for your assistance