I have a need to automate the installation of a USB serial driver in Windows XP. My installation program, written in Perl, will be run from a USB memory stick. Before the driver gets installed, a modification needs to be made to its .INF file. The information required to perform the mod is the two-digit USB "location ID" of the USB port that the installation memory stick is plugged into. Microsoft's
usbview.exe program can provide this info, but it's strictly a GUI app, and there's no discernable way to get its output into a text file for Perl to parse. A search of CPAN came up blank -- unless I'm just looking for the wrong thing.
Any ideas?
Update: I now realize there's a flaw in the ointment. The idea was for the user to plug the memory stick into the USB port they were going to use for the serial adaptor. However, I now see that when a memory stick is plugged in, the port takes on an entirely different location ID than when a serial adapter is plugged in. This isn't going to work.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.