PC Review


Reply
Thread Tools Rate Thread

CMD.exe, AD and Beeps

 
 
Adrian Marsh
Guest
Posts: n/a
 
      26th Jul 2004
All,

I'm writing login scripts for my AD W2K environment.

At the moment they are in normal .bat scripts using CMD.EXE

My problem is this,  if any of my scripts run apps (.exe files) that return an errorlevel > 0, then at the end of execution the PC beeps. Actually it repeats the beeps for the total number of times that an app has returned >0, eg If I run setup.exe 5 times, and Cancel the app 5 times, I get 5 beeps.  All the beeps are saved until my login.bat finishes.

So - how can I switch off the annoying beeps?

If I put a "set ERRORLEVEL=0" at the end of the scripts, it stills beeps.

Besides that, I'm happy with the scripts, so I don't want to have to learn another script language and re-write them.

Another alternative partial solution is if anyone knows a .exe file that can display window informational messages, along with say - an OK button.  The tool I'm using at the moment uses ERRORLEVEL to return the button pressed, 1=OK,2=Cancel, etc, but then that causes the above beeps... arrghh!

Adrian
 
Reply With Quote
 
 
 
 
Mark V
Guest
Posts: n/a
 
      27th Jul 2004
In microsoft.public.win2000.cmdprompt.admin Adrian Marsh wrote:

> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
> <html>


Sorry. Most won't even try to read postings in HTML. Plain text
please.
 
Reply With Quote
 
Adrian Marsh
Guest
Posts: n/a
 
      27th Jul 2004
Ok, Rewritten:

All,

I'm writing login scripts for my AD W2K environment.

At the moment they are in normal .bat scripts using CMD.EXE

My problem is this, if any of my scripts run apps (.exe files) that
return an errorlevel > 0, then at the end of execution the PC beeps.
Actually it repeats the beeps for the total number of times that an app
has returned >0, eg If I run setup.exe 5 times, and Cancel the app 5
times, I get 5 beeps. All the beeps are saved until my login.bat finishes.

So - how can I switch off the annoying beeps?

If I put a "set ERRORLEVEL=0" at the end of the scripts, it stills beeps.

Besides that, I'm happy with the scripts, so I don't want to have to
learn another script language and re-write them.

Another alternative partial solution is if anyone knows a .exe file that
can display window informational messages, along with say - an OK
button. The tool I'm using at the moment uses ERRORLEVEL to return the
button pressed, 1=OK,2=Cancel, etc, but then that causes the above
beeps... arrghh!

Adrian


Mark V wrote:
> In microsoft.public.win2000.cmdprompt.admin Adrian Marsh wrote:
>
>
>><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
>><html>

>
>
> Sorry. Most won't even try to read postings in HTML. Plain text
> please.

 
Reply With Quote
 
Michael Bednarek
Guest
Posts: n/a
 
      28th Jul 2004
On Tue, 27 Jul 2004 20:59:30 +0100, Adrian Marsh <(E-Mail Removed)>
wrote in microsoft.public.win2000.cmdprompt.admin:

>I'm writing login scripts for my AD W2K environment.
>
>At the moment they are in normal .bat scripts using CMD.EXE
>
>My problem is this, if any of my scripts run apps (.exe files) that
>return an errorlevel > 0, then at the end of execution the PC beeps.
>Actually it repeats the beeps for the total number of times that an app
>has returned >0, eg If I run setup.exe 5 times, and Cancel the app 5
>times, I get 5 beeps. All the beeps are saved until my login.bat finishes.
>
>So - how can I switch off the annoying beeps?
>
>If I put a "set ERRORLEVEL=0" at the end of the scripts, it stills beeps.
>
>Besides that, I'm happy with the scripts, so I don't want to have to
>learn another script language and re-write them.
>
>Another alternative partial solution is if anyone knows a .exe file that
>can display window informational messages, along with say - an OK
>button. The tool I'm using at the moment uses ERRORLEVEL to return the
>button pressed, 1=OK,2=Cancel, etc, but then that causes the above
>beeps... arrghh!


set ERRORLEVEL=0 does nothing useful. What do you expect it to do?

Post the script. Which applications does it run? How does it start them?
What are the client operating systems?

