Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

OLE error code 0x800401ea: Moniker cannot open file

Status
Not open for further replies.

tamayok

Programmer
Sep 4, 2001
99
PR
Hello to all,

The following line results in "OLE error code 0x800401ea: Moniker cannot open file".

Code:
loUser = GetObject([WinNT://]+STRTRAN(SYS(0)," # ","/"))

The error only occurs in select workstations; works perfectly well in most.

About the environment:
VFP 9 application running under Windows XP Prof. SP2

Is this call for a GetObject() restricted to a specific type of users (power-users, administrators...)?

Do I need to register a component?

Thanks!

Kenneth Tamayo
San Juan, PR - USA
 
Try installing Windows scripting on the stations to see if it makes a difference.

Although I must admit that your code looks a little strange, it seems to be a mix between Windows scripting and VFP. Are sure about your syntax?

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
ReFox XI (www.mcrgsoftware.com)
 

Kenneth,

I just tried to run your code, and got the same error.

I must admit I am puzzled about what the code is trying to achieve. You seem to be doing a GetObject() based on the machine name concatanated with the user name. Out of curiosity, can you explain what that does?

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

My sites:
Visual FoxPro (www.ml-consult.demon.co.uk)
Crystal Reports (www.ml-crystal.com)
 
mgagnon,

I use Windows Scripting in other parts of the appl and it works on those workstations so I assume that element is not the issue.

MikeLewis,

I use that code to subsequently re-authenticate the Windows/Net user/password combination...

I guess it's good that your environment triggers the same error... I not not able to replicate the error elsewhere, therefore, find it difficult to solve it.

The object will only work on Windows NT or XP.

- Kenneth
 

I must admit your code runs fine on my machine (win xp,VFP9.0), I just never use the [WinNT://] part. By your result I can only guess that it is platform related and not VFP related. There must be other ADSI code that would work for other OS.


Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
ReFox XI (www.mcrgsoftware.com)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top