Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

ImportProject


4 replies to this topic

vishnub

vishnub
  • Full Members
  • 63 posts

Posted 21 September 2004 - 08:14


Hi all,

I am using InstallShield X automation interface, in that i can able to export a project using ExportProject method which converts the .ism file to .isv (text file format), at the same time while importing a project(.isv to .ism) i got an error
here is the code:

\\ Exporting Section :

set oISWiProject = CreateObject("ISWiAuto10.ISWiProject");
if (IsObject(oISWiProject) = FALSE) then
MessageBox("Error in Project",0);
return -1;
endif;

oISWiProject.OpenProject("C:\\My InstallShield X Projects\\MsiObj.ism");

sIsv = "C:\\My InstallShield X Projects\\SampleMsiObj.isv" ;
nResult = oISWiProject.ExportProject(sIsv);

oISWiProject.SaveProject;
oISWiProject.CloseProject;


\\ Importing Section :
set oISWiProject = CreateObject("ISWiAuto10.ISWiProject");
if (IsObject(oISWiProject) = FALSE) then
MessageBox("Error in Project",0);
return -1;
endif;


sDIsm = "C:\\My InstallShield X Projects\\MsiObjSample.ism";
sIsv = "C:\\My InstallShield X Projects\\SampleMsiObj.isv" ;

nResult = oISWiProject.ImportProject(sDIsm, sIsv);

oISWiProject.SaveProject;
oISWiProject.CloseProject;


The error is :

Error Number: 0x800A03F1
Description: An error occured while Importing the project: Invalid procedure call or argument
>ISMImportExport.CTextLayer.DoOldImport
>ISMImportExport.CTextLayer.ITextLayer_Import

Setup will now terminate.


Can anyone help me in this issue.

Thanks in advance.

Regards
Vishnu

rolleyes.gif

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 21 September 2004 - 11:35

Maybe this is no longer supported in InstallShield X? The preferred method is now to switch the project file format to XML which eliminates the need to export or import.

vishnub

vishnub
  • Full Members
  • 63 posts

Posted 21 September 2004 - 17:07

Thank you Stefan, for your support.

Yes, instead of exporting the project, if i change the project file format from binary to XML. I get the same effect. So how can i do for importing.

Thanks,
Vishnu

happy.gif

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 22 September 2004 - 10:32

The idea behing exporting is to convert the binary project file to a text format. By switing to XML the project file itself is already in text format (xml file with .ism extension) thus amking export/import functionaliyt obsolete.

vishnub

vishnub
  • Full Members
  • 63 posts

Posted 27 September 2004 - 06:35

Thanks Stefan, I got the concept of saving the project as XML file format.