>Hi Josh,
>
>Thanks. It works. I think the ZAK is too massive for a simple task to be accomplished. Hpowever, I have 2 more questions :-
>
>1. The key hkey_current_user\software\windows nt\winlogon is for WinNT, I supposed. I tried to look for a similar key in Win95, but could not find one. Is there one corresponding entry inthe registry?
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Winlogon>
>2. My application launches, ok. But when it exits, I'm left with a blank DeskTop. I can't expect the user to Ctrl-Escape to shutdown Win95. Can Win95 be shutdown from within the VFP app?
VFP can call a Win32 API function to shut down Windows (under NT, there is an assumption that the user has the necessary permissions to do so.) The call I use when I want the system to restart Windows from scratch is:
DECLARE SHORT ExitWindowsEx IN Win32API ;
INTEGER nShutDownMode, ;
INTEGER nReserved
#DEFINE LoginNewUserFlagValue 0
#DEFINE ShutdownFlagValue 1
#DEFINE RestartFlagValue 2
CLOSE ALL
FLUSH
=ExitWindowsEx(RestartFlagValue,0)
Because of issues involving shelling and OLE, I would not try to have a VFP application replace the default shell; ZAK, while complex, doesn't interfere with shell-related extensions to the operating system, and can make as much of Win95's base functionality available to the system; you provide no mechanism for maintenance of the system if you load the VFP app as the shell.
>
>
>
>>>Is there a way to launch a VFP application on power up, without the Taskbar, Desktop, and the Explorer program in Win95?
>
>>I think you can do it by going into the system.ini and changing the shell=explorer.exe to shell=myapp.exe.
>
>>Goto hkey_current_user\software\windows nt\winlogon and change the shell from explorer.exe to your program name.
>
>TIA