AnswerTheMan
asked on
OverWriting Comctl32.dll during setup
Using VB5 setup wizard, i must Overwright on the user's machine, the file Comctl32.dll.
the setup wizard can't do that because this file is in use
by windows all the time, and can't be overwritten while
windows is running.
so, i have to do it manually, from DOS, be4 or after the setup.
BUT - i want to give the user an easy installation, without
those manuvers.
i'm sure i can write an app. that will make a restart and then copy it in DOS mode, but i'm looking for a way to make it In the installation itself.
the setup wizard can't do that because this file is in use
by windows all the time, and can't be overwritten while
windows is running.
so, i have to do it manually, from DOS, be4 or after the setup.
BUT - i want to give the user an easy installation, without
those manuvers.
i'm sure i can write an app. that will make a restart and then copy it in DOS mode, but i'm looking for a way to make it In the installation itself.
ASKER
yes i've try that.
not working.
windows using the version installed on windows\system ONLY
not working.
windows using the version installed on windows\system ONLY
You might try using the RunOnce registry key. Basically, you could write a BAT file to copy and register the DLL the next time the machine is booted.
Here is a KB article about it:
http://support.microsoft.com/support/kb/articles/q179/3/65.asp
Here is a KB article about it:
http://support.microsoft.com/support/kb/articles/q179/3/65.asp
ASKER
BAt file is allright, but to do this i have to force the autoexec.bat to run this file be4 win95 is loaded, so i have to add a line in autoexec.bat.
how can i do that ? u see, i don't have a fisically access to the
client machine.
and suppose i will know how to add that line - how would i delete it after one use ?
Or shell i tell the client he must have IE3.0(at least), on his
machine be4 installing my application (IE3.0 installs that file)
? is that a logical demand ?
how can i do that ? u see, i don't have a fisically access to the
client machine.
and suppose i will know how to add that line - how would i delete it after one use ?
Or shell i tell the client he must have IE3.0(at least), on his
machine be4 installing my application (IE3.0 installs that file)
? is that a logical demand ?
I was referring to the RunOnce registry key from the knowledge base article I posted. It is a way to make it run your bat file one time the next time the computer is re-started...
If you are running under NT, use MoveFileEx
If you are running under 95/98
Copy the file with a different name
Make an entry in the [rename] section of C:\windows\WinInit.ini
(create it if it doesn't exist)
NUL=C:\WINDOWS\SYSTEM\Comc tl32.dll
C:\WINDOWS\SYSTEM\Comctl32 .dll=C:\WI NDOWS\SYST EM\Comctl3 2.new
Reboot the machine
If you are running under 95/98
Copy the file with a different name
Make an entry in the [rename] section of C:\windows\WinInit.ini
(create it if it doesn't exist)
NUL=C:\WINDOWS\SYSTEM\Comc
C:\WINDOWS\SYSTEM\Comctl32
Reboot the machine
ASKER
i appreciate your answers fellows, but u don't get the picture :
i'm, shipping the setup on a CD 5000 miles away from my location
and can't be present on instalation.
the client computers have older version of the file, and he is
a typical user which i can't trust to do all those manuvers.
i need the setup program to do that.
if there is no way - i can tell him to install ie3.0 (free d\l)
on his machins preior to my app instalation. this will do the work for me.
still have time and waiting for ideas.
i'm, shipping the setup on a CD 5000 miles away from my location
and can't be present on instalation.
the client computers have older version of the file, and he is
a typical user which i can't trust to do all those manuvers.
i need the setup program to do that.
if there is no way - i can tell him to install ie3.0 (free d\l)
on his machins preior to my app instalation. this will do the work for me.
still have time and waiting for ideas.
I never use the VB setup thing anymore, I always use Wise, to do what you require in wise is a sigle click. There MUST be a similar function in the setupkit, otherwise the programmers would be too embarrassed to ship it!
Answerman:
The comctl32.dll being used is NOT necessarily the one in Windows/System. It is the one that is registered, which just happens to be in Windows/System. This is what you do. Include Regsvr32 with your setup. Unregister the DLL in the windows/system. (this is doable) then copy your comctl32.dll somewhere other than windows system (say the install dir) and use regsvr32 to register it. You are done.
I think Microsoft has a comctl32 installer that you can include with your application that does this kind of stuff.
Anthony
The comctl32.dll being used is NOT necessarily the one in Windows/System. It is the one that is registered, which just happens to be in Windows/System. This is what you do. Include Regsvr32 with your setup. Unregister the DLL in the windows/system. (this is doable) then copy your comctl32.dll somewhere other than windows system (say the install dir) and use regsvr32 to register it. You are done.
I think Microsoft has a comctl32 installer that you can include with your application that does this kind of stuff.
Anthony
ASKER
have u try to unregister a dll while in use by the os ??
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Just a thought,
Martin