Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Anybody using RUNAS utility
Message
General information
Forum:
Visual FoxPro
Category:
Installation, Setup and Configuration
Miscellaneous
Thread ID:
00948554
Message ID:
01126797
Views:
45
Hi Hugo,

My Program uses UserID account to access a domain on the server. However, when users run the program from their workstations, the program has no access to the workstation it is running on any more. My application uses a folder on the workstation that it runs from, so it fails my program. Is it any way that when my program logs in to the domain on the workstation, it still has access to those drives that the person who runs my program on the workstation?

Thank you so much,
Ali
   #define LOGON32_PROVIDER_DEFAULT 0
   #define LOGON32_LOGON_INTERACTIVE 2
   #define LOGON32_LOGON_NETWORK 3
   #define LOGON32_LOGON_BATCH 4
   #define LOGON32_LOGON_SERVICE 5
   #define LOGON32_LOGON_UNLOCK 7

   DECLARE integer LogonUser IN AdvApi32.DLL;
    string szUsername,;
    string lpszDomain,;
      string lpszPassword,;
    integer dwLogonType,;
    integer dwLogonProvider,;
    integer @phToken

   DECLARE integer ImpersonateLoggedOnUser IN AdvApi32.DLL integer hToken

   local nToken
   nToken = 0


   LogonUser(“UserID”, “Domain”, “Password”) ,LOGON32_LOGON_INTERACTIVE, LOGON32_PROVIDER_DEFAULT, @nToken)

   IF nToken # 0
      ImpersonateLoggedOnUser(nToken)
      WAIT WINDOW "Logged in Successfully..." Nowait
   ELSE
      WAIT WINDOW "Can not log in to the server..."
   EndIf
Previous
Reply
Map
View

Click here to load this message in the networking platform