Problem registerig ocx through windows logon script

N

Neil

I am developing an Access 2000 app that uses the Microsoft Rich Textbox
control. I asked the system administrator to add the line to register the
OCX to each user's Windows login script, as follows:

regsvr32 "c:\windows\system32\richtx32.ocx" /s

Today I had a user update to the new version for testing, but he couldn't
run it. I then had him run the regsvr32 command from Start | Run, and it
cleared up the problem. So, apparently, the above line in his logon script
didn't do the job of registering the control. (The user was running Windows
XP -- and most machines are on XP.)

So I notified the system admin, and he checked that person's machine, and
said that everything was in order. He didn't know why the control didn't
register.

So I'm stumped. Any ideas why the above line didn't work to register the ocx
on this person's machine, but he had to run the command manually?

Thanks,

Neil
 
N

Neil

I understand that you only need to do it once; but we felt that this was a
simple way to make sure that everyone was registered, even if it was done
multiple times.

So, the questions remain:

1) Should it work under the Windows logon (even if it is unnecessary to do
it multiple times), using the below command?

2) And, if so, then why did it not work, but only worked when the user
manually ran the command using Start | Run?

Thanks for your assistance!

Neil
 
N

Neil

I don't think the user is an administrator. But, as noted, they were able to
run the command through Start | Run.

So, is that the way it should be: if user is not an administrator, the
command in the logon script will not work, but the user will be able to run
it through Start | Run?
 
K

Karl E. Peterson

Neil said:
I don't think the user is an administrator. But, as noted, they were able to
run the command through Start | Run.

How do you know that, if you used the /s(ilent) switch???
 
N

Neil

Didn't use the /s switch with the Start | Run command, only in the login
script.

But, regardless, the original point was:

- command was run through login script; was presumed to have worked
- user opened form that relied on ocx; got error
- user ran command through Start | Run (without /s switch); problem was
resolved.

Ergo: command worked when run through Start | Run, but not when run through
login script. Why? User has same rights either way.
 
N

Neil

Then it's strange that error would go away after the user ran the command
through Start | Run. If command didn't work through login, then it shouldn't
have worked through Start | Run.
 
P

Pieter Wijnen

probably the path to regsrv32 wasn't resolved by the login script command.

Still better to use RegisterServer in a Startup macro/form, before "all"
code is loaded
see http://trigeminal.com/usenet/usenet026.asp?1033 for the how's & why's

Pieter



Neil said:
Didn't use the /s switch with the Start | Run command, only in the login
script.

But, regardless, the original point was:

- command was run through login script; was presumed to have worked
- user opened form that relied on ocx; got error
- user ran command through Start | Run (without /s switch); problem was
resolved.

Ergo: command worked when run through Start | Run, but not when run
through login script. Why? User has same rights either way.
 
P

Pieter Wijnen

The interesting difference would be between running it through a command
prompt (which the Login script more or less does)
as oposed through rundll (as Start /Run Does)
ie fully qualifying the paths for both regsvr32 & the ocx might fix the
login script problem
test by unregistering the ocx

HtH

Pieter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top