Hi Steve -
Registering of OCXes usually requires privileges that "limited accounts" in Windows 2000 and XP, and any account in Vista with UAC, by default do not have, so the setup option is the easy one.
See also Doug Hennig's article "Developing Microsoft Visual FoxPro Applications for Windows Vista"
http://my.advisor.com/doc/18897If avoiding any setup is crucial, perhaps a "current user" approach might work (because HKLM assign requires admin privileges, while HKCU assign does not) which could be like:
collect all required Registry values of your particular OCX, which are probably located in the HKLM branch (you can use SysInternal's RegMon tool to watch the regular setup).
And at runtime, try to write them to the HKCU part, if not there yet. All required API functions are demonstrated in the registry.* libraries in the VFP Home() folder. See also
Message ID: 195397 for an example.
FWIW, MS "Virtual PC 2007" is free if you want to use virtual machines for testing.
hth
-Stefan
> Heya All,
>
> Been going back and forth on whether to use msft treeview or the DBI one in my browser app and and I have decided to use the DBI, there is just so much more functionality IMHO (Title bar, columns, subtext, printing etc..) and I already have class set up for it.
>
> The problem I have is I was hoping to avoid distributing an setup.exe file with the browser but without an install process I will have to register the treeview control if it's not already registered on application start up. So I was wondering if that is possible/viable.
>
> What I was thinking I would do in my 'main.prg' was:
>
> - Check if control registered
> - If not, ask user if it's ok to register (or maybe just tell them)
> - then register control
>
> I assume I can shell out and call regsrv3r but I'm not sure how to tell if the control is registered or not (I'm crap at the registry)
>
> Also is it the same process for Win 2K, WinXP, Server 2003 and Vista?
>
> Any thoughts would be greatly appreciated.
>
> Thanks,
> Steve Dingle
>
http://weblogs.foxite.com/SteveDingle/>
www.dsbusinesssolutions.co.uk