wshshell.exec and UAC issue when trying to install package using VB script, HELP
This one has puzzled me for some time now and I do not know what is causing this it. Basically I am running an install of dynamics AX 2009 including pre-requisites, but when it attempts to initiate the install using wshshell.exec method it returns "wshshell.exec: the requested operation requires elevation" error code 800702e4 . However I can get around this using runas administrator by right clicking on cmd.exe and using "Run as administrator" and that works. I need this to work from the command line as it is part of an OS deployment post software install task. The user is an administrator of the machine as they are part of the local admin group also. Is this an issue with UAC and vbscript function? or is there some configuration that I need to apply to the machine. Surely the OS should be able to handle application elevation when running a script as an administrator?? BTW the UAC local setting is at its lowest and the OS is Windows 7 with all the latest updates.
December 21st, 2010 9:21am

However I can get around this using runas administrator by right clicking on cmd.exe and using "Run as administrator" and that works. I need this to work from the command line as it is part of an OS deployment post software install task. this is the way UAC works. With UAC you have a filtered token with user rights until you request admin rights (full admin token) by selecting "Run as admin": http://windows.microsoft.com/en-US/windows7/How-do-I-run-an-application-once-with-a-full-administrator-access-token André"A programmer is just a tool which converts caffeine into code" CLIP- Stellvertreter http://www.winvistaside.de/
Free Windows Admin Tool Kit Click here and download it now
December 21st, 2010 10:50am

Andre, Thanks for your reply. So where does this leave enterprises that need to rollout apps via SCCM or OSD sequences? These apps need to be installed silently, without any pop ups whatsoever. Thanks
December 21st, 2010 10:57am

turn OFF UAC, run the scrips and in the last step turn UAC on and reboot the PC."A programmer is just a tool which converts caffeine into code" CLIP- Stellvertreter http://www.winvistaside.de/
Free Windows Admin Tool Kit Click here and download it now
December 21st, 2010 11:27am

Andre, UAC is switched off albeit the slider bar is at its lowest. Thats my issue! Thanks
December 22nd, 2010 3:58am

I have set up the group policy settings for UAC and I can confirm that they are applying to the computer also; UAC: Admin Approval mode for built-in administrator account = disabled UAC: behaviour of the elevation prompt for administrators in admin approval mode = elevate without prompting UAC: Detect application installations and prompt for elevation = Disabled UAC: run all administrators in admin approval mode = Disabled.
Free Windows Admin Tool Kit Click here and download it now
December 22nd, 2010 4:13am

And this doesn't work?"A programmer is just a tool which converts caffeine into code" CLIP- Stellvertreter http://www.winvistaside.de/
December 22nd, 2010 10:31am

Hi, Thanks for posting in Microsoft TechNet forums. As this thread has been quiet for a while, we assume that the issue has been resolved. At this time, we will mark it as ‘Answered’ as the previous steps should be helpful for many similar scenarios. If the issue still persists, please feel free to reply this post directly so we will be notified to follow it up. You can also choose to unmark the answer as you wish. BTW, we’d love to hear your feedback about the solution. By sharing your experience you can help other community members facing similar problems. Thanks for your understanding and efforts. Best Regards Magon Liu TechNet Subscriber Support in forum. If you have any feedback on our support, please contact tngfb@microsoft.com Please remember to click Mark as Answer on the post that helps you, and to click Unmark as Answer if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
Free Windows Admin Tool Kit Click here and download it now
December 24th, 2010 6:00am

Hi, Thanks for posting in Microsoft TechNet forums. There is no option in Security Center or group policy to prevent the security warning balloon from appearing but it can be disabled via the registry. 1. Go to Start-> type Regedit in the search bar and navigate to the following key: 2. HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Security Center 1.Add the following value: Data Type: DWORD Value Name: UACDisableNotify Value: 1 2.Restart the Security Center service for the change to take effect. By the way, to turn off UAC, the easier version, go to start->control panel-> security center. expand the other security settings bar at bottom of list then click turn off user account control.. Best Regards Magon Liu TechNet Subscriber Support in forum. If you have any feedback on our support, please contact tngfb@microsoft.com Please remember to click Mark as Answer on the post that helps you, and to click Unmark as Answer if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
December 27th, 2010 1:55am

Ok, after investigating this further it seems that the UAC group policy settings only apply when the computer has been restarted. So that explains why the install was failing with a permission denied error when calling the VBS file. However, i have an issue when trying to use a "run command line" task to install dynamics client 2009 during OS deployment using TS. What I do know is this: 1 - When running the install of Dynamics AX 2009 using axsetup.exe with silent command line parameters (using "run command line" task) it fails with error 1603. The event log fails on "Failed to grab execution mutex error 5". 2 - When the OS is built, the app is obviously not installed and I try a run as the user that I used in the "run command line" TS and it fails with a permissions error. On a reboot, the UAC policies are applied and I try the runas again as the same user and it works fine! BTW the runas user is part of the localadmins group. Is this why this TS step is failing during OSD. BTW the step is running after the configure "Windows and Config manager" step so it is out of WinPE mode. The step simply calls an installation VBS file e.g. install.vbs and runas user is selected. Is this a UAC error? how can I get around this restriction during OSD TS? Dynamics AX 2009 can only be installed as a domain user with local admin rights, so installation with system account would fail. I have looked through the documentation for AX and TS and I am unable to come up with anything on this one. So in a nutshell, how can I get an install of software that requires domain user account with local admin rights to work in a TS OSD environment?
Free Windows Admin Tool Kit Click here and download it now
January 6th, 2011 5:59am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics