cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
nodnarb501
Level 3

Modify Virtualization options through the Automation interface?

Hi all,

I'm using IS2011 Premiere with Virtualization as part of a custom-built build and deployment system I created here to manage our build and deployment workflow. It checks out code from source, builds it, packages it into an InstallShield executable, and distributes it to a location for our Support personnel to use. The InstallShield portion of that uses the automation interface though the standalone build and has worked well for us.

With IS2011, I'd like to be able to create App-V packages that can be deployed to our internal App-V server, saving our Support people from having to uninstall/reinstall every time a new build is created. Our builds are specific to our customers, so we have to test with their installations each time they need us to look into an issue.

My goal is to be able to modify the app-v options through the automation interface, but I haven't found any objects in the new ISWiAuto17 to do that. I'm doing my development in C# on VisualStudio 2008. In the InstallShield project, I want to be able to change properties, such as the fields on the Package Information screen in order to give each build unique values. I want to do this so that each build can be a unique App-V package. Have I overlooked these objects or can the automation interface not modify them?

- B
Labels (1)
0 Kudos
(4) Replies
Alpesh
Flexera Alumni

Hi,

I do not believe that IS Automation Interface supports creation of App-V packages. Please try using the Windows Installer Converter command line options instead.

Thanks!
0 Kudos
nodnarb501
Level 3

Thank you Alpesh.

Is there any chance this will/could be added in the IS2011 service pack? A few objects that would allow us to modify these properties before building the installation would be great.

- B
0 Kudos
nodnarb501
Level 3

Here is the workaround I came up with.

Since IS2011 (RTM) cannot modify App-V values via the automation objects, I decided to take an approach that is a little cumbersome, but it gets the job done. I need to modify App-V values because we use IS projects like they are templates. We sell a customized software solution to our customers and the settings and files included with our installations vary slightly between our clients, so we use the IS automation objects to make changes to the project at build time and then throw away the changes each time the build is complete. The IS automation objects are great in that you can modify almost any aspect of an installation project, except for App-V.

To modify App-V values programmatically, I first went into the App-V designer in the project and entered unique strings into the values I want to modify at run time. For instance, in the Package Name field in the Package Information screen of the Microsoft App-V tab, I entered "APPVREPLACEPackageName" (without quotes). For Root Folder Name, I entered "APPVREPLACERootFolder" and so on. The project was then saved as XML (Installation Designer/General Information/Project File Format).

In my program that uses the IS automation interface, I make a copy of my Install Shield project file and save it as a new file. Next, I do a search and replace for my APPVREPLACExxx values that I want to be unique at build time. I then save the file and open it via the IS automation objects. I build the installation and then delete the IS project file that I modified.

Here is some example pseudo code in C#

StreamReader reader = new StreamReader(@"C:\IS2011 Projects\MyProject.ism");
string content = reader.ReadToEnd();
reader.Close();

content = Regex.Replace(content, "APPVREPLACEPackageName", "MyUniqueName");
// replace other values as needed

StreamWriter writer = new StreamWriter(@"C:\IS2011 Projects\MyProjectAppV.ism", false);
writer.Write(content);
writer.Close();

reader = null;
writer = null;
content = null;

// Open the temporary project file, change any other values you need to change, and call the build method


It is a simple solution that is a bit of a hack, but it works. Hope this idea helps out someone else out there.

- B
0 Kudos
andyamstrad
Level 6

Any idea when App-V will be included in the IS Automation Interface??
0 Kudos