Skip to main content
This forum is closed to new posts and responses. New discussions are now taking place in the IBM Developer Answers forum.
Information Mgmt
New to Lotus
How to buy
Live demos
Technical library
Forums & community
Java™ technology
Open source
SOA and Web services
Web development
My developerWorks
About dW
Submit content

developerWorks  >  Lotus  >  Forums & community  >  IBM Lotus Notes/Domino 8.5 Forum (includes Lotus Notes Traveler)

IBM Lotus Notes/Domino 8.5 Forum (includes Lotus Notes Traveler)

Previous Next
Subject: SOLUTION: Button to query the Windows Registry (useful for Citrix etc.).
Feedback Type: Comment
Product Area: Other
Technical Area: Announcement
Platform: Windows
Release: Announcement
Reproducible: Not applicable

While chasing a Citrix/Lotus Notes issue today, I needed to read values from the Windows Registry that user Citrix sessions see (which are prohibited from running RegEdit), so wrote the following button - Hope it is useful for you in the future.

Create a Form, Memo etc. and add a new button, then paste in the code below. The button will allow you to read a value from the Windows Registry by specifying the Registry Key, Sub-Key and Value to retrieve (these are defaulted to show where the Internet Explorer 'Favorites' folder is set to).

e.g. if you want to read the registry that a Citrix session sees, run Lotus Notes under Citrix and then access/click the button from say a draft memo in your mail file.

[Button code starts below this line and is the rest of this post]

lstrProcessName := "Registry Value Query:";

REM {Variables to define where in the registry to look by default:};
lstrRegKeyDefault := "HKEY_CURRENT_USER";
lstrRegSubKeyDefault := "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders";
lstrRegValueDefault := "Favorites";

REM {Get user choices of where in the registry to look:};
lstrRegKey := @Prompt( [OkCancelCombo]; lstrProcessName; "Select primary Registry Key to search:"; lstrRegKeyDefault; lstrRegKeyChoices );
lstrRegSubKey := @Prompt( [OkCancelEdit]; lstrProcessName; "Enter Registry sub-Key to search under " + lstrRegKey + ":"; lstrRegSubKeyDefault );
lstrRegValueName := @Prompt( [OkCancelEdit]; lstrProcessName; "Enter Registry Value to display from " + lstrRegKey + " \\ " + @ReplaceSubstring( lstrRegSubKey; "\\"; " \\ " ) + ":"; lstrRegValueDefault );
lstrRegistryValue := @RegQueryValue( lstrRegKey; lstrRegSubKey; lstrRegValueName );

REM {Return the result:};
@If( @IsError( lstrRegistryValue );
@Prompt( [Ok]; lstrProcessName; "An error occurred attempting to read " + lstrRegKey + "\\" + lstrRegSubKey + "\\" + lstrRegValueName + "." )
@If( lstrRegistryValue = "";
@Prompt( [Ok]; lstrProcessName; lstrRegKey + "\\" + lstrRegSubKey + "\\" + lstrRegValueName + " is empty, or returned null." )
@Prompt( [Ok]; lstrProcessName; lstrRegKey + "\\" + lstrRegSubKey + "\\" + lstrRegValueName + " contains '" + lstrRegistryValue + "'." )

Feedback number WEBB8MKLXV created by James W. Stuart on 10/12/2011

Status: Open


Search this forum

Member Tools

RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS
More Lotus RSS feeds


Forum use and etiquette
Native Notes Access
Web site Feedback

Lotus Support

 Lotus Support
IBM Support Portal - Lotus software
Lotus Support documents
Lotus support by product
Lotus support downloads
Lotus support RSS feeds


IBM Composite Applications
IBM Mashup Center
IBM Connections
IBM Connections Cloud Developers
IBM Docs
IBM Forms
IBM Mobile Connect
IBM Sametime
IBM SmartCloud for Social Business
IBM Web Experience Factory
Lotus Domino
Lotus Domino Designer
Lotus Expeditor
Lotus Foundations
Lotus iNotes
Lotus Instructor Community Courseware
Lotus Notes
Lotus Notes & Domino Application Development
Lotus Notes Traveler
Lotus Protector
Lotus Quickr
Lotus Symphony
IBM Web Content Manager
WebSphere Portal

Lotus Forums

 Lotus Forums
Notes/Domino 9.0
Notes/Domino 8.5 + Traveler
Notes/Domino XPages development forum
Notes/Domino 8
Notes/Domino 6 and 7
IBM Connections
IBM Mobile Connect
IBM Sametime
IBM SmartCloud Notes
Lotus Enterprise Integration
Lotus Protector
Lotus Quickr
Lotus SmartSuite