Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
Getting a bit more than the _CLIPTEXT offers
How to Start a Process as Another User (NT/XP/2K)
Retrieving list of available disk drives
The SQLGetProp() creates a bridge between Visual FoxPro and the ODBC API
The window and its ancestors
Using Beep and Sleep functions to make the old tin buzz sing (WinNT only?)
Using the RestartDialog function -- restarting Windows
Using the SystemParametersInfo function
Winsock: retrieving the host information corresponding to a network address
How to enumerate cookies and URL History entries in the cache of the local computer
MapiSendMail class for Visual FoxPro application
Monitoring changes occurring within a directory
Reading VFP settings from the Windows Registry
Retrieving the System Time adjustment
Smart Card Database Query Functions
Using the DeleteFile
Disk in drive A:
DiskFreeSpace class
Enumerating data formats currently available on the clipboard
Enumerating the subkeys of a user-specific key
How to display a dialog box with which the user can add a data source (DSN)
How to download this reference`s archive through WinInet functions using InternetOpenUrl
How to initiate System shutdown
How to release and renew a lease on an IP address previously obtained through Dynamic Host Configuration Protocol (DHCP)
How to Start a Process as Another User (NT/XP/2K)

User rating: 0/10 (0 votes)
Rate this code sample:
  • ~
More code examples    Listed functions    Add comment     W32 Constants      Translate this page Printer friendly version of this code sample
Before you begin:
The following code offers solution, which is similar to Microsoft Knowledge Base Article - 285879: HOWTO: Start a Process as Another User from Visual Basic.

Other code samples you might be interested in:
  • Running external applications from VFP using WinExec
  • Using ShellExecute for performing operations on files
  • Running external applications from VFP using CreateProcess
  • Running an external program from FoxPro and waiting for its termination
  • Running MSDOS Shell as a child process with redirected input and output

      Members area. Log in to view this example.
      User name:
      Forgot your password?
      Sign up for
    the Membership

    User rating: 0/10 (0 votes)
    Rate this code sample:
    • ~
    5486 bytes  
    Created: 2003-10-30 14:35:25  
    Modified: 2011-12-10 09:20:22  
    Visits in 7 days: 53  
    Listed functions:
    Printer friendly API declarations
    My comment:
    To start a process as another user, you can use the LogonUser and CreateProcessAsUser Win32 APIs when running Microsoft Windows NT 4.0, or you can use the CreateProcessWithLogonW Win32 API when running Microsoft Windows 2000/XP or later.
    Word Index links for this example:
    Translate this page:
      Spanish    Portuguese    German    French    Italian offers instant, free translations of text or web pages.
    User Contributed Notes:
    There are no notes on this subject.

    Copyright 2001-2016 News2News, Inc. Before reproducing or distributing any data from this site please ask for an approval from its owner. Unless otherwise specified, this page is for your personal and non-commercial use. The information on this page is presented AS IS, meaning that you may use it at your own risk. Microsoft Visual FoxPro and Windows are trade marks of Microsoft Corp. All other trademarks are the property of their respective owners. 

    Privacy policy
    Credits: PHP (4.4.9), an HTML-embedded scripting language, MySQL (5.6.33), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
    Last Topics Visited (
    31 sec.Example: 'How to retrieve information about a cache entry (Internet Explorer)'
    3.12 min.Function: 'GetWindowRect'
    Function group: 'Window'
    3 day(s)
    Function group: 'GDI+ Graphics'
    Function group: 'Kernel Transaction Manager'
     Function: 'SCardEstablishContext'
     Function: 'InternetCrackUrl'
    Function group: 'Internet Functions (WinInet)'
    Advertise here!