asifm Posted April 2, 2013 Posted April 2, 2013 Hi, I need batch file which can run number of .exe present within a folder. For example the all exe present in C:\AMB folder, the AMB folder contains many installable folders, and in that exe are present i.e. C:\AMB\installable\abc.exe ,C:\AMB\installable_1\abc.exe. All exe are having same naming convention. abc.exe Can someone please help me out in this project. Thanks in Advance!!!
planetbrain Posted April 2, 2013 Posted April 2, 2013 (edited) Try dir /s /b C:\AMB | find /c ".exe Ughs, never mind i mis read it and thought it said you wanted to count them! Edited April 2, 2013 by planetbrain
planetbrain Posted April 2, 2013 Posted April 2, 2013 Assuming you don't need them run in a specific order pass parameters or wait for each one to complete then try dir /s /b C:\AMB| find "abc.exe" > %temp%\abc.bat call %temp%\abc.bat
asifm Posted April 3, 2013 Author Posted April 3, 2013 That exe asks for installation directoty, where that should be defined.
asifm Posted April 8, 2013 Author Posted April 8, 2013 Assuming you don't need them run in a specific order pass parameters or wait for each one to complete then try Hi PlanetBrain, Can you please let me know what is (%temp%\abc.bat) abc.bat in this script? Thanks in Advance!
planetbrain Posted April 8, 2013 Posted April 8, 2013 (edited) %temp% is an environment variable which points to the folder user for temporary files in windows the script writes a list of executable files to a batch file called abc.bat in the folder pointed to by %temp% and then runs that batch file Edited April 8, 2013 by planetbrain spellin
asifm Posted April 8, 2013 Author Posted April 8, 2013 %temp% is an environment variable which points to the folder user for temporary files in windows the script writes a list of executable files to a batch file called abc.bat in the folder pointed to by %temp% and then runs that batch file Hi Planetbrain, Can you write a scrpit something like this one. @echo off set /P _license file=License file path: set /P _directory=New voyager Install Directory: cd\ for /f %%a in ('dir /s /b C:\Plugins\YardiPIInstall.exe') do %%a /qs C:\Test70.log /L "%_license file%" /d "%_directory%" Pause ------------------------------------------------------- This is not executing correctly, throwing an error unable to determine the voyager version means the base version of their setup. please help.
Ephelyon Posted April 8, 2013 Posted April 8, 2013 That sounds like a problem with the setup programme itself, not the script.
asifm Posted April 8, 2013 Author Posted April 8, 2013 That sounds like a problem with the setup programme itself, not the script. But manually it is installing successfully.
Ephelyon Posted April 8, 2013 Posted April 8, 2013 Are you running it manually by double-clicking it, or are you giving it command-line parameters then as well?
planetbrain Posted April 8, 2013 Posted April 8, 2013 i'd remove the @echo off from the start, then it would write the command it's executing to the screen for each executableso you could make sure it is parsing and passing the variables correctly or just change for /f %%a in ('dir /s /b C:\Plugins\YardiPIInstall.exe') do %%a /qs C:\Test70.log /L "%_license file%" /d "%_directory%" to f or /f %%a in ('dir /s /b C:\Plugins\YardiPIInstall.exe') do echo %%a /qs C:\Test70.log /L "%_license file%" /d "%_directory%" then it would just give you a list of the programs to be executed and the paramaters the script is passing as part of the command.
asifm Posted April 10, 2013 Author Posted April 10, 2013 Assuming you don't need them run in a specific order pass parameters or wait for each one to complete then try I need to run exe after the completion of previous one.
planetbrain Posted April 11, 2013 Posted April 11, 2013 The commands I gave should to that, but it will run the programs in the order it finds them which may or may not be the order you want to run them in
asifm Posted April 12, 2013 Author Posted April 12, 2013 The commands I gave should to that, but it will run the programs in the order it finds them which may or may not be the order you want to run them in The script is finding the exe and running also but not installationg while it throws an error , unable to determine the setup version. when we run plugin.exe manully it also asks for the directory path where its base version setup is installed, we need to enter that path over thier and then clich next to continue the setup, but while running script it is not inherting the path which we set as directory /d "%_directory%" Can you please help me to correct this, or any other way where i can achieve this goal?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now