>>Install the Windows Script Host - there's a self-installing freely-redistributable version available for download on the MSDN Scripting website - see the link in my sig
>>
>>Thanks - I see this requires a restart - how would you fit something like this into a vfp app setup routine?
>
>Just for kicks, I would like to know if you can instanciate the scripting automation objects without a restart. I have found this to be doable in several other applications- the full application won't run, but key vital pieces will. It could be that for what you're doing, you don't need to restart.
>
>Ed- have you tried it?
VBScript.RegExp is already available if the VBScript 5 engine is in place, which is usually the case if IE 4.01 or later is there. Some VB apps drop Scripting.FileSystemObject in if they use it. The reboot is required due to the need to replace a component that is currently loaded. I've never tried running one of the scripting executables without a reboot.
As an example, VBSCRIPT.DLL, the provider for RegExp, should be able to find everything it needs on most Win98/NT/2K systems, with the possible exception of the latest MSVCRT. OTOH, WSHOM.OCX has a far more detailed set of dependencies. WSCRIPT.EXE, even more.
What I actually do is wrap it in an InstallShield script that writes a RunOnce key just before firing the self-extractor; if it reboots, the RunOnce picks up the script from where things left off, and if no reboot happens, I delete it and go on.