• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 148
  • Last Modified:

creating setup for dif platforms

i have a tax application  in vb6  which i am editing .The previous setup packaging was made in 3 different types
1) setup for xp and office xp
2)win98 with office xp
3) win 2000 with off 2000

The program is using the following refernces
1) ms word 10 object library , ms office 10 object library, activex data library, scripting runtime, ms dataenvironment, ms data report designer, internet controls,etc etc

since the program should run on all windows and office versions how do i  create the package. do i have to create different setups for different operating systems and office versions ?
0
mr_brij
Asked:
mr_brij
  • 3
  • 3
  • 2
2 Solutions
 
PSSUserCommented:
You best bet for a start is not to use references to the different versions of word/office. Use late binding instead.

It can be usefull to put the reference in while developing the exe, since you get the intelli-type prompts, ideally using the earliest version of Office you want you application to work with. Then when you come to compile the application change your definitions to late binding ones and remove the reference.

so
Dim oWord as Word.Application
Set oWord=New Word.Application

becomes:
Dim oWord as object
Set oWord=CreateObject("Word.Application").

As for needing different versions for different platforms, you will need to install different versions of some of the files depending on platform. For example the scripting package is different for Windows 98 (scr56en) to Windows 2000/XP (scripten).

I'm not sure if you can have different options within the package and deployment wizard for different versions of windows. The way I deal with this is to create my installs with Inno Setup (http://www.jrsoftware.org/isinfo.php), which is a powerful free installer package. I use Inno Script (http://www.randem.com/innoscript.html) to create the install based on my VB Project, then change the lines necessary. For example, the following 2 lines ensure the correct version of scripting is installed:
Source: c:\program files\innoscript\vb6 diff versions\scr56en.exe; DestDir: {tmp}; MinVersion: 4.1,4.0; OnlyBelowVersion: 0,5.0
Source: c:\program files\innoscript\vb6 diff versions\scripten.exe; DestDir: {tmp}; MinVersion: 0,5.0

The advantage of this is I don't need to know in advance what platform the software will be installed on. The install detects this and installs the required files.
0
 
nffvrxqgrcfqvvcCommented:
I don't think it matters, since there both 32bit operating systems and I assume you wrote the application in VB6.
Just remember to program your paths to deal with the different windows directories on each type of operating system.
In some cases a user creates his own windows folder. So it's not always standard.
So no you don't need to create different setup packages I believe P&D automatically knows what OS its installing the files on.
My only concern would be windows 98 users. The reason being I don't really know how some of those controls would react on the 98 system.

WIN98
C:\WINDOWS
XP
C:\WINDOWS
2000
C:\WINNT

You could use some API to get the paths for each type of OS.

'=====GET WINDOWS DIRECTORY=====

Private Declare Function GetWindowsDirectory Lib "kernel32" Alias "GetWindowsDirectoryA" (ByVal lpBuffer As String, ByVal nSize As Long) As Long

 Dim RealPath As String, Cbuff As String
    Cbuff = String(200, Chr$(0))
    RealPath = Left$(Cbuff, GetWindowsDirectory(Cbuff, Len(Cbuff))) + "\anything.exe"
    MsgBox RealPath




0
 
mr_brijAuthor Commented:
thanks PSSuser your solution made a lot of sense.. but i have a little problem here.
Since the application is already made  and i am just making a small calculation change in one module so i dont think i would be able to remove the references and add late binding , that would take lot of time . Will the inno solution work if i do nothing with the existing code and just pack it up with the software you mentioned ??


Egl thanks for the reply you are right the application randomly works or sometimes doesnt in systems with win98 and word 97 . Mebbe that is the reason why the person who developed this program created different setup folders for win98, 2000 and xp.

so what is my best bet in this kind of situation ??

brij


0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
PSSUserCommented:
The setup will work with your existing app, you can tailor it for the different versions of windows quite easily.

You may have problems with the different versions of office, since if you code is looking for MS Word 10 on a machine that has a different version of word you will get an error. This can only be solved by either having different versions of the exe, depending on office version, or using later binding. If you have different versions of the exe for different versions of office, you can prompt the user for what version of office they are using, then get the setup file to install the appropriate exe.
0
 
mr_brijAuthor Commented:
thankss pss , i think i understood quite  a bit about setups. One last question though , since currently i am editing the program in win2k server with office xp machine visual basic has a reference of ms office 10 object library and ms word 10 object library.  To make different setups how do i find and add the object libraries for say win xp with  office xp or win 98 with office 97 ??

brij
0
 
PSSUserCommented:
The different versions of windows won't have an impact on the MS Office or MS Word references. Only the version of office will be important. The only way to be able to references to the different versions is to have a copy of each installed on your developement machine (or if you have several developement machines, have a different version of office on different machines).
0
 
nffvrxqgrcfqvvcCommented:
What I ususally do is run package and deployment wizard, then I read the SETUP.LST file that PDW creates.  It will list all of the dependencies that need to be shipped with your application. In the setup.lst file you want to read the

[Bootstrap Files]
You need all of these files.

[Setup Files]
Lists all your dependecy files,ocx,dll etc..

I would just make sure that whatever setup you are using has an option do register the files on the system.
0
 
nffvrxqgrcfqvvcCommented:
I would also set the option to not overwrite existing files or {skip exisisting files}
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now