>Stanley,
>put below two lines into programs, do the program to shutdown the computer in your VFP application.
>Chau, Moon
>
>Declare integer ExitWindowsEx in user32 integer uFlags,integer dwReserved
>lret = ExitWindowsEx(1+4,0) &&SHUTDOWN AND FORCE
Just so you're aware, this won't work on Windows NT/2000. You need to call AdjustTokenPrivileges(). The KB article I referred to in an earlier post demonstrates how to do this.
Mike Stewart