Jump to content

Automagic executable finder in WPI


Recommended Posts

At the risk of sounding stupid, I was wondering if there is a way to have WPI automatically search for and find executable programs and/or folders/files that are contained in the Install folder - especially useful for lots of files in specific folder hierarchies like I've got listed below:

For instance, I have the following (as an excerpt - there are literally dozens in each category)

wpiexcerpt.png

To go through each and every .BAT, .COM, .EXE would take some serious time.

What would be really useful, is if WPI could search for all of these files, yet retain the folder hierarchy that I've already set up, as well as automatically creating new categories to match those already set in the Install folder (as per the image above).

I just found out about this great tool you have called WPI. I've been using PStart for a while, and although it serves it's purpose quite nicely, I would appreciate seeing a more professional look for the multi-installer, not to mention the awesome ability to automatically install the specific programs that I choose.

Just for information, I don't mind doing some of the work, i.e. setting up categories, determining which programs to have WPI automatically install and such, but to go through each and every program one at a time simply isn't going to happen...I lack the time itself to accomplish such a feat, as I own a computer repair business with several thousand clients.

Anyway, someone please let me know if I've inadvertently missed something in the config of WPI...anything that I've mentioned above would be a great help to your program, and to those of us who need something to automate finding and categorizing folders/files that are placed in specific order in the Install folder of WPI.

Thanks in advance.

Psychlone

Edited by Psychlone
Link to comment
Share on other sites


This idea has been on my To Do List for quite some time now. It would make things alot easier to just make folders for each category, then sub folders for each item.

The major issue would be when there are either multiple .exe's, and/or .bat or .cmd files. Which one is the one to use?

Whimsy and I talked a bit,and we came up with an idea to use .ini files. Something for the future......................

Link to comment
Share on other sites

Thanks for the reply mritter.

I know nothing of this type of coding, so I have no idea how this functionality would be accomplished, but I already very much appreciate the work you have done in WPI.

I have a utility USB that I pack everywhere with me - it's completely FULL (almost 8GB) of utilities, service packs and portable apps...well over 100 executable programs, XMLs and custom batch files, and like I mentioned, to enter each one manually is more than a daunting task; there's no way I'll ever have enough time to get around to it.

I've used P-Start and even tried Portableapps.com for a while for a user interface to all those programs, and they both have parts of this functionality, although crude. With P-Start, (not sure if you're familiar with P-Start or not), you can create new 'Groups' (categories) and then manually enter files to go in that group. With Portableapps.com utility, it's got a great GUI, but it lacks the ability to add groups (categories), but it does have the ability to 'Search for .exe files' and simply adds them alphabetically to the left-hand pane (no categories available, although, you can add folders of whatever folder hierarchy to the 'Documents' area).

Something in between both of them would be most proficient...the ability to create categories AND search for .exe/.bat/.xml/.msi/(or other) in the specific category created by virtue of the folder hierarchy already created in the 'Install' folder (as per my small example in the pic in my last post) rather than searching the entire Install folder for them.

(i.e. I need to search for all my executables in my 'Information' folder, it would be great to have WPI do a search for known installers (.exe/.bat/.msi/etc) in *just* the folder specified - in this case, 'Information') - otherwise, I'm stuck manually inserting all the information for all 19 applications I have in this folder.

Anyway, just some thoughts...again, I have no experience in the kind of coding it takes to do what I'd like to see done, but I do appreciate what you've already accomplished!

Thanks again,

Psychlone

Link to comment
Share on other sites

I kinda got something, not WPI related, but it should work on anything from XP to Windows 7.

Basically it scans for a subfolder in the same directory as this script (.\BIN) any runs any matching files of type REG, VBS, MSI silently.

@echo off
IF EXIST "%~dp0BIN\REG\*.reg" (FOR /F "tokens=*" %%A IN ('DIR /B "%~dp0BIN\REG"') DO (start /wait regedit /S "%~dp0BIN\REG\%%A"))
IF EXIST "%~dp0BIN\VBS\*.vbs" (FOR /F "tokens=*" %%A IN ('DIR /B "%~dp0BIN\VBS"') DO (start /wait %SystemRoot%\system32\cscript //nologo "%~dp0BIN\VBS\%%A"))
IF EXIST "%~dp0BIN\MSI\*.msi" (FOR /F "tokens=*" %%A IN ('DIR /B "%~dp0BIN\MSI"') DO (start /wait %~dp0BIN\MSI\%%A /QN))

For .EXE it may get tougher, because each brand of installer uses a different syntax. You would need a separate folder for all the .EXE that use /S switch, another for /QUIET, yet another for /S /V/QN and so on.

Obviously things like Office will still need be done manually, but with a little luck you should be able to see the pattern to this script and edit it to run some of your .EXE's automagically.

The above three are tested and working, these below are off top of my head. (untested)

IF EXIST "%~dp0BIN\EXE\*.exe" (FOR /F "tokens=*" %%A IN ('DIR /B "%~dp0BIN\EXE"') DO (start /wait %~dp0BIN\EXE\%%A /S /V/QN))
IF EXIST "%~dp0BIN\EXE2\*.exe" (FOR /F "tokens=*" %%A IN ('DIR /B "%~dp0BIN\EXE2"') DO (start /wait %~dp0BIN\EXE2\%%A /QUIET))

There is a tool called CMenu that can help you in determining what type of EXE each file is, after you know the correct syntax, sort them into folders. Good luck.

Edited by MrJinje
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...