WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Manifest

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

UAC Manifest Setting Triggers 1129 Error

 Keywords: ObjectCreate CreateObject 1129 OLE Initiate Error UAC Manifest Setting UI Access UIAccess Requested Execution Level Standard User WinBatchStudio .WBT .WBT_HF .WBT_IF

Question:

I have a three line test script that fails with 1129 Ole initiate failed on the ObjectCreate statement, ONLY when run under the Standard user account with UAC on. Is this expected behavior? Can you not use IE COM server from a standard user account???

Details:

WinBatch 2012B 
Windows 7 
Standard User account 
UAC ON
Here is the .wbt file:
 
IE = ObjectCreate("InternetExplorer.Application")
IE.Visible = @True
IE.Navigate("http://www.winbatch.com", , ,"" , "")
Another strange thing is that that VBS equivalent runs just fine...
 
Set IE = CreateObject("InternetExplorer.Application")
IE.Visible = True
IE.Navigate "http://www.winbatch.com", , ,"" , ""
More importanly, the code seem sto work fine once I compile it into an EXE! How can this be explained?

Answer:

This is expected behavior, when running the default .wbt or running in the default WinBatchStudio.exe. That's how COM security works. It has to do with mandatory SACLs and/or a bunch of registry business.

Since you are running under the Standard user account with UAC on, you will need to make sure you are using the proper Manifest settings. Specifically the UIAccess setting. You will need to make sure the script is using IUAccess set to FALSE.

By default our WinBatch Studio environment and all .wbt files use the Manifest settings: Requested Execution Level = HighestAvailable and UI Access = True. WinBatch uses these default Manifest settings in attempt to obtain the highest level of access for all scripts. However these manifest settings are not always relevant for the script you are running. For example if your script does not require UI access then you should not manifest the script using UI Access = True. An example of a script that would require UI Access = True is using any of the Control manager Extender functions that attempt to access controls in other running processes. In short you will need to keep in mind what minimum Manifest settings your script will require. In the case of your script you do not need UI Access= True. Rather UI Access should be False. This also explains why compiling the script resolved your problem. By default the Compiler gives your compiled EXEs the default Manifest setting Requested Execution Level = AsInvoker and UI Access = False. The UI Access = False setting is relevant here.

If you would like to test your un-compiled scripts using the properly manifested WinBatch studio, then you should run this version of the WinBatch studio:

C:\Program Files (x86)\WinBatch\System\WBStudio_IF.exe (Requested Execution Level = AsInvoker and UI Access = False).
Note: you can also give your .WBT a special file extension of .WBT_IF, which will run the appropriately manifested version of the WinBatch interpreter when it is clicked on.


Article ID:   W17970
Filename:   UAC Manifest Setting Triggers 1129 Error .txt
File Created: 2012:10:12:13:41:32
Last Updated: 2012:10:12:13:41:32