Skip to main content
FORUM PLAN UPDATE: Date revision: This forum will remain open to new posts and responses until December 1, 2018. (After that date, you will still be able to view and search the forum.) Also, we're taking a second look at the best place to host future conversation. For now, keep using this forum, and stay tuned for more news.
 
developerWorks
AIX and UNIX
Information Mgmt
Lotus
New to Lotus
Products
How to buy
Downloads
Live demos
Technical library
Training
Support
Forums & community
Events
Rational
Tivoli
WebSphere
Java™ technology
Linux
Open source
SOA and Web services
Web development
XML
My developerWorks
About dW
Submit content
Feedback



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)

Sign in to participate 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";
lstrRegKeyChoices := "HKEY_CURRENT_USER": "HKEY_LOCAL_MACHINE";
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
Comments:





Printer-friendly

Search this forum


Sign In or Register

 Sign In or Register
Sign in
Forgot your password?
Forgot your user name?
Create new registration

Member Tools


RSS Feeds

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

Resources

 Resources
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

Wikis

 Wikis
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