|
-
Mar 27th, 2001, 01:06 PM
#1
Thread Starter
Lively Member
Hello Everybody.
I am needing to distribute the Common Dialog OCX with an Excel spreadsheet. I am looking for the most lightweight solution. I know I can set up a P&D package, but I don't want to distribute all of the VB runtime files. I just want to distibute the OCX itself. Any Ideas?
-
Mar 27th, 2001, 01:20 PM
#2
Zip it into a WinZip SFX archive and have that extract it to the windows\system dir.
About 40k overhead from the SFX, but that'll be made up by the compression.
Gerco.
-
Mar 27th, 2001, 02:47 PM
#3
Thread Starter
Lively Member
Cool
OK. So that is just a plain old self extracting file? Do I not have to register the OCX?
-
Mar 27th, 2001, 03:13 PM
#4
Yes, you have to register it...
Just set "C:\Windows\system\regsvr32 something.ocx" as the command to execute when the unzipping is done.
You might want to include the regsvr32.exe file, I'm unsure if it ships with windows...
Gerco.
-
Mar 27th, 2001, 03:59 PM
#5
The RegSvr file is installed with windows, and is found under the system directory. This is normally "C:\windows\system\" for win9x installs, "C:\winnt\system32\" for windows NT installs.
To be on the safe sie, use the GETSYSTEMDIRECTORY API call : http://www.vbapi.com/ref/g/getsystemdirectory.html to see where this is.
Once you've found this, you then shell out to it and call on this program to register your file in the same line :
Code:
Shell Systemdir & "\regsvr32.exe /s Name_Of_OCX.ocx"
Note that I included the /s switch, this registers the file silently. Normally, when you do this, you get a message box from windows telling you or the user if the register worked without any problems. This takes away that option.
-
Mar 27th, 2001, 04:08 PM
#6
Thread Starter
Lively Member
very cool
That was going to be the next thing I looked at. We have a ton of NT and 98 machines. OK. So how do I go about creating this? Would it be a .vbs file or what?
Thanks!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|