×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

OLE error code 0x800401ea: Moniker cannot open file

OLE error code 0x800401ea: Moniker cannot open file

OLE error code 0x800401ea: Moniker cannot open file

(OP)
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

RE: OLE error code 0x800401ea: Moniker cannot open file


Try installing Windows scripting on the stations to see if it makes a difference.
http://msdn.microsoft.com/library/default.asp?url=/downloads/list/webdev.asp

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)

RE: OLE error code 0x800401ea: Moniker cannot open file


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)

RE: OLE error code 0x800401ea: Moniker cannot open file

(OP)
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

RE: OLE error code 0x800401ea: Moniker cannot open file


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)

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close