justinm
(Getting the hang of it)
2003-09-24 02:32 AM
changing the beep sound

Hi guys, I was just wondering if there was an easy way to change the "beep" sound that occurs during logon, I wouldn't mind changing it to the chime.wav sample file that came with KiX. Thanks in advance. I forgot to mention this in my last post, but you guys are great and very helpful. I probably wouldn't have been able to get my script working without you.

Justin


Les
(KiX Master)
2003-09-24 02:39 AM
Re: changing the beep sound

Why does it beep during logon for you? It doe not beep for me. There should not be any beep unless there is an error.

justinm
(Getting the hang of it)
2003-09-24 02:45 AM
Re: changing the beep sound

Hmm I suppose there is an error then. I'm deploying the script using a GPO, and a box doesn't appear. I've heard that if I deploy the script in the profile of the user a box will then appear. I will try this now and report back.

justinm
(Getting the hang of it)
2003-09-24 02:47 AM
Re: changing the beep sound

In my user account, I specified a logon script instead of the GPO, however no box appeared and it did beep. All the mappings worked however.

Kdyer
(KiX Supporter)
2003-09-24 07:32 AM
Re: changing the beep sound

Can you post your script? Maybe KiXStrip or PostPrep would highlight the issue.

Kent


justinm
(Getting the hang of it)
2003-09-24 04:59 PM
Re: changing the beep sound

IF INGROUP("GDPLCA-payroll")
use s: /delete /persistent
use S: "\\vnsv20007\payroll"
if @error <> 0
? "Error: " + @error + " " + @serror
endif
ELSE
? "Ingroup returned false."
ENDIF

IF INGROUP("Domain Users")
use g: /delete /persistent
use g: "\\vnsv20007\server"
if @error <> 0
? "Error: " + @error + " " + @serror
endif
ELSE
? "Ingroup returned false."
ENDIF

IF INGROUP("DPRLCA-accpac")
use p: /delete /persistent
use p: "\\vnsv20007\accpac"
if @error <> 0
? "Error: " + @error + " " + @serror
endif
ELSE
? "Ingroup returned false."
ENDIF

IF INGROUP("DPRLCA-FinanceShare")
use f: /delete /persistent
use f: "\\vnsv20007\finance"
? "Error: " + @error + " " + @serror
endif
ELSE
? "Ingroup returned false."
ENDIF


Kdyer
(KiX Supporter)
2003-09-24 05:04 PM
Re: changing the beep sound

Running this through KiXStrip, we see:

code:
 IF INGROUP("DPRLCA-FinanceShare")
USE f: /delete /persistent
USE f: "\\vnsv20007\finance"
? "Error: " + @error + " " + @serror
ENDIF
ELSE
? "Ingroup returned false."
ENDIF
; -------> Warning KIXSTRIP: 38 block "if/else/endif" incompleted. starting point of block structure missing.
; -------> Warning KIXSTRIP: 38 block incompleted.

Resulting message:
quote:

Warning KIXSTRIP: 1 error in block structure. missing statement(s).
- do:until [0:0]
- for|each:in|to:step|next [0|0:0|0:0|0]
- function:endfunction [0:0]
-ERROR- - if:else:endif [7:4:8]
- select:case:endselect [0:0:0]
- while:loop [0:0]
8 block_structures found.
Informative KIXSTRIP: no UDF's found.
Warning KIXSTRIP: some lines contains errors or possible errors.

HTH,

Kent


justinm
(Getting the hang of it)
2003-09-24 05:04 PM
Re: changing the beep sound

Yea so it would be cool if we could figure out why its beeping and why no window is poppign up. if you guys have any more questions about my network enviroment I'll be around.

justinm
(Getting the hang of it)
2003-09-24 05:06 PM
Re: changing the beep sound

Interesting KD, I'll have to review my syntax. might I ask what tool you're using for that?

Sealeopard
(KiX Master)
2003-09-24 05:09 PM
Re: changing the beep sound

As you've alreayd been told, there's an error in running your KiXtart script. Specifically, as KiXstrip shows you, you do not have matching ENDIFs for all your IFs. Please indent your code in order to find those mismatches.

So, remove all the errors in your KiXtart script, and potentially in the calling batch file, and the beep sound will go away. This has nothing to do with your network infrastructure.


justinm
(Getting the hang of it)
2003-09-24 05:13 PM
Re: changing the beep sound

