• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 377
  • Last Modified:

LogonUser or ImpersonateUser in Win9x?

I need to connect to network resources with a different user name in Win9x.  The LogonUser api is only for NT.  
My intention is to logon and impersonate a user account, and then CreateProcessAsUser 0r CreateProcess to access the files on a network drive.  Windows should then authenticate with the new logon I have used.

Can anyone help with this please.
Thanks
0
TimW1
Asked:
TimW1
  • 3
  • 2
1 Solution
 
aeklundCommented:
Not possible on Win9x.
0
 
TimW1Author Commented:
Can you think of any other way around this that would not use LogonUser.  If I type "\\192.168.0.x" in the RUN dialog of win9x pc, and my user doesn't have access to the destination pc it will display a User and Password dialog to authenticate with the computer.  Can this can be done in some way using code and api calls?
0
 
aeklundCommented:
You can try this:

http://www.mvps.org/vbnet/code/network/acceptsecuritycontext.htm

But again, what your asking is not possible on win98 because win98 not designed to have multiple logon sessions like NT and above are.
0
 
TimW1Author Commented:
I have accepted your answer as there seems to be no direct way.  However the code you put was for NT, and there are possibly some other options such as an MTS object running on 2x/xp or using the map drive api and pass user info so I can't give you an A grade sorry.  Thanks for your help.
0
 
aeklundCommented:
Not a problem, but win9x is limited when it comes to this... But you are correct, you can use the WNetUseConnection api to map a drive letter as a different user...
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now