I'm trying to run a VB script placing that in Custom Action. But i'm Getting Error mesage 1720.If i'm trying to run the same script outside i can run that without any issues. Can you please look at this script and let me know what i'm making mistake. I will be using Wise Package Studio 7.0Sp3.
Option Explicit
Dim ObjFSO, objShell
Set objShell = CreateObject("WScript.Shell")
Set objFSO = CreateObject("Scripting.FileSystemObject")
objShell.Run "%windir%\Package.EXE /s"

Thanks in Advance..
0 Comments   [ - ] Hide Comments


Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
Answer this question or Comment on this question for clarity


Hi Usha...

the script seems to be fine, you should check the sequence of the custom I would suggest to place this custom just before install finalize with Deffered execution system context if you dont have any user specific config in this package.EXE
Answered 06/08/2011 by: sunny07
Senior Yellow Belt

Please log in to comment
1) you should be delivering a package.exe file to that location.
2) you need to resolve %windir% with something like objShell.ExpandEnvironmentStrings("%windir%") or similar
3) as stated previously be previous poster
4) you should wait for execution to complete and send back the return code to the calling CA.
5) you need to have a commit / rollback CA to match the deferred CA mentioned in 3) and 4)
Answered 06/08/2011 by: jmcfadyen
Fifth Degree Black Belt

Please log in to comment
You are calling environmental variables, you need to get value of windir by adding


objWINDIR = objShell.ExpandEnvironmentStrings("%windir%")
Answered 06/08/2011 by: er.hsingh
Orange Senior Belt

Please log in to comment
Have you checked whether PACKAGE.EXE extracts and executes any MSIs? If it does, your CA will fail anyway.

Also, are you sure you know what PACKAGE.EXE does to your workstations? I *always* re-package anything which isn't in MSI form if, for no other reason, than to know what I'm unleashing on my client's estate.
Answered 06/09/2011 by: VBScab
Red Belt

Please log in to comment
.....and once you've finished checking out the solutions presented by the helpful people above, do you really need to create a FileSystemObject if you're not going to use it? Or better still.....maybe you keep it, and actually use it to check if Package.EXE exists in the first place before trying to run it?

And to John - number 5, hey? That's hardcore custom action writing that is.... [;)]
Answered 06/09/2011 by: captain_planet
Fourth Degree Brown Belt

Please log in to comment