Can I provide localized CHM files for an MMC 3.0 snap-in on Windows 2003? - mmc

I am developing a MMC 3.0 snap-in using C#. I would like my snap-in to automatically localize itself according to the current language, i.e. on a Spanish OS, the snap-in should display in Spanish and should use a Spanish help file.
Since my snap-in is a .NET application, GUI localisation is no problem. However, I am having trouble with the localisation of my HTML Help (CHM) file. I want to deploy several localised CHM files to disk, and for MMC to choose the appropriate CHM file to display at run-time.
At the moment, my snap-in launches the English version of my CHM file, which is defined in the "HelpTopic" and "LinkHelpTopics" registry values under HKLM\Software\Microsoft\MMC\SnapIns\<snapin-guid>. I have found an MSDN article that suggests that I can provide localised versions of this CHM file in a mui\<language-code> directory, e.g. (for Spanish) mui\3082\file.chm.
When I try this on Windows 2008, it works - the Spanish version of the help file appears. But when I try it on Windows 2003, I still get the English help file.
Does anyone know if this is a limitation of MMC 3.0 on Windows 2003? If so, what is the best way to achieve what I want to do?
Many thanks!

Just to follow up on this - I haven't found any evidence that this is possible. There is another article that describes how to override MMC's help system and use your own arbitrary mechanism to display help, but this requires users to download a hotfix, and works only on Windows 2008, so is no help for this particular problem.
In the end what I have decided to do is install a single CHM file and reference that in the registry; but that CHM file may be the English version, Spanish version, etc, depending on the user's Windows locale at the time of the install.

Related

Is it possible to extract contents of a *non* self-extracting .exe file?

Well.... the question sort of says it all. If possible I would like to be able to do so from a Linux or macOS environment, but I have virtualized Windows if need be.
Thanks in advance!
There is no general answer for this because different installers/applications use different storage methods. You should first try to identify the author of the installer software by looking for clues in the version information and maybe with a hex editor.
My first suggestion is to try 7-zip, it can extract from NSIS based installers and some MSI based installers.
If the setup was created with Inno Setup then you can try this.
If all else fails, try Universal Extractor but even that will fail for obscure and custom .exe files.
It depends. Assuming you have a PE file (windows executable), you can use a resource editor https://stefansundin.github.io/xn_resource_editor/ to extract icons, messages or dialog layouts. This assumes that the author of that file used the native resource system. Other data would only be available if you knew the address within the PE file, or had appropriate debug symbols. But then, you must guess content type, and maybe also file size.

I want to write a simple script to insert date and time in any file in Windows

I work in a secure data environment so my ability to install software is pretty limited. I have Notepad++, but don't have TextFx (and I read it doesn't work in the current version anyway). I don't have the Python plugin for Notepad++ either. No AHK, etc. OS is Windows XP.
I'm trying to find another way to write a basic script that I can use to insert a time and date stamp into any text editor. I did some googling but couldn't find any specific examples.
I noticed that Notepad uses F5 for date/time stamp, so I tried to find the file/code it uses for that, but no luck.
Any tips? Looking for something like a batch file I can assign a KB shortcut to use across text editors, Word, or whatever. Thanks!
What it sounds like you are looking for would be a key macro. The functionality you are describing is implemented within the program itself, and is not available for global usage throughout the OS.
As you are on Windows XP I am not sure what options are available without a software installation. There is no built in macro recorder for Windows XP unfortunately.
If you are in Word, then you could use the built in Office macros to accomplish this. How exactly depends on your version of Office.

upgrade vb6 project using msdxm.ocx to wmp.dll

We have a legacy vb6 application that uses an ancient windows media player component, msdxm.ocx, to embed ultrasound (pregnancy) video's in the medical record.
This doesn't work any more on Windows 7: it has a newer version of msdxm.ocx which cannot be referenced from vb6.
The newer version of the embeddable player is wmp.dll, so we are planning to upgrade the application to the newer version for Windows 7.
Before we have to find it all out the hard way by ourselves: does someone have experience with this upgrade from msdxm.ocx to wpm.dll? Is there a list of things to consider when upgrading? Or a table to convert constants and events from the first to the second?
I haven't seen anything listing their object models side-by-side or offering any "conversion."
The msdxm.ocx was really a scriptable IE object and should not have been used in VB6 programs. Lots of people did though. Windows 7 still has this OCX but starting with Vista (or perhaps IE7?) its interfaces changed in a way that seems to prevent use in VB6 programs.
You might want to try running a tool like ActiveX Documenter aginst working versions of both libraries to assist your efforts though. The RTF output documents might be a starting point for writing your own conversion guide.
msdxm.ocx should still work if you put the OCX file in C:\Windows\SysWOW64 and register it.
I've tried on my Win7 and it works on my music player legacy app.
Don't know about Windows 8 though, but it might still be the same, MS might changed folder again then.

MFC localization not working with MUI install of Windows 7

