mikelf
2008-02-01, 05:42 PM
I'm trying to create a LISP file by writing Visual LISP and LISP.
I want it to find a key in the Windows registry, and if it doesn't find it, then return nil.
If it does find it, change the key.
Here is what I have so far, and it works. My probilem is the part that says "CADWorx 2007". I want it to find this key, and if it doesn't, then return nil, but if it does find it, use the code below to change the key. Then I want it to search for the same thing, except it says "CADWorx 2008". If it finds it, change the key (using the code below),and if it doesn't find it, then return nil.
(defun C:test ()
(vl-registry-write "HKEY_USERS\\S-1-5-21-1794388629-2076409663-1235820382-4565\\Software\\COADE, Inc.\\CADWorx 2007\\Plant\\Settings"
"Configuration 17" "J:/CAD/CADWorx System Config Files/test.cfg")
)
Any help is greatly appreciated.
Moderator Note:
How to use [ CODE ] tags... (http://forums.augi.com/misc.php?do=bbcode#code)
I want it to find a key in the Windows registry, and if it doesn't find it, then return nil.
If it does find it, change the key.
Here is what I have so far, and it works. My probilem is the part that says "CADWorx 2007". I want it to find this key, and if it doesn't, then return nil, but if it does find it, use the code below to change the key. Then I want it to search for the same thing, except it says "CADWorx 2008". If it finds it, change the key (using the code below),and if it doesn't find it, then return nil.
(defun C:test ()
(vl-registry-write "HKEY_USERS\\S-1-5-21-1794388629-2076409663-1235820382-4565\\Software\\COADE, Inc.\\CADWorx 2007\\Plant\\Settings"
"Configuration 17" "J:/CAD/CADWorx System Config Files/test.cfg")
)
Any help is greatly appreciated.
Moderator Note:
How to use [ CODE ] tags... (http://forums.augi.com/misc.php?do=bbcode#code)