PDA

View Full Version : Excel Add-Ins



CraigWardell
01-14-2003, 07:31 AM
I am trying to package up some Excel spreadsheets and some addins. I can’t find a way to automatically register the addin’s for Office 2000 or XP (can on 97 using registry). Does anyone know if this can be done in installshield express ?

If not, I have a spreadsheet that automatically registers my addins that I would like to run on completion of the setup. However since upgrading to Express 4 from the free version that came with Borland C++, I can’t launch a xls file from the Setup Complete Dialog (only .exe’s). I’ve also tried adding a custom action but without knowing where Excel will run from, I get error 1721 during the install.

Has anyone else managed to run a none exe program from install shield ?

Chandima
01-14-2003, 11:19 AM
So you basically need to run the Excel executable with a command line right? What version of the Free Delphi Express did you have? Was it version 2.x or 3.x?

CraigWardell
01-15-2003, 02:35 AM
Yes, all I want to do is launch the clients version of excel with a spreadsheet from the package.

We were using version 2.12 (62) for C Builder 5, but it's not compatible with Windows 2000 and XP, so we upgraded to Express version 4.

Chandima
01-15-2003, 11:15 AM
Try the following an let me know if it works:

1. Go to Requirements View
2. Right click and launch the system search wizard and press Next on the Welcome panel
3. Select "Folder Path, by searching for a specific file in all drives" in combo and Press "Next"
4. Configure as follows:

File Name: Excel.exe
Number of levels: 20

5. Press "Next"
6. Press Finish
7. Should create a new node named "EXCEL" with a "Green Check" icon. Click on this icon till it turns to the "empty box" icon. This means the setup will look for Excel.exe but will NOT stop the setup if it is found or not.
8. Go to Custom Actions View
9. Create a new Exe Custom Action
10. Change it's "Source Location" property to "File Exists on Target Computer"
11. Select "File Location" property, open the drop down and select the top most entry (Browse, create or modify a directory entry...). This should launch a directory browse dialog.
12. Create a root level folder and name it "Test"
13. Set this folder's "Directory Identifier" property to "EXCEL"
14. Press OK (closes the dialog)
15. Set the "File Name and Command Line" property to "Excel.exe" and the command line you want to give.
16. Set "Invoke" property to "After Setup Complete Success" dialog.
17 Build and Install.

CraigWardell
01-16-2003, 06:11 AM
I think that is along the right line but it’s still not working. If I do exactly as you say I get

Error 1721.There is a problem with this Windows Installer package. A program required for this install to complete could not be run. Contact your support personnel or package vendor. Action: NewCustomAction1, location: C:\Program Files\Microsoft Office\Office\excel.exe\, command: "C:\Program Files\Microsoft Office\Office\excel.exe\" "C:\Program Files\Arelon\Budget\OfficeDir\Library\Addin_Ins.xls"

The problem seems to be that [EXCEL] is set to
Property(S): EXCEL = C:\Program Files\Microsoft Office\Office\excel.exe\
(it has a back slash on the end of it) This seems to get added when you create the Temp directory and name it EXCEL.

I’ve tried it without adding the temp directory leaving the location blank (some strange validation on this sometimes allows you to do this but not always), and that didn’t work either.
[EXCEL] is then set to
Property(S): EXCEL = C:\Program Files\Microsoft Office\Office\excel.exe (looks correct!)

But I still get the error.
Error 1721.There is a problem with this Windows Installer package. A program required for this install to complete could not be run. Contact your support personnel or package vendor. Action: NewCustomAction1, location: , command: "C:\Program Files\Microsoft Office\Office\excel.exe" "C:\Program Files\Arelon\Budget\OfficeDir\Library\Addin_Ins.xls"

If I cut and paste the command into a dos window it does work.

I’ve also tried to run [EXCEL] from the final dialog, but it won’t allow me to run a program that doesn’t exist.

Any more ideas ?

Chandima
01-16-2003, 04:13 PM
This COULD be a problem with the Excel.exe itself. On a Win2K machine if you add Explorer.exe as a Custom Action you get the same error. This is because Explorer.exe returns a value that interrupts the installer. Setting the "Ignore Exit code" property to "Yes" fixes this. Try that on your custom action and see if it works.

Also, when you created the search are you sure you used "Folder Path, by searching for a specific file in all drives"? Mind you it is "folder" path and NOT "file" path. This way at runtime [EXCEL] should contain just "C:\Program Files\Microsoft Office\Office\".

CraigWardell
01-17-2003, 11:14 AM
Yes, that did the trick. If I'd read your first reply better, it would have worked earlier. I think I had originally tried the Folder Path search all drives, but because this didn't reference the file name I used the File Path all drives (ooopppss!!!).

Thanks very much for your help !:)