Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General MS InfoPath Questions / September 2004

Tip: Looking for answers? Try searching our database.

WSCript

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Tim Heuer - 31 Aug 2004 00:50 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.