Last change
on this file since 3159 was 2832, checked in by sjboddie, 23 years ago |
* empty log message *
|
-
Property svn:keywords
set to
Author Date Id Revision
|
File size:
890 bytes
|
Rev | Line | |
---|
[2832] | 1 | #include <windows.h>
|
---|
| 2 | #include <stdlib.h>
|
---|
| 3 | #include <stdio.h>
|
---|
| 4 | #include <string.h>
|
---|
| 5 | #include <memory.h>
|
---|
| 6 | #pragma hdrstop
|
---|
| 7 |
|
---|
| 8 | int __stdcall WinMain(HINSTANCE Instance, HINSTANCE /*PrevInstance*/, LPSTR CmdLineStr, int /*CmdShow*/) {
|
---|
| 9 | HKEY hk1, hk2, hk3, hk4;
|
---|
| 10 | BOOL found = FALSE;
|
---|
| 11 |
|
---|
| 12 | // try to find the command to start the library
|
---|
| 13 | if (RegOpenKey(HKEY_LOCAL_MACHINE, "SOFTWARE", &hk1) == ERROR_SUCCESS) {
|
---|
| 14 | if (RegOpenKey(hk1, "New Zealand Digital Library Project", &hk2) == ERROR_SUCCESS) {
|
---|
| 15 | if (RegOpenKey(hk2, "Greenstone Digital Library Software", &hk3) == ERROR_SUCCESS) {
|
---|
| 16 | if (RegOpenKey(hk3, "2.37.000", &hk4) == ERROR_SUCCESS) {
|
---|
| 17 | found = TRUE;
|
---|
| 18 | RegCloseKey(hk4);
|
---|
| 19 | }
|
---|
| 20 | RegCloseKey(hk3);
|
---|
| 21 | }
|
---|
| 22 | RegCloseKey(hk2);
|
---|
| 23 | }
|
---|
| 24 | RegCloseKey(hk1);
|
---|
| 25 | }
|
---|
| 26 |
|
---|
| 27 | if (!found) {
|
---|
| 28 | // not installed, try to run the setup program
|
---|
| 29 | WinExec ("setup.exe", SW_SHOW);
|
---|
| 30 | }
|
---|
| 31 | return 0;
|
---|
| 32 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.