AppDeploy.com

 


Call VBscript from Custom Action fail

Click here to associate this thread with a Package KB article.
Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [AppDeploy Forums] >> Package Development >> Call VBscript from Custom Action fail Page: [1]
Login
Message << Older Topic   Newer Topic >>
Call VBscript from Custom Action fail - 3/12/2010 7:22:08 AM   
cmi2000

 

Posts: 46
Score: 0
Joined: 5/15/2008
Status: offline
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??
Post #: 1
RE: Call VBscript from Custom Action fail - 3/12/2010 7:27:30 AM   
VBScab


Posts: 6623
Score: 190
Joined: 9/5/2006
From: London, UK
Status: offline
If the file is in your package, it would be a great deal simpler to use the DuplicateFile table.

_____________________________

- Don't know why 'x' happened? Want to know why 'y' happened? ProcMon will tell you.
- Try using http://www.google.com before posting.
- I answer questions only via forums. PMs and personal emails will be ignored.

(in reply to cmi2000)
Post #: 2
RE: Call VBscript from Custom Action fail - 3/12/2010 7:39:04 AM   
cmi2000

 

Posts: 46
Score: 0
Joined: 5/15/2008
Status: offline
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:\

(in reply to VBScab)
Post #: 3
RE: Call VBscript from Custom Action fail - 3/12/2010 7:40:26 AM   
pjgeutjens


Posts: 395
Score: 34
Joined: 7/12/2009
From: Leuven, Belgium
Status: offline
quote:

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)

< Message edited by pjgeutjens -- 3/12/2010 7:41:51 AM >


_____________________________

ǝɯıʇ ǝǝɹɟ ɥɔnɯ ooʇ ǝʌɐɥ noʎ sıɥʇ pɐǝɹ uɐɔ noʎ ɟı

(in reply to VBScab)
Post #: 4
RE: Call VBscript from Custom Action fail - 3/12/2010 9:38:37 AM   
cmi2000

 

Posts: 46
Score: 0
Joined: 5/15/2008
Status: offline
I put the CA into Deferred Execution, now it's working!
Thank you very much...

P/D: I like your subline text

(in reply to pjgeutjens)
Post #: 5
RE: Call VBscript from Custom Action fail - 3/12/2010 9:47:22 AM   
VBScab


Posts: 6623
Score: 190
Joined: 9/5/2006
From: London, UK
Status: offline
See here for details on the DuplicateFile table. 

_____________________________

- Don't know why 'x' happened? Want to know why 'y' happened? ProcMon will tell you.
- Try using http://www.google.com before posting.
- I answer questions only via forums. PMs and personal emails will be ignored.

(in reply to cmi2000)
Post #: 6
RE: Call VBscript from Custom Action fail - 3/12/2010 10:16:48 AM   
cmi2000

 

Posts: 46
Score: 0
Joined: 5/15/2008
Status: offline
This way works better!
Thank you



(in reply to VBScab)
Post #: 7
Page:   [1]
All Forums >> [AppDeploy Forums] >> Package Development >> Call VBscript from Custom Action fail Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

0.031