Page 2 of 2 <12
Topic Options
#138531 - 2005-04-27 08:48 PM Re: Services?
pat_smith1969 Offline
Fresh Scripter

Registered: 2005-04-19
Posts: 18
I could have sworn I replied to this already... must not have hit submit.

The last code listed (fnWMIService()) worked Great for me and it is working 100%. After doing a ton of research on the Microsoft boards I have a thoery about why I was having problems. It seems that a simple write statement to the registry does not update the Service Monitor properly. So even though the setting was correct the service Control Monitor Service was not being updated and it still thought it was in a state of disabled.

Using the WMI function uses the correct API which DOES update the Service Control Monitor service and thus it works.

Thanks for all your help guys.

One last question.... and this one is kinda stupid...

Everyone starts their scripts with a Break ON statement.
1) what does that do?
2) should I ever do a Break Off? maybe at the end of my scripts?
3) should I have a Break On statement at the start of EACH section of my logon script or do I turn on the Break just once?

Before you flame me ... please remember this is the "starters" forum.

Top
#138532 - 2005-04-27 09:13 PM Re: Services?
Chris S. Offline
MM club member
*****

Registered: 2002-03-18
Posts: 2368
Loc: Earth
From the manual...

Quote:


By default, to prevent users from inadvertently interrupting a script, KiXtart automatically disables the ctrl+c/break keys, disables the Close command in the System menu of the current command-prompt window, and hides the Please wait while your logon script executes message box on Windows 9x.

In a multi-tasking environment such as Windows NT, you cannot fully prevent users from interrupting a program. (They can end programs by using the Task List, for example.) As an additional protection, on computers running Windows NT or Windows 2000 only, when BREAK is OFF (the default) KiXtart also installs a special event handler for the current console. The effect of this handler is that whenever a user forcibly terminates KiXtart, the user is automatically logged off. This means that you must be careful when testing scripts.





To prevent logging off while testing scripts, most of us use 'Break On.' It becomes such a habit that we include it when posting script samples (and even in production scripts).

Top
#138533 - 2005-04-27 09:22 PM Re: Services?
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Break ON permits you to stop your script without having KiXtart logout of the current session if it is killed.

When Break is OFF then you can not Ctrl-C to stop an infinite loop. If you then close the window. KiXtart will log you off. This can be very annoying.

I start my production logon script with Break OFF.
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#138534 - 2005-04-27 09:47 PM Re: Services?
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
We use BREAK ON just as a courtesy on scriptlets we post. Our real scripts have it off.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#138535 - 2005-04-28 01:41 AM Re: Services?
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11628
Loc: CA
Or when you move onto WKIX32.EXE the consoless version for silent scripting then it doesn't matter, there is no console to break out of.
Top
#138536 - 2005-04-30 05:41 PM Re: Services?
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
And put a check into the login script that prevents users from logging in if Altiris has been tampered with, e.g. the necessary files are missing or the service is not running. Also, start keeping a log of the hours spent and computers involved in troubleshooting Altiris. I'm sure the associated costs make a nice justification to reduce users to 'User' or potentially 'Power User' status.
_________________________
There are two types of vessels, submarines and targets.

Top
Page 2 of 2 <12


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 987 anonymous users online.
Newest Members
StuTheCoder, M_Moore, BeeEm, min_seow, Audio
17884 Registered Users

Generated in 0.098 seconds in which 0.069 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org