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

506 views
Skip to first unread message

Jeri Raye

unread,
Aug 20, 2009, 9:37:28 AM8/20/09
to v...@vim.org
Hi,

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?

Rgds,
Jeri

geoffr...@thomsonreuters.com

unread,
Aug 20, 2009, 10:25:41 AM8/20/09
to vim...@googlegroups.com

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

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

:: ---- Batch file ends

regards,
Geoff Wood





Reuters Limited, a Thomson Reuters company, is a company incorporated under the laws of England and Wales (registered number 145516) having its registered office and address for service at the Thomson Reuters Building, 30 South Colonnade, Canary Wharf, London, E145EP, United Kingdom.

This e-mail is for the sole use of the intended recipient and contains information that may be privileged and/or confidential. If you are not an intended recipient, please notify the sender by return e-mail and delete this e-mail and any attachments.

John Beckett

unread,
Aug 21, 2009, 7:03:36 AM8/21/09
to vim...@googlegroups.com
geoffrey.wood 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

I think this is due to your version of Vim showing "+ole" when
the :version command is entered ("with OLE support").

Assuming you are not using that (:help ole), in principle you
could compile your own Vim without that feature. However, in
practice, it's a daunting process.

I have never seen this message (my Windows Vim does not have
+ole), but I thought you could just say "no" and Vim would still
work?? A little irritating, but no need to have a batch file
that registers and unregisters.

John

lessthanideal

unread,
Aug 21, 2009, 10:23:38 AM8/21/09
to vim_use
> Assuming you are not using that (:help ole), in principle you
> could compile your own Vim without that feature. However, in
> practice, it's a daunting process.

> I have never seen this message (my Windows Vim does not have
> +ole), but I thought you could just say "no" and Vim would still
> work?? A little irritating, but no need to have a batch file
> that registers and unregisters.
>
> John

Yes, as far as I could tell it does work if you just say no.

I have a low irritation threshold :)

Geoff

KF

unread,
Aug 21, 2009, 2:13:25 PM8/21/09
to vim_use
On Aug 20, 10:25 pm, <geoffrey.w...@thomsonreuters.com> wrote:
> http://portableapps.com/node/15654

Referring to the portableapss.com thread, there is a version without
OLE feature enabled on offer as build by me. You can try it out.

Also I have included the build script in that thread for anyone who
would like to build their own version.

Any comments and suggestions regarding the portable version is much
appreciated as I am just starting out to build gVim on my own.

Regards,
KF

Tony Mechelynck

unread,
Aug 30, 2009, 5:16:23 PM8/30/09
to vim...@googlegroups.com

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.

lessthanideal

unread,
Sep 9, 2009, 6:19:27 AM9/9/09
to vim_use
On Aug 30, 10:16 pm, Tony Mechelynck <antoine.mechely...@gmail.com>
wrote:
> > :: 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

(I'm using Windows 2000 SP4, and Windows 2003 SP2.) I find it does
wait in a batch file, although if you type it into a command prompt
yourself it won't wait. I think this is Windows behaviour, the
following commands in a batch file behave in the same way and pause
after notepad has appeared.

c:\windows\notepad.exe
echo hello

If you want to avoid pausing you can use the "start" command, from a
quick test this seems to work with the VIM batch file without side
effects. Therefore I've changed the middle line to the below which
reduces screen clutter since the Command prompt window closes
immediately.

:: run Vim so I can use it (don't wait for it to close, so we can
:: immediately get rid of the Cmd prompt window)
start %~d0\vim\vim72\gvim

> This will probably prevent any use of Vim as an OLE server, so you
> could just as well compile it with OLE=no.

That would be a cleaner solution.

> Best regards,
> Tony.

regards,
Geoff
Reply all
Reply to author
Forward
0 new messages