Author Topic: Read Registry  (Read 3374 times)

0 Members and 1 Guest are viewing this topic.

Harrie

  • Guest
Read Registry
« on: July 23, 2011, 04:12:10 PM »
What is wrong in:
Code: [Select]
(vl-registry-read "HKEY_CURRENT_USER\\Control Panel\\Sound")and in
Code: [Select]
(setq shell (vlax-create-object "Wscript.Shell")
key   "Hkey-current-user\\Control Panel\\sound"
val   (vlax-invoke shell "regread" key)
  )

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Read Registry
« Reply #1 on: July 23, 2011, 04:52:55 PM »
maybe this:
Code: [Select]
_$ (vl-registry-read "HKEY_CURRENT_USER\\Control Panel\\Sound" "Beep")
"yes"
_$
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

HofCAD

  • Guest
Re: Read Registry
« Reply #2 on: July 24, 2011, 09:55:08 AM »
What is wrong in:
Code: [Select]
(setq shell (vlax-create-object "Wscript.Shell")
key   "Hkey-current-user\\Control Panel\\sound"
val   (vlax-invoke shell "regread" key)
  )

Maybe this(notice the underscore [ _ ] or understrike):
Code: [Select]
(vl-load-com)
(setq shell (vlax-create-object "Wscript.Shell")
key   "HKEY_CURRENT_USER\\Control Panel\\Sound\\Beep"
val   (vlax-invoke shell 'regread key)
 )
or
Code: [Select]
(vl-load-com)
(setq shell (vlax-create-object "Wscript.Shell")
key   "HKEY_CURRENT_USER\\Control Panel\\Sound\\ExtendedSounds"
val   (vlax-invoke shell 'regread key)
 )
Regards HofCAD CSI.
« Last Edit: July 24, 2011, 10:03:00 AM by HofCAD »

chlh_jd

  • Guest
Re: Read Registry
« Reply #3 on: July 30, 2011, 02:25:57 AM »
anthoer e.g.
Code: [Select]
  ;; Get CLSID from ProgID
  (defun GetClassID (ProgID)
    (vl-registry-read
      (strcat "HKEY_CLASSES_ROOT\\" progid "\\CLSID")
    )
  )
register activex services
Code: [Select]
;; Register hello ActiveX services,
;; if not already registered.
(defun Register (classid filename / server)
  ;; Register ActiveX server (dll/ocx)
  ;;
  ;; This requires RegSvr32.exe to be on the DOS path
  (defun RegServer (server)
    (startapp
      "regsvr32.exe"
      (strcat "/s \"" server "\"")
    )
  )
  ;; Get CLSID from ProgID
  (defun GetClassID (ProgID)
    (vl-registry-read
      (strcat "HKEY_CLASSES_ROOT\\" progid "\\CLSID")
    )
  )
  (cond
    ((GetClassID classid))
    ((not (setq server (findfile filename)))
     (alert (strcat " Error: Can't find file ("
    filename
    "),please put it in the 'support' folder!"
    )
     )
    )
    (t
     (regserver server)
     (or
       (GetClassID classid)
       (alert "Error: Can't register ActiveX Services, Please contact the author !")
     )
    )
  )
)
« Last Edit: July 30, 2011, 02:32:12 AM by chlh_jd »

Lee Mac

  • Seagull
  • Posts: 12922
  • London, England
Re: Read Registry
« Reply #4 on: July 30, 2011, 10:31:54 AM »
Didn't Tony Tanzillo write that?

chlh_jd

  • Guest
Re: Read Registry
« Reply #5 on: August 03, 2011, 03:11:16 AM »
Hi LeeMac ,  it come from the web,  at that time there's no author's info . I'll found the author .
Can you sure it's writen by Tony Tanzillo ?

Lee Mac

  • Seagull
  • Posts: 12922
  • London, England
Re: Read Registry
« Reply #6 on: August 03, 2011, 07:18:58 AM »
Can you sure it's writen by Tony Tanzillo ?

I think I remember seeing something like it on his site a while back, but his site is no longer available...   :|