Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How to log on to remote Windows 2000 system

Posted on 2002-05-17
3
Medium Priority
?
194 Views
Last Modified: 2013-11-20
Hi,

I am looking for help on how to log on to remote
computer programatically.

As part my project I need query a MSDE on remote
Windows 2000 system. But my ADO connect () call is
failing unless the system I am making connect() call
logon to remote Windows 2000 system where I have
MSDE datbase. Could you let me know how log on
to Windows remote system from Windows 2000 system
using MFC or Win32 calls ??

Regards
0
Comment
Question by:rkpalli
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 86

Accepted Solution

by:
jkr earned 600 total points
ID: 7016609
If you need to access the DB as a file, try to connect to a share on the machine without logging on:

   NETRESOURCE               nr;

         ZeroMemory     (     &nr,     sizeof     (     NETRESOURCE));

         nr.dwType               =     RESOURCETYPE_DISK;
         nr.lpLocalName          =     "";
         nr.lpRemoteName          =     "\\\\server\\share";

         dwRes     =     WNetAddConnection2     (     &nr,
                                                      acPassword,
                                                      acUserName,
                                                      0
                                                 );

         if     (     dwRes)
              {
                   // error
              }

0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7018460
It might be worth a try to set the MSDE settings on the server to use "SQL Server Authentication" (rather than "Windows 2000 integrated security") and also make sure that the ODBC settings on the client are set to use TCP/IP (rather than named pipes).

-- Dan

0
 

Expert Comment

by:amarzee
ID: 7023681

CreateProcessAsUser() will help us to create a process as if we are currently log on to particular server. This may be the thing you are looking for
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question