OK, so we're writing our MFC application to make use of the built-in localization support with satellite DLL's since MFC 7. Everything seem to be working fine, except that my Windows 7 Enterprise Edition install with MUI support and using a Swedish UI instead of an English UI still displays the English UI in our application.
The application uses Swedish as its default language, with an English localization DLL in the form AppNameENU.dll, so MFC is actually intentionally switching to English language under these circumstances, as if it's not caring for the user choice in the MUI-enabled Windows OS, and only the default shipping language of the Windows install?
From the MSDN page on this (the link above), I read it as MFC should actually take these settings into account though, but I'm not 100% sure. Can someone please clarify?
It's because the MFC support for language selection has a design bug: It will decide to load resources from the exe only if no DLL match user OR system language.
In your case: It sets up its (ordered) list of languages as such:
Swedish (User language)
English (System language)
Then it looks up your DLLs (Bug: only the dlls, not the exe!): No match for Swedish. But there's a match for English!
Solution: Use my CLanguageSupport class. It works fine even in your use case.
Feel free to use it. You'll need only a couple of minutes to incorporate it into your app and it uses the exact same DLL scheme as the one you already implemented. (Hint: Don't forget the step where you must get rid of the CWinApp::InitInstance() call!)
In addition, if you are interested (this is optional), you can get an automatic languages menu to let user pick his own preference in case the default is not what he wants.
And if you're looking for a great tool to help you manage your translations, think appTranslator ;-)
HTH,

