This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Difficulty creating jscript file for custom actions
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Apr 22, 2011
01:33 PM
Difficulty creating jscript file for custom actions
Your product is a breath of fresh air compared to the VS 2008 deployment project that I have used in the past.
I want to use a JScript file to perform custom actions after initialization. I need to put up a MessageBox to the user to confirm or skip the action and if confirmed, use the file system to make backup copies of certain files.
I created a JScript file which runs fine with the Windows Script Host. I started to modify it to remove the use of the WScript object, but got error 1720 when I tried to use Popup. I could substitute the Session Object Message method, but it is pretty low level. The next hurdle will be how to create a FileSystem object. Can you point me to any examples of JScript files that work with the Windows Installer?
I want to use a JScript file to perform custom actions after initialization. I need to put up a MessageBox to the user to confirm or skip the action and if confirmed, use the file system to make backup copies of certain files.
I created a JScript file which runs fine with the Windows Script Host. I started to modify it to remove the use of the WScript object, but got error 1720 when I tried to use Popup. I could substitute the Session Object Message method, but it is pretty low level. The next hurdle will be how to create a FileSystem object. Can you point me to any examples of JScript files that work with the Windows Installer?
(3) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Apr 26, 2011
08:17 AM
Hi,
Kindly take few moments to have a look at the following MSDN Articles which discusses on creating FileSystem Object using Jscript
http://msdn.microsoft.com/en-us/library/2z9ffy99%28VS.85%29.aspx
http://support.microsoft.com/kb/229693
http://msdn.microsoft.com/en-us/library/aa208404%28office.11%29.aspx
Also kindly refer the topic InstallShield Help Library that is installed with InstallShield Limited Edition “JScript Custom Action Settings”
Thanks,
Madusree
Kindly take few moments to have a look at the following MSDN Articles which discusses on creating FileSystem Object using Jscript
http://msdn.microsoft.com/en-us/library/2z9ffy99%28VS.85%29.aspx
http://support.microsoft.com/kb/229693
http://msdn.microsoft.com/en-us/library/aa208404%28office.11%29.aspx
Also kindly refer the topic InstallShield Help Library that is installed with InstallShield Limited Edition “JScript Custom Action Settings”
Thanks,
Madusree
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Apr 26, 2011
06:29 PM
Thank you for the references to documentation pages that have helped me get started. The file system object is working now in my JScript test.
I started with JScript because the syntax is familiar. Today I also started a VBScript test. I see now that VBScript is much easier to debug.
I found a large collection of Windows Scripting Examples in the Installer SDK, all in VBScript. Almost all examples in the Flexera Software Community forums are in VBScript.
VBScript has MessageBox, which conducts a professional looking dialog with the user.
Should I infer that JScript does not have the features and capability of VBScript for the purpose of writing custom action scripts?
Am I crazy to keep tring to use JScript for writing custom action scripts?
Thanks for advice.
I started with JScript because the syntax is familiar. Today I also started a VBScript test. I see now that VBScript is much easier to debug.
I found a large collection of Windows Scripting Examples in the Installer SDK, all in VBScript. Almost all examples in the Flexera Software Community forums are in VBScript.
VBScript has MessageBox, which conducts a professional looking dialog with the user.
Should I infer that JScript does not have the features and capability of VBScript for the purpose of writing custom action scripts?
Am I crazy to keep tring to use JScript for writing custom action scripts?
Thanks for advice.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Apr 28, 2011
02:06 AM
Hi,
VBScript does offer a number of useful features that JavaScript does not, such as MsgBox, InputBox and String. To make these available in JavaScript, you have to create a script that creates an object that works as a wrapper for these functions in JavaScript. The object should have a method for each VBScript function, which can be used to call these functions. This allows you to use them from JavaScript as if they were a normal part of JavaScript
Also kindly take a look on the following MSDN Article which discusses on Custom Action Types supporting JScript and VBScript
http://msdn.microsoft.com/en-us/library/aa371538%28v=vs.85%29.aspx
Thanks,
Madusree
VBScript does offer a number of useful features that JavaScript does not, such as MsgBox, InputBox and String. To make these available in JavaScript, you have to create a script that creates an object that works as a wrapper for these functions in JavaScript. The object should have a method for each VBScript function, which can be used to call these functions. This allows you to use them from JavaScript as if they were a normal part of JavaScript
Also kindly take a look on the following MSDN Article which discusses on Custom Action Types supporting JScript and VBScript
http://msdn.microsoft.com/en-us/library/aa371538%28v=vs.85%29.aspx
Thanks,
Madusree