PDA

View Full Version : Copy File Action question



dmcelfci
05-20-2003, 10:23 AM
I'm trying to make my install ask the user for the location of a file and then copy that file to a directory I'm installing. I can make it work fine if I hardcode the file I want to be the source. When I try to use String Resolution to find my source file $W(beanid.property), I get an exception.

I've also tried passing it back as a Product Bean property which doesn't seem to work for me either. I know this must be a fairly common task and I am probably just missing something.

Jeff Dillon
05-20-2003, 11:00 AM
What exact values are you specifying for the properties of the Copy File bean?

dmcelfci
05-20-2003, 12:02 PM
Source = $W(OraclePanel.OracleDriver)
* resolves to c:\temp\oracle.jar

target=lib/oracle.jar

When I try this, I get the exception below(C:\installer is the directory I'm installing to).


(May 20, 2003 11:12:04 AM), Install.product.install, com.installshield.product.actions.CopyFile, err, ProductException: (error code = 601; message="err"; additional data = [C:\installer\ is an existing file])
STACK_TRACE: 13
ProductException: (error code = 601; message="err"; additional data = [C:\installer\ is an existing file])
at com.installshield.product.actions.CopyFile.install(CopyFile.java:42)
at com.installshield.product.actions.CopyFile.replace(CopyFile.java:117)
at com.installshield.product.service.product.PureJavaProductServiceImpl.replaceProductAction(PureJavaProductServiceImpl.java:1928)
at com.installshield.product.service.product.PureJavaProductServiceImpl$InstallProduct.getResultForReplaceProductAction(PureJavaProductServiceImpl.java:5383)
at com.installshield.product.service.product.InstallableObjectVisitor.replaceComponent(InstallableObjectVisitor.java:578)
at com.installshield.product.service.product.InstallableObjectVisitor.visitInstallableComponents(InstallableObjectVisitor.java:335)
at com.installshield.product.service.product.InstallableObjectVisitor.visitProductBeans(InstallableObjectVisitor.java:133)
at com.installshield.product.service.product.PureJavaProductServiceImpl$InstallProduct.install(PureJavaProductServiceImpl.java:4532)
at com.installshield.product.service.product.PureJavaProductServiceImpl$Installer.execute(PureJavaProductServiceImpl.java:3727)
at com.installshield.wizard.service.AsynchronousOperation.run(AsynchronousOperation.java:40)
at java.lang.Thread.run(Unknown Source)

dmcelfci
05-20-2003, 01:54 PM
Not sure what exactly I was doing wrong, but I have it working fine now.