Hi Dave,

I manage the ocx registration in this way.

In attach three files:

- Register_calendar_ocx.prg
a sample that show how to do

- Util.prg
Create a project with only this program and create Util.exe needed to 
Register.prg

- Register.prg
The registration routine

* register / unregister EXE, DLL, OCX
* uses ShellExecute with "runas" starting from Windows Vista

* m.pp_file Character: file to register / unregister
* avoid SUBSTed path that may not exist when using "runas" Administrator

* m.unreg Logical: unregister, default .f.
* m.verbose Logical: verbose, default .f.
* m.dir Character: run directory, default current directory

When needed UAC ask for authorization.
Tested also on Windows 8.1.

HTH,
Gianni

On Wed, 10 Jun 2015 13:16:06 +0000, Dave Crozier <da...@flexipol.co.uk> wrote:

Has anyone in this wonderful throng of people had any success using regsvr32 to 
register an OCX programmatically in VFP.

I have a routine that used to run brilliantly on XP but it just fails on Win 7 
despite giving the indication that all is OK. I am sure it is to do with 
elevated permissions and UAC.

The additional problem is also to decide whether to copy the OCX into the 
Windows\System, or Windows\System32 or Windows\SYSWOW64 folder before 
registering it as the OCX's required are held on a network share, but that is 
just a nicety just to package the OXC installation up into a one off "if it 
isn't there then install it" routine.

I would ideally like to use only inbuilt VFP commends (DLL Calls etc) and not 
have to shell out to the command window on both 32 and 64 bit operating system 
versions.

Thanks in anticipation.
Dave


--- StripMime Report -- processed MIME parts ---
multipart/mixed
  text/plain (text body -- kept)
  application/octet-stream
  application/octet-stream
  application/octet-stream
---

_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/fgoinaprga1oqeaed6vr64avol4pkee...@4ax.com
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to