OTomkins
Posts: 7
Joined: Wed Jul 18, 2007 6:21 pm
Contact: ICQ

"Start from network" is not available...

Hi,

I'm nearly finished with the Installer I am working on.

But I've got one last problem:
When I do an "Administrative Install" to a Network drive (with msiexec.exe /a mysetup.msi) and start the msi from that Network Drive I would like the user to be able to select "Start from Network Drive (or location)" in the feature list. But the User can only select "Install on local drive" and "This component will not be installed".

The only Option set in the component view of advanced installer is "Dissalow advertise".

What do I have to do so that the user can select that option.

Thanks in advance.

Oliver
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,

In order to have access to this option you need to make sure that all the components in the feature (even the ones in it's subfeatures) have "Optional" checked in the "Attributes" section.

If you need to make this option default then you can set the feature with the "Favor Source" option.

You can read more about these attributes here:
http://www.advancedinstaller.com/user-g ... rties.html
http://www.advancedinstaller.com/user-g ... rties.html

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
OTomkins
Posts: 7
Joined: Wed Jul 18, 2007 6:21 pm
Contact: ICQ

Hi,

thanks for your answer. It works now.

But the problem that I now have is that the working directory of the shotcuts shows to [APPDIR], but the APPDIR is going to be empty, as everything will then be execute from the network drive.

Can you please explain how I can change the working directory of a shortcut so that it shows to the network location were we are installing from?

Thanks,
Oliver
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,
Can you please explain how I can change the working directory of a shortcut so that it shows to the network location were we are installing from?
This can be done by using a property based folder. First, in the "Install Parameters" page you create a public property (for example S_DIR) with the value set to the network location.

In the "Files and Folders" page you create a property-based folder using the S_DIR property, you double-click the shortcut and in the "Paths" section you use the "..." button in the "Working Directory" field to select the property-based folder.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Loke
Posts: 5
Joined: Thu Dec 06, 2007 10:47 am

Ame problem...

I have a bit of the same problem. I am building a small install for putting systemfiles and a shortcut on the desktop of client computers running the program from a network location. My problem is that I never know where that location is going to be. Is it F:\Myprog or \\server\Myprog? So what can I put in the value for the public property that will set the working directory to where the install is running from? I have tried using [SourceDir] but that doesn't do the trick.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,

Here are the steps to accomplish what you need:
- in the "Install Parameters" page you create a public property, for example MY_DIR with the value set to "C:\"
- in the "Files and Folders" page you create a property-based folder using the MY_DIR property
- in the "Custom Actions" page you create a "Property Set with Formatted" custom action under the "CostFinalize" standard action which looks like this:

Code: Select all

Property Name: MY_DIR
Formatted Text: [SourceDir]
Expression: (Not Installed) (this field is in the "Execution Condition")
- in the "Files and Folders" page you create your shortcut and in the "Working Directory" field you select the "MY_DIR" folder
- you build the project
- you open the MSI with Orca
- in the "InstallExecuteSequence" table you add this action:

Code: Select all

Action: ResolveSource
Condition: 
Sequence: 951
- you save the MSI

Now the working directory of the shortcut will be set to the folder from which the installation is run.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Loke
Posts: 5
Joined: Thu Dec 06, 2007 10:47 am

Thanks a lot that worked nicely :D

My next challenge is that I have to do a search for about 10 different files in the subfolders of the msi location and create shortcuts to the files that are found... Any hints to put me on the right track?
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,

I'm not sure why you need this. Are these files a part of the installation package? Can you please give me more details?

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Loke
Posts: 5
Joined: Thu Dec 06, 2007 10:47 am

The install is for client installation of software placed on a fileserver (share). All the programs are to remain on the server, only needed systemfiles and shortcuts to be installed on the clients. Depending on the installation that has been done on the server there is a different number of progamfiles to make shortcuts to, and I only want shortcuts created for the files that are actually there. So the task is to verify the existence of the files before the shortcuts are created, and each of them will have different appdir and working dir to put in the shortcut. I'll have a go at it over the weekend and see how it goes :D
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,

This can be done only by using an EXE bootstrapper for your installation package. Here are the steps:
- in the "Install Parameters" page you create the SETUPEXEDIR property with the value set to "C:\" (it will be set automatically at the beginning of the installation to the real value)
- in the "Files and Folders" page you create a property-based folder using the SETUPEXEDIR property
- in the "Search" page you create the searches for the files you need (you will use as a location the folder with the property SETUPEXEDIR)
- in the "Files and Folders" page you create shortcuts to the external files with this configuration:

Code: Select all

Shortcut Target: RESULT_PROPERTY (the property used by a search)
Working Directory:   (empty) 
- you run the installation by using the EXE bootstrapper

Let me know if you encounter any problems.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Loke
Posts: 5
Joined: Thu Dec 06, 2007 10:47 am

Re:

cosmin wrote:Hi,

Here are the steps to accomplish what you need:
- in the "Install Parameters" page you create a public property, for example MY_DIR with the value set to "C:\"
- in the "Files and Folders" page you create a property-based folder using the MY_DIR property
- in the "Custom Actions" page you create a "Property Set with Formatted" custom action under the "CostFinalize" standard action which looks like this:

Code: Select all

Property Name: MY_DIR
Formatted Text: [SourceDir]
Expression: (Not Installed) (this field is in the "Execution Condition")
- in the "Files and Folders" page you create your shortcut and in the "Working Directory" field you select the "MY_DIR" folder
- you build the project
- you open the MSI with Orca
- in the "InstallExecuteSequence" table you add this action:

Code: Select all

Action: ResolveSource
Condition: 
Sequence: 951
- you save the MSI

Now the working directory of the shortcut will be set to the folder from which the installation is run.

Regards,
Cosmin
A new problem has appeared with the release of Windows XP SP3. Shortcuts to the app in the sourcedir are no longer created. I have used the method qouted above and it has worked nicely for all versions of Windows, even Vista, but not Windows XP with SP3 installed. Any solution?
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: "Start from network" is not available...

Hi,

I tested this scenario on Windows XP SP3 and the solution works correctly. Note that the Service Pack 3 should not affect this behavior. Please try your package on other machines and let me know if the problem persists.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Loke
Posts: 5
Joined: Thu Dec 06, 2007 10:47 am

Re: "Start from network" is not available...

I have tested it on 4 computers running XP (Norwegian version) and one of our customers "tested" it on 3000 computers (that is how we became aware of the problem). I have also tested it (a new build) on Win 2K3 SBS and it failed to create the shortcuts there too, so I guess you are right that the problem is not related to SP3. I have tried rebuilding the msi from scratch, but the result is the same. The shortcutfolder is created, but it is empty. I have also added a shortcut to be placed on the desktop, but still no success. The buildcomputer is running the latest version of AI on Win XP with all avaiable updates from MS installed. Suggestions?
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: "Start from network" is not available...

Hi,

Usually a shortcut is not created if its target cannot be found. Can you please send us your AIP to support at advancedinstaller dot com so we can investigate it?

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”