cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Pilgrim

Setup Prerequisite folder structures

Is setup prerequisites still not able to have a folder structure? I have an install I need to add to my project and of course they have it uncompressed with a bunch of files and folders. I tried to include in Disk 1 but I really wanted the prerequisite to be contained from the setup.exe. I'm currently writing a batch file to recreate the folder structure so I can run the installer.

Cheers!
Labels (1)
0 Kudos
5 Replies
Highlighted
Flexera
Flexera

Re: Setup Prerequisite folder structures

Prerequisites do not support folders but with InstallShield 2014 you can add folders to the Support Files section and then call the install using a custom action
0 Kudos
Highlighted
Pilgrim

Re: Setup Prerequisite folder structures

I have a batch file that recreates the folder structure. However I have one other issue. I'm trying to add a shortcut but the prerequisite editor only adds what the shortcut's target is.

For example, the shortcut is named "Shortcut to User Data Properties" with a target of "C:\WINDOWS\explorer.exe "shell:AppData\Label Printer"

The editor wants to add explorer.exe from the windows folder.

WHY? It should just add the .lnk file and not look at its target. :confused:

I had to hand edit the prq and take away the windows explorer link and have it add the actual file. I opened the prq again in the editor and its listing the correct file.
0 Kudos
Highlighted
Pilgrim

Re: Setup Prerequisite folder structures

Another strange thing.....

The installer that I packaged up as a prerequisite and then wrote a batch file to recreate the folder structure it expects works fine. Except when the main installer quits or completes a registry key for the prerequisite gets deleted. I put a pause in the batch file so it would recreate the folder structure and then stop. I tested the installer from this location both manually/interacting or using the /S /v/qn command line options. I confirmed the registry key is there for both manual and silent. However when I quit or complete my main installer the key gets deleted. This causes the prerequisite installer to fail when being uninstalled cause its trying to unregister the dll. I get this error:

Error 1905. Module {path to the file} failed to unregister. HRESULT -2147220472. Contact your support personnel.

The prerequisite installer will uninstall correctly if I don't quit or complete the main installer. Why would my main installer delete a registry key to the prerequisite installer? I haven't tried to register the DLL myself in the main installer yet. I thought it was because I was doing it silently but it appears to be not the case. I wonder if there are other registry keys that get removed??
0 Kudos
Highlighted
Flexera
Flexera

Re: Setup Prerequisite folder structures

Without knowing the registry key, I'm not even sure how to guess. However since you do know the registry key, you could watch the key with a tool like Process Monitor to look for other hints, or search for references to it in any relevant projects. For what it's worth, the only definition I found associated with the HRESULT you mentioned is MS_E_SOURCEALREADYDEFINED, but unless that makes sense to you, it's probably the wrong interface (that HRESULT's meaning is interface-dependent).

As far as adding the .lnk file or what it points to, it's an oversight and due to using defaults of the file browse dialogs, but it may be correct. It's fairly rare for a shortcut to be useful when copied to another machine in a different environment, so supporting the inclusion of .lnk files in a prerequisite seems like it would be of quite limited use. If we can clarify the reasons that it might be useful, we can certainly turn this into a enhancement request; in the mean time, it sounds like you found an effective workaround by editing the .prq file directly.
0 Kudos
Highlighted
Pilgrim

Re: Setup Prerequisite folder structures

Thanks Michael!

I ran process monitor on it but it didn't really tell me much. I see a bunch of Reg executions from the printer driver installer. Then once I close that I can my installer.exe try to read the particular registry key that goes missing. Is my main installer some how keeping track of the printer driver installer? The printer driver is "Seiko Smart Label Printer 7.1.1 R2". The registry key I know of that goes missing is:
[HKEY_CLASSES_ROOT\TypeLib\{521782C8-2A7C-4F4E-ACF9-F054DE73B10E}

I can manually install the printer driver then my installer with no trouble. This is undesirable. I can export all the registry entries then maybe using a custom action to let me know if the printer driver gets installed and then push those registry entries back in.
0 Kudos