What's in your Utility Toolkit? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
Some of the most efficient engineers, developers and IT professionals I know usually carry around a common "toolkit" of useful programs, add-ins or utilities which help them for day-to-day debugging, developing or designing.
The question is:
What is in your utility toolkit.. What tools couldn't you live without?
Unix Utilities for Windows
Ack
Its like grep, but better, faster, and does more what you want to generally do with large source collections. Written in Perl, and does complete PCRE because of this. Recursive traversal is default, and it intelligently skips files that are unlikely to match using file-type identification to short cut.
( This means it automatically avoids traversing .svn/.hg/.git directories and thus gives massive speedups )
ack "function\s+foo\s*\(" --php
# find the definition of "foo" in all php files
# decendant of the current directory
Total Commander (GREP, FTP, ZIP, it's all here...I'm not even starting on this one)
Notepad++
WinMerge
Python. Seriously. I use it for a lot of small stuff. I also like to use the command line module for creating easy little project specific "shells" that I drop in frequently used queries etc. (show all tables in the projects db, search for stored procedures etc. - yeah, doing a lot of t-sql lately...)
I tend to accompany big c#/t-sql projects with a little python script that extends the cmd.Cmd class to give me a small collection of helpful queries etc. that I can use to poke around in the database.
Also, I often use python to modify input data (often csv files, but any junk will do) into insert statements etc. Or do plausibility tests on that data.
Currently on my thumbdrive (not ALL software):
Notepad++
.NET Reflector
develop (incase I need a quick IDE setup on a different computer)
C# Default Keybindings pdf
Math tables pdf
Boo Primer pdf
MSDN C# & VB Example projects
My Utility toolkit would have:
1.) Hex Editor - XVI32, or any other
2.) Beyond Compare - Comparison of files
3.) Cygwin shell installable complete with perl, gcc,gprof,gcov,gdb and related tools,bash,vim, development/debugging tools
4.) A model makefile for *nix platform
5.) Winzip utility
6.) Source insight or any other good code browsing tool
7.) Ghostscript and GSView
8.) PDF reader
9.) Good quick antivirus tool/exe
-AD
Currently in Thumbdrive\Tools.
"Edit Plus 3" - lightweight editor that I've been using for ages.
"F# - 1.9.6.2" - great for when I need to throw something togheter since it's usable without an IDE, also a great language for many tasks.
"ildasm"
"Sysinternal Procmon" - great for debugging and getting a feel for what the machine is really doing.
I have the following tools on my USB thumd drive:
SysInternals Suite All their great troubleshooting tools in one download, in case I might need a tool that I didn't download before
WireShark setup
VNC binaries (so I can run the viewer directly from USB) and setup
A couple of Portable Apps:
Notepad++ Portable
Putty Portable
FileZilla Portable
7-zip Portable
Sumatra PDF Portable
WinMerge Portable
I use/carry with me:
.Net Reflector
The SysInternals
Suite (particularly Process Explorer, Debug View etc)
Exescope
Orca (Windows Installer)
Depends
Spy++ OleView
Resourcer
Ethereal
IE Dev toolbar
Depends .Net
DocView
LDP (For LDAP)
Just to name a few
I do a full install of cygwin. It gives me 95% of the stuff I need and hard drive space is cheep. It's a lot easier to install everything then get emacs, gcc, gdb, perl, utilitys such as grep and awk, not to mention the servers it comes with like Apache and MySQL if you want to try something out quick.
grep gives you the biggest bang for the buck. You can use it to search on any type code and many forms of data. It is fast, and very powerful. In code it can locate what you're looking for in variables and function names, but also in comments. You can also pipe results into it, and can thus enhance the utility of many tools available on site.
With some clever hints you can easily make grep search for a specific type of an identifier. For instance, "^function_name" will often find in C code a function's definition, because these start with the name of the function at the beginning of the line. If a search pattern gives you too many false matches, you can filter those out, by piping the result through grep -v.
Many years ago I was stranded debugging COBOL programs on a 1970s-era Perkin Elmer machine running OS/32. The machine lacked programming tools, but had an ancient C compiler (so old, it would accept =+ as the original form of the += operator). I ended up writing a rudimentary grep program, which immensely improved my productivity.
Notepad ++
FF + Firebug
Jquery + bunch of plugins
DBManager
Cygwin for error tracking
Google for help
Docs in CHM & Cheatsheets
I always seem to have a bootable Linux Distro on me in SOME form or other. Whether it be the bootable Pen Drive I keep attached to my Keys, or the multitude of LiveCDs I have for various "diagnostics" - I find that if I am in a situation, generally, where I'd need some sort of tools... a reboot into a Live environment provides me with near enough everything I need, and more
PE Explorer
FAR Manager (great file manager especially when working with lots of ftp sites)
FlexHex
Ida
OllyDbg
Emacs. It's my "does list of things" tool, helpful with quick calculations, with mangling configuration files (I work as a network engineer, there is an awful lot of configuration to be done, lots of it bordering on trivial to generate with either small snippets of code or careful use of keyboard macros).
Here's the tools I use to make Sharepoint solutions:
Visual Studio Team Suite 2008
VSTS Database Edition GDR
Sandcastle
DocProject for Sandcastle
.net Reflector
GhostDoc
CSS Vista
Sharepoint Inspector
Sharepoint Explorer
EditPadPro
CodeSmith 2.6 Freeware (with my own .net 3.5 SP1 gui)
Indigo Rose MSI Factory
Wix
Nmap
Wireshark
Fiddler
Adobe Photoshop CS3
Expresso (Regex tool)
VMRCPlus
Powershell 2 CTP
Quest PowerGui for Powershell
IIS Resource Kit
HyperV
Tools I use because you do not have to install, just drop on system and use:
Agent Ransack
7-zip
PSPad
Robocopy : Need to extract from Windows 2003 resource kit (just grab the .exe)
Fast image viewer that has been around for a long time and proven to work.
IrfanView
ide: visual studio / netbeans (zip file!, almost portable)
editor: notepad++ (portable) with monaco font
file comparison: winmerge (portable)
source control: subversion, tortoise
ticket control: redmine
file manager: free commander (portable)
explorer: IE, FF (portable), chrome (portable), iron (chrom without google crap, also portable), qtweb, arora,
FF plugins: firebug, web developer, xmarks
imclient: pidgin
mail client: gmail
download manager: free download manager (portable)
sites: STACKOVERFLOW!!!, gotapi... and google, all the time...
miscelaneous: launchy (can't live without it!)
virtualization: virtual box (I have a machine image for every environment)
office: openoffice (portable)
lamp stack: xammp (portable!)
disk usage: windirstat (portable), scanner (portable)
pdf viewer: foxit (portable), sumatrapdf (portable)
uncompressor: 7-zip portable
M$ sql comparison tool: sql delta
M$ sql management: visual studio sql manager
mysql
mysql management: phpmyadmin, manager provided with mysql
uninstaller utility: revo unistaller (portable)
registry cleaner: ccleaner (portable)
ftp: filezilla (portable)
as you may have noticed, I have a special predilection for portable applications...
gVim
VS2010 Express
Firefox + Firebug
System Rescue CD
A collection of very useful utilities on a Live CD
There are two tools I simply can't work without
PowerShell
GVim (or really any vim style program)
These tools are so heavily ingrained into my daily routine and greatly increase my productivity.
Since I'm often working on different workstations, I've got into the habit of tagging the stuff that I install on delicious:
http://delicious.com/DavidSchmitt/stdsw
wc.exe (from http://unxutils.sourceforge.net/) so handy.
WinRAR and puTTY. That is all I need (i'm assuming internet doesn't count).
.Net Reflector
Powershell
Stackoverflow.Com
I like to program in Python so I have created a portable Python programming environment on a thumbdrive.
Portable Python 1.0
SPE Python editor
wxPython in Action ebook
Python How to Program ebook
Several Python ebooks from O'Reilly
Various tutorials for Python tools I don't use often
Development Tools
Subversion
Tortoise SVN
Useful tools/utils
Virtual Cd Control Tool
Linq Pad
Reflector
Subversion Commit Monitor
BGInfo
SourceGear Diff Merge
Unlocker
MWSnap
Paint.NET
WinRar
FireFox Add Ons
Firebug
ColorZilla
Visual Studio Add Ins
GhostDoc
The utility toolkit or the Tools List that every developer should have described in the following link from Scott Hanselman:
Scott Hanselman's Ultimate Developer and Power Users Tool List for Windows
I use Espresso (I got it with the MacHeist bundle!), and Firebug for coding. I use Photoshop if I need any images.
I manage my projects with The Hit List.

Resources