Application Note 111: Running on Vista ======================================= In early versions of Windows there was essentially one user who had the right to do anything. But this presented a security problem - any malicious program that managed to worm its way onto the system also had full rights. To get around this problem Microsoft added the ability to support multiple users each with their own configuration. This allowed you to define a user who had restricted rights and an Administrative user who had full rights. Microsoft said you should do your normal stuff as user with restricted rights so that any malicious application that ran under your account had restricted rights also. However, this was not enough. Attacks became more and more sophisticated and took advantage of the default security settings in Windows. Microsoft countered by tightening up the settings, especially for normal users, through several patches. While this seemed to help, it had the side effect of making it more difficult to install and run many applications that required relaxing of particular security settings. As a result it became fairly common practice for many to forget about the normal user account and run as an administrator. The thought was: maybe I'm relaxing security but at least I can now get my work done. Microsoft has been telling us for a long time that they take security seriously. To prove that with Vista they completely redesigned Windows from the ground up with security in mind. The result is supposedly a much more secure system. Unfortunately what the more intense security of Vista means for most users is a much less enjoyable experience because security tends to get in your face. One thing Microsoft did with Vista is to make it much more difficult to elevate yourself to Administrator. Vista almost forces you to run as a normal user but gives you the option of running any task with Adminstrative privileges. The idea is that you must grant administrative rights on a case by case basis. (This is true even if you set your user account up as an administrator.) Unfortunately if you run an application that requires elevated rights Vista doesn't always let you know. Sometimes the application will fail with some obscure error message. However, if you tell Vista to "Run As Administrator" the application will probably work. One trick you can use is to create a desktop shortcut to run the application. If you click the Advanced button on the shortcut properties page you can check "Run as administrator". This will allow the application to run properly. Unfortunately there is no programatic way to set the "Run as administator" flag in a desktop shortcut. The consequence is that any shortcut (or start menu item) that an application's installation kit creates will not have the flag set. If the application requires elevated privileges then you have to edit the desktop shortcut manually. The reason for this is to prevent a malicious program from creating a shortcut that could run an application as administrator. Now here is the real zinger: Office applications are run as normal applications without any elevated privileges. Many of the operations you might perform with Access or Excel don't require elevated privileges, but referencing the Multiware libraries do. And it isn't enough to give elevated privileges to the Access MDB file or the Excel XLS file, you need to run the Access or Excel application as administrator. What this means is that you must run Access or Excel as Administrator in order for the Multiware applications to work. We have not found a way to set this up programmatically, but fortunately we have discovered a way to set it up manually. First locate the path to the Office application. The default location will be c:\Program Files\Microsoft Office\Office12\ and the file will be MSACCESS.EXE or EXCEL.EXE. Now click the start button, locate the Multiware application, right click and select Properties. In the Target field add the path to the Access or Excel application in quotes followed by a space in front of the target that shows there. Then click the Advanced button and select "Run As Administrator". Close the Properties screen. Now when you select the application from the start menu it should run automatically as Administrator. You can use exactly the same technique to modify your desktop shortcuts so that they run the application as Administrator too.