找回密码
 立即注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

查看: 960|回复: 2

[求助] [求助]:如何用VLisp读取注册表内容

[复制链接]

已领礼包: 1个

财富等级: 恭喜发财

发表于 2003-6-27 00:12:49 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?立即注册

×
用VLisp读写HKEY_CURRENT_USER\Software\下的内容我会,但如何读写HKEY_CURRENT_USER\Software\Winamp下的内容,请指教。
论坛插件加载方法
发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;
如何回报帮助你解决问题的坛友,一个好办法就是给对方加【D豆】,加分不会扣除自己的积分,做一个热心并受欢迎的人!

已领礼包: 593个

财富等级: 财运亨通

发表于 2003-6-27 07:55:26 | 显示全部楼层
几个例子
  1. ;;; ProjectPaths.LSP
  2. ;;; Among other things it can save the paths
  3. ;;;  to a file that can be imported on another PC.
  4. ;;; By Jimmy Bergmark
  5. ;;; Copyright (C) 1997-2002 JTB World, All Rights Reserved
  6. ;;; Website: [url]www.jtbworld.com[/url] / [url]http://jtbworld.vze.com[/url]
  7. ;;; E-mail: [email]info@jtbworld.com[/email] / [email]jtbworld@hotmail.com[/email]
  8. ;;; Tested on AutoCAD 2000
  9. ;|(defun ReadProject-Settings (cprof)
  10.   (vl-registry-descendents
  11.     (strcat
  12.       "HKEY_CURRENT_USER\"
  13.       (vlax-product-key)
  14.       "\\Profiles\"
  15.       cprof
  16.       "\\Project Settings"
  17.     )
  18.   )
  19. )
  20. (defun ReadRefSearchPath (cprof ProjSet)
  21.   (vl-registry-read
  22.     (strcat
  23.       "HKEY_CURRENT_USER\"
  24.       (vlax-product-key)
  25.       "\\Profiles\"
  26.       cprof
  27.       "\\Project Settings\"
  28.       ProjSet
  29.     )
  30.     "RefSearchPath"
  31.   )
  32. )
  33. ;;; Ex: (AllProjPath (getvar "CPROFILE"))
  34. (defun AllProjPath (cprof / lst ProjSet)
  35.   (foreach ProjSet (ReadProject-Settings cprof)
  36.     (setq
  37.       lst (cons (cons ProjSet (ReadRefSearchPath cprof ProjSet)) lst)
  38.     )
  39.   )
  40. )
  41. ;;; Ex: (WriteRefSearchPath (getvar "CPROFILE") "Project1" "c:\temp;c:\project")
  42. (defun WriteRefSearchPath (cprof ProjSet path)
  43.   (vl-registry-write
  44.     (strcat
  45.       "HKEY_CURRENT_USER\"
  46.       (vlax-product-key)
  47.       "\\Profiles\"
  48.       cprof
  49.       "\\Project Settings\"
  50.       ProjSet
  51.     )
  52.     "RefSearchPath"
  53.     path
  54.   )
  55. )
  56. ;;; Deletes all Project paths
  57. (defun DeleteRefSearchPath (cprof)
  58.   (foreach ProjSet (ReadProject-Settings cprof)
  59.     (vl-registry-delete
  60.       (strcat
  61.         "HKEY_CURRENT_USER\"
  62.         (vlax-product-key)
  63.         "\\Profiles\"
  64.         cprof
  65.         "\\Project Settings\"
  66.         ProjSet
  67.       )
  68.     )
  69.   )
  70. )
  71. ;;; Ex: (WriteAllProjPath (getvar "CPROFILE") (list (cons "Project1" "C:\")
  72. ;;                                                  (cons "Project2" "D:\")))
  73. ;;; Deletes all old Paths first
  74. (defun WriteAllProjPath (cprof lst / ProjSet)
  75.   (DeleteRefSearchPath cprof)
  76.   (foreach ProjSet lst
  77.     (WriteRefSearchPath cprof (car ProjSet) (cdr ProjSet))
  78.   )
  79. )|;

论坛插件加载方法
发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;
如何回报帮助你解决问题的坛友,一个好办法就是给对方加【D豆】,加分不会扣除自己的积分,做一个热心并受欢迎的人!
回复 支持 反对

使用道具 举报

已领礼包: 1个

财富等级: 恭喜发财

 楼主| 发表于 2003-6-28 21:21:09 | 显示全部楼层
如图,我不知arj.fmt下面有多少内容,但我希望知道在arj.fmt下面有没有64dc8a....(红圈内数字),
请问如何读取
论坛插件加载方法
发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;
如何回报帮助你解决问题的坛友,一个好办法就是给对方加【D豆】,加分不会扣除自己的积分,做一个热心并受欢迎的人!
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|申请友链|Archiver|手机版|小黑屋|辽公网安备|晓东CAD家园 ( 辽ICP备15016793号 )

GMT+8, 2025-9-26 14:25 , Processed in 0.177072 second(s), 37 queries , Gzip On.

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

快速回复 返回顶部 返回列表