Hi cory,
I understand your problem..you explained it clearly.
I can't give the complete solution for your problem at now, But I'll give
one reason why you are getting the permission denaied errors in InfoPath.
Generally InfoPath requires "FullTrust" to use any external objects in any
scripting code.
I think you have to implement your VBScript code with combination of the
InfoPath form which has under full trust.
I hope this will help you in one way to solve your problem.

Signature
Uma Karnati
http://www.autonomysystems.com
> I have a form that I am checking to see if the user is online or offline
> using MachineOnlineState in order to get data from either a remote or local
[quoted text clipped - 12 lines]
>
> -Cory
CoryP - 22 Mar 2006 16:46 GMT
That sounds like the solution. However, someone has brought to my attention
that a form user could be on the domain, but still be unable to access the
remote server. So I may have to rethink this.
Thanks though, "FullTrust" sounds like the answer to my problem.
> Hi cory,
>
[quoted text clipped - 25 lines]
> >
> > -Cory
funnybroad - 23 Apr 2007 21:18 GMT
Here's what I'm doing with a VBSCRIPT, and it works pretty good with no
"trust" issues:
Set objShell = CreateObject("WScript.Shell")
strUserName = objShell.ExpandEnvironmentStrings("%USERNAME%")
strUserDomain = objShell.ExpandEnvironmentStrings("%USERDOMAIN%")
strComputerName = objShell.ExpandEnvironmentStrings("%COMPUTERNAME%")
Set objShell = Nothing
I have "trust" issues when I then take the contents of the domain and user
name variables and try to do an LDAP query to get more information from
Active Directory.
> That sounds like the solution. However, someone has brought to my attention
> that a form user could be on the domain, but still be unable to access the
[quoted text clipped - 31 lines]
> > >
> > > -Cory
funnybroad - 23 Apr 2007 21:22 GMT
p.s.
I just thought of something: I'm not sure if these environment variables
are just something my company sets, or if they're default environment
variables for a Windows XP computer that is the member of a domain.
> Here's what I'm doing with a VBSCRIPT, and it works pretty good with no
> "trust" issues:
[quoted text clipped - 44 lines]
> > > >
> > > > -Cory