will do sealeopard, thanks.

justinm
(Getting the hang of it)
2003-09-24 05:25 PM
Re: changing the beep sound

Ok so I've corrected the error in my if loops, is there a simple command to run a sound file?

Richard H.Administrator
(KiX Supporter)
2003-09-24 05:29 PM
Re: changing the beep sound

Yes, check out the Play command in the manual.

Kdyer
(KiX Supporter)
2003-09-24 05:32 PM
Re: changing the beep sound

For KiXstrip, have a look at -

KiXtart FAQ & How to's

and, specifically..
How do we check and format code for scripts?

HTH,

Kent


Kdyer
(KiX Supporter)
2003-09-24 05:35 PM
Re: changing the beep sound

I have to ask..

Are you still having a "Beep" issue? Or, are you looking for how to play a sound?

Kent


justinm
(Getting the hang of it)
2003-09-24 05:57 PM
Re: changing the beep sound

the beep issue is over. I thought it was beeping by default, not because I had an error in my code. Now that I've corrected the error its working fine with no beeps. I wouldn't mind having a small sound file play at logon for that extra assurance so I know the script is running.

justinm
(Getting the hang of it)
2003-09-24 05:58 PM
Re: changing the beep sound

I will read up on the play command, thanks.

Kdyer
(KiX Supporter)
2003-09-24 06:01 PM
Re: changing the beep sound

quote:

Now that I've corrected the error its working fine with no beeps. I wouldn't mind having a small sound file play at logon for that extra assurance so I know the script is running.

Why? Why not have a screen that shows a logical progression.. There are a couple of Progressbar scripts..

Kent


Sealeopard
(KiX Master)
2003-09-24 06:04 PM
Re: changing the beep sound

Wouldn't the script window be enough? No need to get fancy.

justinm
(Getting the hang of it)
2003-09-24 06:08 PM
Re: changing the beep sound

Kent that would be cool but No window shows up...

Kdyer
(KiX Supporter)
2003-09-24 06:09 PM
Re: changing the beep sound

Change from WKIX32 to KIX32.

Kent


justinm
(Getting the hang of it)
2003-09-24 06:12 PM
Re: changing the beep sound

Here is my bat:

%0\..\kix32 %0\..\logon.kix


Sealeopard
(KiX Master)
2003-09-24 06:15 PM
Re: changing the beep sound

%0\..\ will not work under Windows XP. Please read the FAQ Forum. A batch file is necessary to run login scripts under Windows 9x.

Les
(KiX Master)
2003-09-24 06:17 PM
Re: changing the beep sound

If your scripts are not visible with that batch file, provided it is called from the user's profile and no as a GPO script, you need to apply the RunLogonScriptSync GPO to make it visible.

justinm
(Getting the hang of it)
2003-09-24 06:29 PM
Re: changing the beep sound

Hi Les, I'm running the batch file from a GPO.

Les
(KiX Master)
2003-09-24 07:21 PM
Re: changing the beep sound

Then you are snookered! I would suggest you look at using KiXforms if you want to have a progress screen visible.

justinm
(Getting the hang of it)
2003-09-24 07:51 PM
Re: changing the beep sound

if I apply a batch file for logon for the user it is still not visible, if I run KIX32 from the users profile its not visible either.

Sealeopard
(KiX Master)
2003-09-24 07:54 PM
Re: changing the beep sound

How do you know it is running at all?

Put a DEBUG ON into the first line of your script and step through it.


Les
(KiX Master)
2003-09-24 07:58 PM
Re: changing the beep sound

quote:
if I run KIX32 from the users profile its not visible either.
It would be if you set the RunLogonScriptSync GPO.

If you can't see the script run then there is not much point in running it with debug on. You could add some SendMessage() lines to pop up progress messages for debugging.


justinm
(Getting the hang of it)
2003-09-24 08:54 PM
Re: changing the beep sound

Its running because it maps drives.

Les
(KiX Master)
2003-09-24 09:10 PM
Re: changing the beep sound

quote:
Its running because it maps drives.
NO! Not necessarily!

quote:
use g: /delete /persistent

You had them as persistent so if you change something that causes the script to not run, you cannot use that logic to assume the script is still running.

You should never map them as persistent because they would map on every logon anyway. You need to delete them as persistent however.


Sealeopard
(KiX Master)
2003-09-24 09:19 PM
Re: changing the beep sound

