Keywordkid Posted August 6, 2013 Posted August 6, 2013 I know I'm probably trying to be too clever but I want to be able to set up AutoCAD to run our company cui with a personally named workspace for any user who logs on to a PC with AutoCAD installed. I have built and tested a working solution on my own login (with Admin rights) using a combination of a login script to merge a generic Arg file into the registry and using an AutoCAD startup scr and lisp programmes. I run it through multiple times and it works fine, I can see my scripts loading and running and when CAD opens I have my own named workspace based on a company standard but when I first logged in as a standard user the first run of AutoCAD starts but fails to complete. Here is what I have done: 1. Standard out of the box installation. 2. Export of default profile to maintain an unblemished AutoCAD startup. 3. Custom build of menus through the CUI interface. 4. Set up of Main CUI and Enterprise CUI's in the 'Options' dialogue. 5. Saved default workspace as a generic name for renaming to user. 6. Exported these customisations as a company ARG file. 7. Edited the ARG file to remove my username and added %username%: [HKEY_CURRENT_USER\Software\Autodesk\AutoCAD\R19.0\ACAD-B001:409\Profiles\SWD-ACAD-2013] "UserName"="%username%" 8. Run a login .bat to merge the ARG file at login. 9. Save custom shortcuts to fire the profile and login script to 'all users desktop' 10. Run the following startup routine, where SWD-2013 is my generic workspace name: (vl-load-com) (defun c:SetOrMakeUserWs (/ wsTemplate _WsCurrent user) ;; Change this string to be the name of the standard ;; workspace to be copied as the user workspace: (setq wsTemplate "SWD-2013") ;; _WsCurrent sub-function: (defun _WsCurrent (workspace) (if (vl-catch-all-error-p (vl-catch-all-apply 'setvar (list 'wscurrent workspace) ) ) nil T ) ) ;; ;; Main code: ;; ;; If you cannot set the user's workspace current ;; (meaining it does not exist) (if (not (_WsCurrent (setq user (getvar 'loginname)))) ;; Attempt to set the template workspace current (if (_WsCurrent wsTemplate) ;;(_WsCurrent wsTemplate) (progn ;; If successful, save the template workspace ;; as the user workspace (command "._wssave" user) ;; Now that the user workspace exists, set ;; it current (_WsCurrent user) (command "._workspace" "delete" "SWD-2013" "y") ) ) ) ;;(command "._workspace" "delete" "Default" "y") (princ) ) As I mentioned it works on my admin login. When I first attempted to run in another user I forgot to apply my startup .bat for registry merge and AutoCAD completed the first run but 'Fatal Errored', since this I have not been able to get passed the initialisation it just stops. I have tried removing the user profile and rebuilding and I have tried a completely new/different user profile but the same result. I am ready to try an uninstall and registry clean up but have a suspicion this will not fix it. I'm running these tests on a 32bit XP PC as it is all I have for testing but ultimately will be configuring for 64bit Windows 7. Please let me know if I'm being over optimistic or even stupid to try this! Thanks. Quote
Keywordkid Posted August 6, 2013 Author Posted August 6, 2013 I discovered it was the registry merge that was preventing the first run installation, must be the standard user limitation. Anyone got any suggestions on how to preload a profile? Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.