I've been looking over the following VB code:
http://www.codeproject.com/KB/vb/toggleNetworkConn.aspx
If you look under "The Methods", you'll see that he does a test to see whether or not the shell item verb is either "En&able" or "Disa&ble" - it looks pretty obvious that these are the same text strings that are listed in the right-click context menu in Network Connections. The obvious problem with this approach (as pointed out by someone in the comments on CodeProject as well) is that this is English-specific; depending on what language the OS is running, it's going to use different words. The programmers response was to potentially use the index of the verb, but this is arguably worse than the original solution, since you would then be performing some arbitrary operation if it wasn't the correct command (and I don't believe it's guaranteed to be in a particular order in the verb list).
So my question, is it possible to get from the system (via some call or the registry) the OS-language specific text for Enable and Disable? I've searched the registry for both strings without any success, but I thought someone with more multi-language experience might have the answer. Also, I'm not using VB (I'll be using C++) so don't worry about doing it in any particular language - API calls or pseudo code is fine. I also need the solution to work on both XP and Vista (and hopefully Windows 7 as well). Thanks!