DEBUG ON will definitely tell you whether the script is running or not, and implement RunLoginScriptSync as outlined in the FAQ forum.

justinm
(Getting the hang of it)
2003-09-24 09:30 PM
Re: changing the beep sound

Hmm, I see. Ok, well I will remove the persistent command because they don't need to be (the thing is if I log in with a different user that is not in the group specified for a drive mapping, that mapping won't be made... so I don't fully understand the persistent command, I will read up on it.) I will also look over the faq forum for the scriptsync GPO implementation. Thanks for the advice and info.

justinm
(Getting the hang of it)
2003-09-24 09:31 PM
Re: changing the beep sound

I hope I'm not testing your patience guys.

Les
(KiX Master)
2003-09-24 09:35 PM
Re: changing the beep sound

My turn to apologize. [Embarrassed]

You weren't mapping persitent, you were deleting.

use g: /delete /persistent

Sorry, will go crawl under a rock now...


justinm
(Getting the hang of it)
2003-09-24 09:36 PM
Re: changing the beep sound

No problem. Howard suggested the code to me in an earlier topic so I'm glad its not an issue.

I'm still looking into getting that box visible however.

[ 24. September 2003, 21:37: Message edited by: justinm ]


Sealeopard
(KiX Master)
2003-09-24 09:45 PM
Re: changing the beep sound

So, when will you implement RunLoginScriptSync? Then run the KiXtart script via KIX32.EXE and put DEBUG ON into the first line of your code.

If you still don't see anything then there's no script running.

So, please do this first!


justinm
(Getting the hang of it)
2003-09-24 09:52 PM
Re: changing the beep sound

Hate to say this, but I can't find the article on runscriptsync in the faq forum, can you give me a pointer to it? thanks.

Sealeopard
(KiX Master)
2003-09-24 10:00 PM
Re: changing the beep sound

Using 'RunLoginScriptSync' as search phrase for the FAQ Forum only would lead you to W2k/XP - Keep the Window visible on login?

Les
(KiX Master)
2003-09-24 10:31 PM
Re: changing the beep sound

Forget the FAQ as it endorses implementing it as a reg hack. Go into your ADUC and do it as a GPO as it was meant to be!

justinm
(Getting the hang of it)
2003-09-24 11:15 PM
Re: changing the beep sound

I implemented it as a GPO, and ran the logon script from the user profile, I also tried running it from a GPO. Still nothing is popping up. Its actually not that big of a deal.

Sealeopard
(KiX Master)
2003-09-24 11:26 PM
Re: changing the beep sound

It actually is a big deal because if nothing pops up then the script is not running. The DEBUG ON in the first line of your script will trigger a command window with a display in it!

justinm
(Getting the hang of it)
2003-09-24 11:27 PM
Re: changing the beep sound

THe script is running. I put a small error in my code and I heard a beep. I removed the error and i heard nothing.

justinm
(Getting the hang of it)
2003-09-24 11:29 PM
Re: changing the beep sound

I put the DEBUG ON in there and it did bring up a window for stepping through.

Sealeopard
(KiX Master)
2003-09-24 11:34 PM
Re: changing the beep sound

So, it does pop up.

If you use WKIX32 as the script processor, then you will not see a console unless you have console output in yoru script. Are you using KIX32 or WKIX32? You could also put a sETCONSOLE command into the script, thou as long as RunloginScriptSync=1 there should be a console with KIX32. Never seen it otherwise.


justinm
(Getting the hang of it)
2003-09-24 11:52 PM
Re: changing the beep sound

I'm using Kix32, I disabled syncloginscripts GPO because when it waits for the login script to complete it makes the login process seem slower.

Sealeopard
(KiX Master)
2003-09-26 04:39 PM
Re: changing the beep sound

That can cause problems as you no longer have control over the way different parts of the login process execute. It will most likely have undesired effects down the road.

MCA
(KiX Supporter)
2003-09-28 11:47 PM
Re: changing the beep sound

Dear,

You were asking which tool kdyer was using. It is kixstrip.exe which
you can find on our site. Also documentation is available as kixstrip.pdf.

Topics on FAQ forum:
- How do we check and format code for scripts?
- Debugging script without user input. also during logging on. the advanced way.

Last topic will shows in which line your script aborts. Specially usefull when
you don't get or see anything on your screen.
greetings.

[ 28. September 2003, 23:50: Message edited by: MCA ]