There are oodles of MSGBOX.EXE, MESSAGEBOX.EXE and the like utilities
around. The first two my search brought up were:
<http://www.paulsadowski.com/WSH/cmdprogs.htm> and
<http://claudiosoft.online.fr/msgbox.html>. Some CLIs have this built
in: see <http://jpsoft.com/help/msgbox.htm>. The easiest way would
probably be to construct a MsgBox/PopUp with VBS. Or use KiXtart.

--
Michael Bednarek http://mbednarek.com/ "POST NO BILLS"
 
Reply With Quote
 
Adrian Marsh
Guest
Posts: n/a
 
      7th Aug 2004
I thought the SET ERRORLEVEL might clear the beeps, but it doesn't - any
idea how too? Its multiple scripts, so not easy to post. An example is:


.....
.....
rem execute installer:
rem (%1 being the .exe installer passed to the script)

%1
if not errorlevel 0 goto _error
echo Installed %1 OK >> %LOG%

:_error
rem end script, return to master.

Lets say the master script calls the above script 3 times, with 3
seperate .exe files, and they all return an errorcode > 0, then I would
hear 3 beeps when the master script finishes on the client. This
applies to the msgbox tools you list below too. So if I have 3 pop-ups
for 3 tools, then I could get 6 beeps...

I'm modifying the scripts now so that they don't use msgboxes unless
absolutlely necessary, I'll use "pop-up" dos windows to give a message
as to whats happening (like "Installing McAfee...") and start the
installer. So then the only time it'll beep is if theres been an
installer failure.

Once I've finished the initial deploy of the s/w, and have time, I plan
too look at the kixstart tools too.

Thanks for your help.

A.

Michael Bednarek wrote:

> On Tue, 27 Jul 2004 20:59:30 +0100, Adrian Marsh <(E-Mail Removed)>
> wrote in microsoft.public.win2000.cmdprompt.admin:
>
>
>>I'm writing login scripts for my AD W2K environment.
>>
>>At the moment they are in normal .bat scripts using CMD.EXE
>>
>>My problem is this, if any of my scripts run apps (.exe files) that
>>return an errorlevel > 0, then at the end of execution the PC beeps.
>>Actually it repeats the beeps for the total number of times that an app
>>has returned >0, eg If I run setup.exe 5 times, and Cancel the app 5
>>times, I get 5 beeps. All the beeps are saved until my login.bat finishes.
>>
>>So - how can I switch off the annoying beeps?
>>
>>If I put a "set ERRORLEVEL=0" at the end of the scripts, it stills beeps.
>>
>>Besides that, I'm happy with the scripts, so I don't want to have to
>>learn another script language and re-write them.
>>
>>Another alternative partial solution is if anyone knows a .exe file that
>>can display window informational messages, along with say - an OK
>>button. The tool I'm using at the moment uses ERRORLEVEL to return the
>>button pressed, 1=OK,2=Cancel, etc, but then that causes the above
>>beeps... arrghh!

>
>
> set ERRORLEVEL=0 does nothing useful. What do you expect it to do?
>
> Post the script. Which applications does it run? How does it start them?
> What are the client operating systems?
>
> There are oodles of MSGBOX.EXE, MESSAGEBOX.EXE and the like utilities
> around. The first two my search brought up were:
> <http://www.paulsadowski.com/WSH/cmdprogs.htm> and
> <http://claudiosoft.online.fr/msgbox.html>. Some CLIs have this built
> in: see <http://jpsoft.com/help/msgbox.htm>. The easiest way would
> probably be to construct a MsgBox/PopUp with VBS. Or use KiXtart.
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
beeps,,beeeps and beeps shima_sfp Asus Motherboards 1 12th Oct 2004 08:52 AM
P4P800 deluxe 2 beeps , what are those beeps? JUSTME Asus Motherboards 1 5th Feb 2004 11:22 PM
System Beeps - Five Beeps (One long, two short, high pitch, low pitch) Huw E Computer Hardware 3 30th Jan 2004 03:49 AM
System Beeps - Five Beeps (One long, two short, high pitch, low pitch) Huw E Asus Motherboards 1 29th Jan 2004 08:24 AM
System Beeps - Five Beeps (One long, two short, high pitch, low pitch) Huw E Computer Hardware 0 28th Jan 2004 10:58 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:43 PM.