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 6572947
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T15:04:12+00:00 2026-05-25T15:04:12+00:00

I just wanna do something like this (defun my-fun (reg-path) "reads the value from

  • 0

I just wanna do something like this

(defun my-fun (reg-path) 
  "reads the value from the given Windows registry path."
     ...??...
)

is there a built-in fn that does this?

or is there a command-line tool builtin to windows that I can run to retrieve a reg value?

The way I am imagining doing it, is to run a .js file in cscript.exe that does the work.


ANSWER

(defun my-reg-read (regpath)
  "read a path in the Windows registry. This probably works for string 
  values only. If the path does not exist, it returns nil. "
  (let ((reg.exe (concat (getenv "windir") "\\system32\\reg.exe"))
        tokens last-token)

    (setq reg-value (shell-command-to-string (concat reg.exe " query " regpath))
          tokens (split-string reg-value nil t)
          last-token (nth (1- (length tokens)) tokens))

    (and (not (string= last-token "value.")) last-token)))

==> Thank you to Oleg.

  • 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-25T15:04:12+00:00Added an answer on May 25, 2026 at 3:04 pm

    Use reg command line utility.

    Emacs command

    (shell-command "REG QUERY KeyName" &optional OUTPUT-BUFFER ERROR-BUFFER)

    allows you to run a shell command. The output is sent to the OUTPUT-BUFFER.

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

Sidebar

Related Questions

So i wanna do something like this in php. If i have a year
I just wanna know how to do an if -statement in simple HTML. Like
This thing has just came to my head and I wanna share it. Note
If I had something like this in many lines of my web page <span
Just wanna know, how do I must use this ? Do I just have
I just wanna draw a portion of a line. I'll try to be more
I just wanna ask if there's a way where I could put an object
I just wanna find out if there's a way I could minimize code clutter
I just wanna ask your opinion/suggestion on how to 'terminate' a running application/process is
I just wanna ask if there's a way in C#/ASP.NET to create 'dynamic' tables/fields

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.