Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 230087
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T19:49:12+00:00 2026-05-11T19:49:12+00:00

I have a scenario where I need to put together a script to add

  • 0

I have a scenario where I need to put together a script to add an entry to the following registry key for the current user:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\LastVisitedMRU\

I am trying to find out the maximum number of values allowed in this key so that I can have my script tack another one onto the end. The value names start at the beginning of the alphabet but I don’t want to assume that they end at “Z”.

Background: We are re-packaging a proprietary (i.e. not our own, we don’t have access to the source) application and trying to set its default File -> Open location. After many painful snapshotting and File/Regmon sessions this seems to be the way to do it. I know it’s very hackish but it does work, I have tested the theory manually. That said, I am most certainly open to suggestions around how to do this in a more Win32-friendly way – under the assumption that the application doesn’t have a nicer mechanism of its own to do this.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T19:49:12+00:00Added an answer on May 11, 2026 at 7:49 pm

    This registry key holds, for each executable name, the directory that that application last did its SaveAs (and maybe Save, I’m not sure) in.

    Each letter holds information for one executable and the MRUList holds the order (this is important).

    Mine is maxed out at “y” and my MRUList is sxahmcjierfobglyuqpdtwvkn.

    From experimentation, when I do a SaveAs from an application that’s already there, it just replaces the information for that letter and moves it to the front of the MRUList.

    If the application isn’t there and not all the letters are in the MRUList, it grabs the first available letter, places the information into that letter, then puts that letter at the front of the MRUList.

    If the application isn’t there and all the letters are used, it grabs the last one on the MRUList, places the information into that letter, then moves it to the front of the MRUList.

    I note that doing a SaveAs for a brand new application doesn’t give me the z letter, it re-uses the last one in the `MRUList’.

    The keys themselves just look like UCS-2 (16-bit Unicode, ASCII with interspersed null bytes in my Australia version of Windows, your mileage may vary for international variants) and they hold the null-terminated executable name, then the null-terminated directory.

    And regarding your comment about not having access to the source of that application, it doesn’t matter. It’s not that application changing those keys. ComDlg32 is the common dialogs of Windows itself (Open, SaveAs, Print setup, etc).

    If you want to set the MRU for a given application, follow these steps.

    1/ Search for that application in the letter keys. If you find it, go to step 3.

    2/ Get the next letter available that’s not in the MRUList. If the MRUList already has all the letters a through y or you’re not confident that y will always be the last one (it may be configurable somewhere else in the registry), grab the last letter that is at the end of the MRUList.

    3/ Now you have your letter. Change or create that letter key with the UCS-2 data for your application and directory (both null-terminated).

    4/ Change the MRUList to put your letter at the front.

    There. That should do it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 123k
  • Answers 123k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer The expression *fileinrampointer is of type signed char, and it… May 12, 2026 at 12:59 am
  • Editorial Team
    Editorial Team added an answer It sounds like you are trying to store an acyclic… May 12, 2026 at 12:59 am
  • Editorial Team
    Editorial Team added an answer So far as I know, the standard Python shell doesn't… May 12, 2026 at 12:59 am

Related Questions

I have a situation where I'm starting a number of objects that, when they
Here is my scenario. For the example lets say that I need to return
In an aspx C#.NET page (I am running framework v3.5), I need to know
Consider a scenario where a Mirth channel has one or more Destinations. In this

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.