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
- :
- InstallScript:write to stdout
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
Aug 04, 2009
07:22 PM
InstallScript:write to stdout
Hi everyone. I am new to this form, so I have posted incorrectly please let me know. I am working with 2010 InstallScript and I have been assigned what I thought would be a simple task, but I cannot find any information on how to accomplish this. Please help. Here is what I have:
The installer is written in InstallScript. It is kicked off by using the windows command prompt and entering setup.exe and some argument. For example, if the argument /version is passed, I need to make the version display return from the setup.exe in the command prompt. I can make it return to a MessageBox, so the code is solid, but I need a silent solution. Any ideas will be appreciated. Thank you in advance, Tin Kan
The installer is written in InstallScript. It is kicked off by using the windows command prompt and entering setup.exe and some argument. For example, if the argument /version is passed, I need to make the version display return from the setup.exe in the command prompt. I can make it return to a MessageBox, so the code is solid, but I need a silent solution. Any ideas will be appreciated. Thank you in advance, Tin Kan
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Aug 05, 2009
11:34 AM
Since installations built by InstallShield (Windows Installer or InstallScript projects) are Win32 GUI mode applications, they have no console allocated to them after they are launched. As such, it would be necessary to allocate a new console (with AllocConsole) and obtain the standard output handle from Windows (with GetStdHandle). You could also possibly attach to the parent process' console with AttachConsole. In either case, these APIs will need to be prototyped to be able to use them through InstallScript. No predefined functionality is included in any project type in InstallShield to be able to write to a console standard output handle.
More information on consoles can be found in the MSDN article Consoles.
Note that it would be simpler to write any information needed to a text file (since InstallScript does provide functions to read and write to text files) compared with trying to send output to a console window.
More information on consoles can be found in the MSDN article Consoles.
Note that it would be simpler to write any information needed to a text file (since InstallScript does provide functions to read and write to text files) compared with trying to send output to a console window.