in reply to Re^2: Perl script to change product code and product version in installshiled project (.ism) file?
in thread Perl script to change product code and product version in installshiled project (.ism) file?

Hi I have written following code to read the data from .ism file. Similar way I will write a code to write data in .ism file but my code is failing with an error saying "Can't call method "OpenProject" on an undefined value at C:\Test\Update_ism.pl line 15." Following is the code. Can you please suggest how do I get rid of this.
use Win32::Guidgen; use Win32::OLE; my $guid = Win32::Guidgen::generate(); #Generate GUID for Product code +. # instantiate the Developer Automation interface $dev = Win32::OLE->new("ISWiAutomation.ISWiProject"); # open a project file. $dev->OpenProject("C:\\InstallShield 2010 Projects\\Test.ism") or die +"Can not open project file:$!"; print "ProductName: " , $dev->ProductName, "\n", "ProductVersion: ", $dev->ProductVersion, "\n"; # close the project $dev->CloseProject( );
  • Comment on Re^3: Perl script to change product code and product version in installshiled project (.ism) file?
  • Download Code