第一件事情是注册表,老外写的,不过我说有试过(有谁试过的,请告诉我)
(defun RemoveFromStartupSuite (filename / Default
File_List Fn Index
Regpath Revision Startuppath
Version
)
;; codeHimBelonga kdub 2010.11.27
;;
(setq Regpath "HKEY_CURRENT_USER\\Software\\Autodesk\\AutoCAD"
revision (vl-registry-read regpath "CurVer")
version (vl-registry-read
(setq regpath (strcat regpath "\\" revision))
"CurVer"
)
default (vl-registry-read
(setq
regpath (strcat regpath "\\" version "\\Profiles")
)
)
startupPath (strcat regpath
"\\"
default
"\\Dialogs\\Appload\\Startup"
)
index 0
file_list '()
)
(while (setq fn (vl-registry-read
startupPath
(strcat (itoa (setq index (1+ index))) "Startup")
)
)
(setq file_list (cons fn file_list))
)
(setq index 0
filename (strcase filename)
)
(vl-registry-delete startupPath)
(vl-registry-write startupPath)
(foreach entry (reverse file_list)
(if (not (vl-string-search FileName (strcase entry)))
(progn (vl-registry-write
startupPath
(strcat (itoa (setq index (1+ index))) "Startup")
entry
)
(vl-registry-write startupPath "NumStartup" (itoa index))
)
)
)
(setq index 0
file_list '()
)
(while (setq fn (vl-registry-read
startupPath
(strcat (itoa (setq index (1+ index))) "Startup")
)
)
(setq file_list (cons fn file_list))
)
)
|