Sunday, August 30, 2009

Re: Remove message "Cannot Load registered type library" : "Do you want to register"

On 20/08/09 16:25, geoffrey.wood@thomsonreuters.com wrote:
>
>> I have copied my gvim installation on a USB stick.
>> When I place that USB stick into another system and I run gvim from
>> there it comes with the message
>> "Cannot Load registered type library"
>> "Do you want to register"
>> "Yes/No"
>>
>> Can this message be removed?
>> And if so how to do that?
>> I assume recompiling gvim?
>
> I see the same thing. I'm using the standard distribution of
> VIM 7.2 (2008 Aug 9) MS-Windows 32-bit
>
> My rough-and-ready solution is to have a batch file on my stick which
> I run, it registers VIM automatically, runs VIM, and unregisters
> again when I close VIM.
>
> I think this still leaves some empty registry keys on the machine.
> This doesn't bother me, but if it's a concern you could investigate
> exactly what is left and use a utility like "reg" to delete the
> traces.
>
> It would be nice to have a better solution though.
>
> PortableApps VIM had this problem reported back in January, so
> maybe it is fixed now.
>
> http://portableapps.com/node/15654
>
> :: ---- Batch file starts
>
> :: make it obvious what this cmd prompt is doing
> title Running VIM
>
> :: Add the tools directory on my stick to the path
> :: so VIM can use the tools directly
> :: %~d0 makes it work whatever drive letter the stick has used
> set path=%path%;%~d0\tools
>
> :: register Vim without showing that message
> %~d0\vim\vim72\gvim -silent -register
>
> :: run Vim so I can use it (then wait for it to close)
> %~d0\vim\vim72\gvim

with standard Vim, this doesn't wait for it to close, it continues as
soon as Vim has done the Windows equivalent of "forking", which happens
at some point during startup.

See
:help -f

>
> :: now Vim has closed, unregister it
> %~d0\vim\vim72\gvim -silent -unregister

now that gvim has _started_ (and relinquished the console), unregister
it. This will probably prevent any use of Vim as an OLE server, so you
could just as well compile it with OLE=no.

>
> :: ---- Batch file ends
>
> regards,
> Geoff Wood
[company disclaimer snipped]


Best regards,
Tony.
--
What is the difficulty with writing a PDP-8 program to emulate Jerry
Ford?

Figuring out what to do with the other 3K.

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

No comments:

Post a Comment