Highlighted
Absent Member.
Absent Member.
3040 views

Show CMD window on batch files

There are a couple of great improvements in ZCM Script processing: 1) not requiring a specified interpreter for .bat files, and 2) not showing the CMD window (which was very intrusive and distracting in ZEN7).

However, there are times when I might want to show the CMD window. For instance, I often use bat files to run msiexec uninstall commands before reinstalling software like GroupWise. I like to be able to present the users with an "@echo Stuff is happening, please be patient..." message in the CMD window. I don't see any way to enable that.

What am I missing?

Holly Newman, MCNE Sr Systems Engineer Jackson Family Enterprises
Labels (2)
0 Likes
6 Replies
Highlighted
Absent Member.
Absent Member.

Re: Show CMD window on batch files

I think I have learned that the Run Executable directive will show a CMD window, but that's not a practical solution because in the case of GroupWise, I have about 20 msiexec uninstalls - one for each product code.

Holly Newman, MCNE Sr Systems Engineer Jackson Family Enterprises
0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: Show CMD window on batch files

Just call CMD.exe from a Launch Windows Executable function

On 3/15/2012 12:36 PM, hnewman wrote:
>
> There are a couple of great improvements in ZCM Script processing: 1)
> not requiring a specified interpreter for .bat files, and 2) not showing
> the CMD window (which was very intrusive and distracting in ZEN7).
>
> However, there are times when I might want to show the CMD window. For
> instance, I often use bat files to run msiexec uninstall commands before
> reinstalling software like GroupWise. I like to be able to present the
> users with an "@echo Stuff is happening, please be patient..." message
> in the CMD window. I don't see any way to enable that.
>
> What am I missing?
>
>



--
Craig Wilson - MCNE, MCSE, CCNA
Novell Knowledge Partner

Novell does not officially monitor these forums.

Suggestions/Opinions/Statements made by me are solely my own.
These thoughts may not be shared by either Novell or any rational human.
--
Please give a hearty thumbs up to any post you find helpful!
To find articles by Craig Wilson simply follow the link: Craig Wilson's Tips!
0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: Show CMD window on batch files

Or better yet, use a Windows Popup Message....

On 3/15/2012 12:38 PM, craig wilson wrote:
> Just call CMD.exe from a Launch Windows Executable function
>
> On 3/15/2012 12:36 PM, hnewman wrote:
>>
>> There are a couple of great improvements in ZCM Script processing: 1)
>> not requiring a specified interpreter for .bat files, and 2) not showing
>> the CMD window (which was very intrusive and distracting in ZEN7).
>>
>> However, there are times when I might want to show the CMD window. For
>> instance, I often use bat files to run msiexec uninstall commands before
>> reinstalling software like GroupWise. I like to be able to present the
>> users with an "@echo Stuff is happening, please be patient..." message
>> in the CMD window. I don't see any way to enable that.
>>
>> What am I missing?
>>
>>

>
>



--
Craig Wilson - MCNE, MCSE, CCNA
Novell Knowledge Partner

Novell does not officially monitor these forums.

Suggestions/Opinions/Statements made by me are solely my own.
These thoughts may not be shared by either Novell or any rational human.
--
Please give a hearty thumbs up to any post you find helpful!
To find articles by Craig Wilson simply follow the link: Craig Wilson's Tips!
0 Likes
Highlighted
Absent Member.
Absent Member.

Re: Show CMD window on batch files

I'm not sure how executing CMD would help - if I have 20 lines of batch code, I really need a script. And the Pop-up would be a good idea, but I don't know how to tell it to stay up until the next Directive is complete. Setting a time wouldn't help much, because (a) uninstall times vary based on version and machine speed, and (b) if the product isn't there to uninstall, it's very quick.

I suppose I could use text editing to build a bat file on the machine and then use CMD to launch it, but that seems pretty clunky.

Holly Newman, MCNE Sr Systems Engineer Jackson Family Enterprises
0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: Show CMD window on batch files

Because you can call a batch from there too.
You don't have to use section flagged script.

Also, actually using MSI Actions could work.
You can use far prettier Windows Dialogues than CMD prompts.
Last thing you want a user to do is close your now visible CMD prompt
while 20 apps install.

On 3/15/2012 1:06 PM, hnewman wrote:
>
> I'm not sure how executing CMD would help - if I have 20 lines of batch
> code, I really need a script. And the Pop-up would be a good idea, but I
> don't know how to tell it to stay up until the next Directive is
> complete. Setting a time wouldn't help much, because (a) uninstall times
> vary based on version and machine speed, and (b) if the product isn't
> there to uninstall, it's very quick.
>
> I suppose I could use text editing to build a bat file on the machine
> and then use CMD to launch it, but that seems pretty clunky.
>
>



--
Craig Wilson - MCNE, MCSE, CCNA
Novell Knowledge Partner

Novell does not officially monitor these forums.

Suggestions/Opinions/Statements made by me are solely my own.
These thoughts may not be shared by either Novell or any rational human.
--
Please give a hearty thumbs up to any post you find helpful!
To find articles by Craig Wilson simply follow the link: Craig Wilson's Tips!
0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: Show CMD window on batch files

And if you really want a script, use VBS.
Those Scripts let you launch dialogue and notices while not being able
to easily interrupt your actions.

On 3/15/2012 4:18 PM, craig wilson wrote:
> Because you can call a batch from there too.
> You don't have to use section flagged script.
>
> Also, actually using MSI Actions could work.
> You can use far prettier Windows Dialogues than CMD prompts.
> Last thing you want a user to do is close your now visible CMD prompt
> while 20 apps install.
>
> On 3/15/2012 1:06 PM, hnewman wrote:
>>
>> I'm not sure how executing CMD would help - if I have 20 lines of batch
>> code, I really need a script. And the Pop-up would be a good idea, but I
>> don't know how to tell it to stay up until the next Directive is
>> complete. Setting a time wouldn't help much, because (a) uninstall times
>> vary based on version and machine speed, and (b) if the product isn't
>> there to uninstall, it's very quick.
>>
>> I suppose I could use text editing to build a bat file on the machine
>> and then use CMD to launch it, but that seems pretty clunky.
>>
>>

>
>



--
Craig Wilson - MCNE, MCSE, CCNA
Novell Knowledge Partner

Novell does not officially monitor these forums.

Suggestions/Opinions/Statements made by me are solely my own.
These thoughts may not be shared by either Novell or any rational human.
--
Please give a hearty thumbs up to any post you find helpful!
To find articles by Craig Wilson simply follow the link: Craig Wilson's Tips!
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.