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
- :
- Run a vbs or exe during the setup
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
‎Oct 22, 2007
08:30 AM
Run a vbs or exe during the setup
In the InstallScript Project I'm have modify the function OnFirstUIBefore().
...
...
Dlg_SelectInstance:
nResult = SQLServerSelect(szMessage,szserver);
if (nResult = BACK) goto Dlg_Start;
if (szserver != "New instance") then
nResult = SQLServerSelectLogin
(szserver,szuser,szpassword,bAuth);
if (nResult = BACK) goto Dlg_SelectInstance;
else
//run VBS or EXE
endif;
if the user select a valid instance in SQLServerSelect Dialog, I show SQLServerSelectLogin Dialog and run an SQL SCRIPT
else I have to run SQLEXPR.EXE in command line for install a new instance of SQL EXPRESS.
I don't know if it is possible.
Do you have any ideas to help me?
Thanks!!!
...
...
Dlg_SelectInstance:
nResult = SQLServerSelect(szMessage,szserver);
if (nResult = BACK) goto Dlg_Start;
if (szserver != "New instance") then
nResult = SQLServerSelectLogin
(szserver,szuser,szpassword,bAuth);
if (nResult = BACK) goto Dlg_SelectInstance;
else
//run VBS or EXE
endif;
if the user select a valid instance in SQLServerSelect Dialog, I show SQLServerSelectLogin Dialog and run an SQL SCRIPT
else I have to run SQLEXPR.EXE in command line for install a new instance of SQL EXPRESS.
I don't know if it is possible.
Do you have any ideas to help me?
Thanks!!!
(3) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 22, 2007
10:17 PM
You could call LaunchAppAndWait but instead of going out of process, have you considered just porting the VBScript to InstallScript? The languages are very similar in the COM support syntax and translation is pretty straight forward. This should make it more reliable and easier to handle errors and pass data back and forth.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 23, 2007
01:56 AM
Hi,
For your problem, in your else code
you can use the launchapp or launchappAndWait function of installscript.
these function start an exe and can receive some parameters.
it simply to use and work fine.
Now if you want to start a vbs in your else i don't know if it's possible in installscript !!!!
perhpas create a custom action and stored vbs in this custom action and try to run in your code but i've never seen how to call a custom action in installscript !!!
Have a nice day
Christophe
For your problem, in your else code
if (nResult = BACK) goto Dlg_SelectInstance;
else
//run VBS or EXE
endif;
you can use the launchapp or launchappAndWait function of installscript.
these function start an exe and can receive some parameters.
it simply to use and work fine.
Now if you want to start a vbs in your else i don't know if it's possible in installscript !!!!
perhpas create a custom action and stored vbs in this custom action and try to run in your code but i've never seen how to call a custom action in installscript !!!
Have a nice day
Christophe
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 23, 2007
07:11 AM
ChristopheOce wrote:
Now if you want to start a vbs in your else i don't know if it's possible in installscript !!!!
You can, it's just a question of `why?`. Use LaunchAppAndWait to call wscript with /B for batch /NOLOGO and the name of your script.
Still, you can read the VBScript which means you can port it native for a better experience.