Based on such a premises, recently I got a task to design a client side tool for that will check several services/resources, which would narrow detection of potential errors on client side. You know when user says "Database is down!" or "I cannot logon to database" that real problem is probably far from mentioned, and that mentioned is only the consequence of the core problem. Such a tool should obey several conditions at the very begging:
- Windows compatible for XP, Vista, Windows 7 on x86/x64 platforms
- Should have nice and clear GUI for average user
- There should be no installation
- Ordinary Windows user (not Administrator) should be able to run such a tool
- Regional settings independent
- Should fulfill all required checking
Regardless that this idea was ridiculous in first moment, his insistence on this kind of solution, put me in totally different direction which I didn't like in first moment only because of lack of experience. However, very soon (as many times before, after reading some materials on google), idea to develop Microsoft HTML Application seems very original and handy for this purpose.
HTA is special kind of WEB browser based application that runs only in MS Internet Explorer browsers, without any additional IIS or any other WEB server beside. It's embedded ActiveX support, perfectly fit any need for doing any deeper operation, far beyond any WEB based application.
One file supportBecause HTA tool approach perfectly fit our need, firstly I placed pictures in three additional files (picture presentations for "?", "OK", "Bad" result) and connect them as link in HTA application. But this has to be put in single HTA file-without any external files. When I was stuck, I got amazing support from our programmers gurus, Tomislav Bacinger and Joso Mrša. They have encoded (Mime Base64 type) picture files in three separate variables, all put as declarations in HTA file. Then in the run time, these values were decoded and shown as real pictures. Very fast, very original and very flexible!! Bravo!
Unfortunately, chief, encouraged with our cool and fast progress, gave us another condition-HTA tool must be compatible with IE6-IE9 browsers. And IE6/IE7 was unable to decode such a values without external decoders. Because external decoder was not acceptable I was stuck again.
Then, again, comes to play our gurus and define pictures as pure div styles-solution which may be nothing for them but was Universe for me! And this was OK even for IE6/IE7 browsers. Perfect, now I was able to finish mine task to the end and concentrate on pure VBscript codding.
What can this tool do?Regardless this is called "client side tool", this tool can be run on any kind of Windows machine. This tool can:
- Check presence and connectivity through PC network card
- Check connectivity to www.google.com
- Check pure ping one file server (in mine case server where some forms were placed as ordinary windows share)
- Check is file share is available (on mentioned file server)
- tnsping/tnsping80 availability (some of clients were using Forms 6 with tnsping80 and some of them were having tnsping utility)
- Check is application server available and running (on load balance path, and on single two nodes separately)
- Database availability.
- For that I have created one oracle user TEB_TEST in all three database.
- The whole statement for that was:
grant create session to teb_test identified by teb_test;
- Main part is to perform
select 'OK' from dual;on all datbases-HDB, HLDB and TRX.
- Keep in mind that I have show both ways how to test availability (OraOLEDB as well as Microsoft ODBC for Oracle), but if you have just one type of connection i.e. Forms 6, which use TNS names entries, then you should not use other then "Microsoft ODBC for Oracle" connection. However look in source to see differences and reduce to your need
- Check is primary or backup route used. This was really important because when something on client side is slow. Usually the cause was use of backup connection, which is not so fast as primary network. So this tool can prove this question as well
WarningIf you run a tool over the network you'll probably hit a warning like this:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\1 Create/Change DWORD key 1406 with value "0"
The codeSource code of this client side tool is here with instruction to rename file from ".htax" to HTA because of many security reason that might be a problem in downloading this file with original extension. After that rename/replace your values and add/remove checking that you need. And this is all!
The Endregardless I'm not a fun of MS only based solutions, the easiness of development, maintenance and implementation is really something that in this case beat all other solutions.
For end, this is totally free tool until application title is not changed. Think this is not too much.
If you find this tool useful or find some bugs or improvements, please let me know-I'd rather see that.
Until then cheers!