-
- ;;; Install DynamicWrapper
- (defun C:InstallDynamicWrapperX (/ wrap name wsh oldVar)
- (if (null (setq wrap (vlax-create-object "DynamicWrapperX")))
- (progn
- ;;(setq name (vl-filename-mktemp "DynWrapX.dll"))
- ;;(WriteBinary name (vl-get-resource "DynWrapX"))
- (setq wsh (vlax-Create-Object "wscript.shell"))
- (vlax-invoke wsh 'Run (strcat "RegSvr32.exe /s " name))
- (setq oldVar (getvar "CMDECHO"))
- (setvar "CMDECHO" 0)
- (command "DELAY" "1000")
- (setvar "CMDECHO" oldVar)
- (vlax-release-object wsh)
- (setq wrap (vlax-create-object "DynamicWrapperX"))
- (if wrap
- (progn
- (princ "\nRegistered DynamicWrapperX successfully!\n")
- wrap
- )
- (alert "\nFailed to register DynamicWrapperX!\n")
- )
- )
- (progn
- (princ "\nDynamicWrapperX has been registered!")
- wrap
- )
- )
- )
- ;; Install it...
- (if (setq wrap (C:InstallDynamicWrapperX))
- (progn
- (vlax-release-object wrap)
- (setq wrap nil)
- )
- (princ)
- )
|