+ Post New Thread
Results 1 to 14 of 14
Coding Thread, Automation for exceutables in Coding and Web Development; Hi, I need batch file which can run number of .exe present within a folder. For example the all exe ...
  1. #1

    Join Date
    Apr 2013
    Posts
    29
    Thank Post
    1
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Automation for exceutables

    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!!!

  2. #2

    Join Date
    Apr 2013
    Posts
    9
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    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!
    Last edited by planetbrain; 2nd April 2013 at 02:12 PM.

  3. #3

    Join Date
    Apr 2013
    Posts
    9
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    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

  4. #4

    Join Date
    Apr 2013
    Posts
    29
    Thank Post
    1
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    That exe asks for installation directoty, where that should be defined.

  5. #5

    Join Date
    Apr 2013
    Posts
    29
    Thank Post
    1
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Quote Originally Posted by planetbrain View Post
    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!

  6. #6

    Join Date
    Apr 2013
    Posts
    9
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    %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
    Last edited by planetbrain; 8th April 2013 at 08:40 AM. Reason: spellin

  7. #7

    Join Date
    Apr 2013
    Posts
    29
    Thank Post
    1
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Quote Originally Posted by planetbrain View Post
    %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.

  8. #8

    Ephelyon's Avatar
    Join Date
    Aug 2008
    Location
    Cheshire, England
    Posts
    1,656
    Thank Post
    283
    Thanked 318 Times in 192 Posts
    Rep Power
    141
    That sounds like a problem with the setup programme itself, not the script.

  9. #9

    Join Date
    Apr 2013
    Posts
    29
    Thank Post
    1
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Quote Originally Posted by Ephelyon View Post
    That sounds like a problem with the setup programme itself, not the script.
    But manually it is installing successfully.

  10. #10

    Ephelyon's Avatar
    Join Date
    Aug 2008
    Location
    Cheshire, England
    Posts
    1,656
    Thank Post
    283
    Thanked 318 Times in 192 Posts
    Rep Power
    141
    Are you running it manually by double-clicking it, or are you giving it command-line parameters then as well?

  11. #11

    Join Date
    Apr 2013
    Posts
    9
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    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.

  12. #12

    Join Date
    Apr 2013
    Posts
    29
    Thank Post
    1
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Quote Originally Posted by planetbrain View Post
    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.

  13. #13

    Join Date
    Apr 2013
    Posts
    9
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    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

  14. #14

    Join Date
    Apr 2013
    Posts
    29
    Thank Post
    1
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Quote Originally Posted by planetbrain View Post
    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?

SHARE:
+ Post New Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •