Author Topic: Windows 7 - UAC Issues  (Read 2941 times)

0 Members and 1 Guest are viewing this topic.

snownut2

  • Swamp Rat
  • Posts: 971
  • Bricscad 22 Ultimate
Windows 7 - UAC Issues
« on: July 31, 2013, 06:49:57 PM »
Any one else having issues with the Windows UAC security settings being set to high.  Is there any way to ensure that a LISP function will complete its task, especially if writing files etc.


dgorsman

  • Water Moccasin
  • Posts: 2437
Re: Windows 7 - UAC Issues
« Reply #1 on: July 31, 2013, 06:57:37 PM »
Thats kind of the point of the UAC - to keep programs from automatically doing potentially dangerous things.   :police:
If you are going to fly by the seat of your pants, expect friction burns.

try {GreatPower;}
   catch (notResponsible)
      {NextTime(PlanAhead);}
   finally
      {MasterBasics;}

trogg

  • Bull Frog
  • Posts: 255
Re: Windows 7 - UAC Issues
« Reply #2 on: August 01, 2013, 08:12:47 AM »
We are constantly fighting the UAC.
It prevents AutoCAD and CADWorx profiles from being written to the registry.
It also prevents the users from dragging and dropping files to different folder when using ProjectWise even when it is only bumped up one notch.
Yet some IT updates seem to bump it up even though we request that they don't bump up the UAC...
~Greg

snownut2

  • Swamp Rat
  • Posts: 971
  • Bricscad 22 Ultimate
Re: Windows 7 - UAC Issues
« Reply #3 on: January 26, 2015, 04:22:39 PM »
Has anyone tried this approach to changing the UAC settings for specific directories;

Code - Auto/Visual Lisp: [Select]
  1. (defun unlockdir ( dir uname / str )
  2.   (if (vl-string-search "(x86)" (setq str (vl-string-trim "Microsoft Windows NT Version" (getvar 'platform))))
  3.     (setq str (atof(vl-string-right-trim "(x86)" str)))
  4.     (setq str (atof(vl-string-right-trim "(x64)" str)))
  5.     )
  6.   (if (> str 6.0)
  7.     (startapp (strcat "icacls " dir "\\ /T /E /G " uname ":f"))
  8.     (startapp (strcat "xcacls " dir "\\ /T /E /G " uname ":f"))
  9.     )
  10.   );defun
  11.  
  12. (unlockdir (vl-filename-directory (getvar 'menuname)) (getenv "username"))
  13.  

Any serious draw backs ?

Here is link to explanation -  http://ss64.com/nt/xcacls.html
« Last Edit: January 26, 2015, 05:13:14 PM by snownut2 »

ChrisCarlson

  • Guest
Re: Windows 7 - UAC Issues
« Reply #4 on: January 26, 2015, 04:53:44 PM »
Are you writing to a dir that AutoCAD needs permission to use? C:\Users\User\CAD_Temp has worked for us

snownut2

  • Swamp Rat
  • Posts: 971
  • Bricscad 22 Ultimate
Re: Windows 7 - UAC Issues
« Reply #5 on: January 26, 2015, 04:56:49 PM »
I've had issues modifying the the default menu file, to add toolbars to it. 

BlackBox

  • King Gator
  • Posts: 3770
Re: Windows 7 - UAC Issues
« Reply #6 on: January 26, 2015, 05:16:01 PM »
Any one else having issues with the Windows UAC security settings being set to high.  Is there any way to ensure that a LISP function will complete its task, especially if writing files etc.

No, but as I manage both CAD & IT here, I've intentionally granted user permissions to AutoCAD-related folders, etc... User's don't need access to entire Program Files, or AppData folders, just those pertaining to the product(s) with which they work... Perhaps you can request same from your IT group?



Has anyone tried this approach to changing the UAC settings for specific directories;

Code - Auto/Visual Lisp: [Select]
  1. (defun unlockdir ( dir uname / str )
  2.   (if (vl-string-search "(x86)" (setq str (vl-string-trim "Microsoft Windows NT Version" (getvar 'platform))))
  3.     (setq str (atof(vl-string-right-trim "(x86)" str)))
  4.     )
  5.   (if (> str 6.0)
  6.     (startapp (strcat "icacls " dir "\\ /T /E /G " uname ":f"))
  7.     (startapp (strcat "xcacls " dir "\\ /T /E /G " uname ":f"))
  8.     )
  9.   );defun
  10.  
  11. (unlockdir (vl-filename-directory (getvar 'menuname)) (getenv "username"))
  12.  

Any serious draw backs ?

Here is link to explanation -  http://ss64.com/nt/xcacls.html

I just use these from the File Explorer context menu instead.

... This to Unblock one or more files at a time:

Code - Microsoft Registry: [Select]
  1. Windows Registry Editor Version 5.00
  2.  
  3. [HKEY_CLASSES_ROOT\*\shell\powershell]
  4. @="Unblock Files"
  5. "Extended"=""
  6. "HasLUAShield"=""
  7. "Position"="Bottom"
  8.  
  9. [HKEY_CLASSES_ROOT\*\shell\powershell\command]
  10. @="C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\powershell.exe Unblock-File -LiteralPath '%L'"
  11.  


... And this to Take Ownership of a given folder:

Code - Microsoft Registry: [Select]
  1. Windows Registry Editor Version 5.00
  2.  
  3. [HKEY_CLASSES_ROOT\*\shell\runas]
  4. @="Take Ownership"
  5. "Extended"=""
  6. "HasLUAShield"=""
  7. "Position"="Bottom"
  8. "NoWorkingDirectory"=""
  9.  
  10. [HKEY_CLASSES_ROOT\*\shell\runas\command]
  11. @="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant administrators:F"
  12. "IsolatedCommand"="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant administrators:F"
  13.  
  14. [HKEY_CLASSES_ROOT\Directory\shell\runas]
  15. @="Take Ownership"
  16. "Extended"=""
  17. "HasLUAShield"=""
  18. "Position"="Bottom"
  19. "NoWorkingDirectory"=""
  20.  
  21. [HKEY_CLASSES_ROOT\Directory\shell\runas\command]
  22. @="cmd.exe /c takeown /f \"%1\" /r /d y && icacls \"%1\" /grant administrators:F /t"
  23. "IsolatedCommand"="cmd.exe /c takeown /f \"%1\" /r /d y && icacls \"%1\" /grant administrators:F /t"
  24.  



I've had issues modifying the the default menu file, to add toolbars to it. 

Like my first comment above, you, or someone more qualified needs to effectively communicate how locking users out of all files/folders is actually hindering your ability to be more efficient/proficient. You're not asking for everything, and instead reasonably asking for only permissions to AutoCAD-related folders. Presented correctly, I cannot imagine why this would be an issue (and I'm also IT/Server admin!).

If they don't go for it, or have concerns, let me (us?) know... I'm certain we can help to clarify the legitimate need here, for them to properly assess within the confines of their Vogon-like policies. :-)

Cheers
« Last Edit: January 26, 2015, 05:34:29 PM by BlackBox »
"How we think determines what we do, and what we do determines what we get."