Introduction: The company I work for develops tax filing software. During the upgrade process (mainly by downloading patches, made as WinRAR self-extracting archives), customers often operate it themselves and cause the upgrade to fail!! (All the ABC directories below are hypothetical; in reality it is the RIGHTIUM directory.)
For example: our software is installed by default under C:\ABC, but all the files are actually placed in C:\ABC\123456( (each company has its own six-digit company code), and the default installation directory of the self-extracting file is C:\ABC. Since each company's code is different, the user has to manually add \123456 (that company's own company code) after C:\ABC, but quite a lot of users just click install directly without adding \123456 (that company's own company code), and in the end the upgrade fails!!!
How can I write a batch file like this!!!! (It has to work in both WIN98 and WIN2000)
1. First automatically search every partition on the hard disk for the ABC directory (considering that some users may change the default installation directory);
2. Then search under this directory for all directories named with six-digit numbers (company codes) (because some accountants work part-time and may have several companies installed);
3. Then list the directories named with the six-digit numbers (company codes) in list form, and let the user choose which company code to patch!!!
Additional notes: 1. The patch files can be made into a self-extracting archive and then used together with the batch file!!!
2. Or could one of the experts teach me how to use one of the currently popular installers to search the registry directly, then list the directories named with the six-digit numbers (company codes) that it finds, and let the user choose which company code to patch!!!
For example: our software is installed by default under C:\ABC, but all the files are actually placed in C:\ABC\123456( (each company has its own six-digit company code), and the default installation directory of the self-extracting file is C:\ABC. Since each company's code is different, the user has to manually add \123456 (that company's own company code) after C:\ABC, but quite a lot of users just click install directly without adding \123456 (that company's own company code), and in the end the upgrade fails!!!
How can I write a batch file like this!!!! (It has to work in both WIN98 and WIN2000)
1. First automatically search every partition on the hard disk for the ABC directory (considering that some users may change the default installation directory);
2. Then search under this directory for all directories named with six-digit numbers (company codes) (because some accountants work part-time and may have several companies installed);
3. Then list the directories named with the six-digit numbers (company codes) in list form, and let the user choose which company code to patch!!!
Additional notes: 1. The patch files can be made into a self-extracting archive and then used together with the batch file!!!
2. Or could one of the experts teach me how to use one of the currently popular installers to search the registry directly, then list the directories named with the six-digit numbers (company codes) that it finds, and let the user choose which company code to patch!!!

