Trying to use the recommended method of getting the user identity in script:
var wsh = new ActiveXObject("WScript.Network");
wsg.UserName
etc.
This works fine on a non-SP1 form running on a non-SP1 install base of
Office/InfoPath (the user still gets the ActiveX warning, but allows me to
click yes to run it).
Running the same form on an SP1 office install generates "automation error
cannot create object" errors. It does *NOT* give the activex warning (as
expected). the form now only works in fully trusted mode if installed on
the user machine...which is not an option for this deployment.
is this the new behavior that SP1 would break old forms that were working in
such a manner? Oddly, the line:
var cn = new ActiveXObject("ADODB.Connection");
does work and does not request an activex warning approval (although it does
warn about a possible unsafe method).
-th
Brian Teutsch [MSFT] - 01 Sep 2004 18:17 GMT
This actually is related to reduced trust levels for that object in Windows
XP SP2. You'll have to allow for full trust, or I think you can add the site
to your trusted sites list to permit WScript.Network to run.
Brian
> Trying to use the recommended method of getting the user identity in
> script:
[quoted text clipped - 22 lines]
>
> -th