/build/static/layout/Breadcrumb_cap_w.png

Call VBscript from Custom Action fail

Hi people!
I'm packaging an application with Wise Package Studio 7, and after of installation I have to copy a file from the program folder to c:\, so I did a basic Vbsript :
Dim fso, f2
Set fso = CreateObject("Scripting.FileSystemObject")
Set f2 = fso.GetFile("C:\program files\IPC2009\PDOXUSRS.NET")
' Copiar el archivo al directorio c:\
f2.Copy ("C:\PDOXUSRS.NET")

I ran this vbscript from a Custom Action (Execute Inmediate tab) before InstallFinalize. When I'm installing, appears an error message 1720, in the log file, it shows "Error 1720, Line 3, Char 1 file not found". But if I run this script manually, it works well!
Does anyone knows how can I solve it??

0 Comments   [ + ] Show comments

Answers (6)

Posted by: anonymous_9363 14 years ago
Red Belt
0
If the file is in your package, it would be a great deal simpler to use the DuplicateFile table.
Posted by: cmi2000 14 years ago
Senior Purple Belt
0
Thank you VBScab, the file is in my package, how can I do that?
If I just have to create a new row in DuplicateFile table, what have I to put into "DestFolder"? It isn't a folder, is C:\
Posted by: pjgeutjens 14 years ago
Red Belt
0
If the file is in your package, it would be a great deal simpler to use the DuplicateFile table.

Also if the above is the case, during the execute immediate phase your files won't be in place yet when you run your CA since they only actually get installed during Deferred execution

(that is, execute immediate before InstallFinalize)
Posted by: cmi2000 14 years ago
Senior Purple Belt
0
I put the CA into Deferred Execution, now it's working!
Thank you very much...

P/D: I like your subline text [;)]
Posted by: anonymous_9363 14 years ago
Red Belt
0
See here for details on the DuplicateFile table.
Posted by: cmi2000 14 years ago
Senior Purple Belt
0
This way works better!
Thank you
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