Link to home
Start Free TrialLog in
Avatar of TimW1
TimW1

asked on

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
Avatar of aeklund
aeklund

Not possible on Win9x.
Avatar of TimW1

ASKER

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?
ASKER CERTIFIED SOLUTION
Avatar of aeklund
aeklund

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of TimW1

ASKER

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.
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...