When coding, ensure that your program requests only as many resources as are
required by the application. A small C program I wrote which assists during
automagic installation of Lotus Notes R6 clients, queries the registry to find
the installation directory, using
RegOpenKeyEx(hive, path, 0L,
We then discovered (obviously), that the program doesn’t run correctly when invoked by and end user, if group policies limit access to the Windows Registry. Obviously: the fourth parameter to the RegOpenKeyEx function should be KEY_READ at most, if you only want to read. Duh!