Over the past few weeks I have been fighting to get macros to work on my Windows 7 64bit machine. The thing that had me baffled was that everything worked a few months back when I began writing the macro and when I resumed my work on it, all of the sudden it would not run for me. After browsing the forums and the web I decided to contact my VAR about this issue.
The thing that I could not understand was that I could get the macro to run on a Windows XP 32bit machine and I also sent it to a user in our area that was running the exact same setup as me (Windows 7 64bit, SolidWorks 2010 SP2.1) and he could run it as well. So what was causing this weird behavior? User Account Control!
So what is User Account Control? Here is Wikipedia’s description:
User Account Control (UAC) is a technology and security infrastructure introduced with Microsoft‘s Windows Vista, Windows Server 2008 and Windows 7 operating system. It aims to improve the security of Microsoft Windows by limiting application software to standard user privileges until an administrator authorizes an increase or elevation. In this way, only applications trusted by the user may receive administrative privileges, and malware should be kept from compromising the operating system. In other words, a user account may have administrator privileges assigned to it, but applications that the user runs do not inherit those privileges unless they are approved beforehand or the user explicitly authorizes it.
To reduce the possibility of lower-privilege applications communicating with higher-privilege ones, another new technology, User Interface Privilege Isolation is used in conjunction with User Account Control to isolate these processes from each other. One prominent use of this is Internet Explorer 7‘s "Protected Mode".
So how did I fix the problem I was having? I simply turned off UAC, rebooted my system, and the macro ran perfectly. Then I slowly moved my UAC settings back to where they were previously and the macro continued to run. I am now back to the original UAC settings and everything is working as expected. You can find the UAC setting by going to Control Panel > User Accounts:
And then select “Change User Account Controls settings” which is right under the “Change your picture” option. Then slide the bar to your desired security level.
So if you are experiencing “odd” behavior with SolidWorks in Windows Vista or Windows 7 you might want to change these settings and see if it fixes your problems.
Thanks Jason. UAC should be off by default. So annoying. What else are you doing to setup swx with win 7?
Pingback: making the switch to windows 7 « rocksolid perspective – jason raak