Page 1 of 1 1
Topic Options
#68381 - 2002-07-17 12:31 AM Script Help!!
MarkB Offline
Lurker

Registered: 2002-07-16
Posts: 4
Loc: England
I am looking for some help to write a logon script that basically executes a file that audits the pc and then writes a text file with a date. I want this to run everyday and if the date = for example July i dont want the executable to run but if it doesnt = the date then i want the executable to run. Hope ive explained this properly?

Anyones help would be grateful

Kind Thanks

Top
#68382 - 2002-07-16 01:12 PM Re: Script Help!!
Breaker Offline
Hey THIS is FUN
*****

Registered: 2001-06-15
Posts: 268
Loc: Yorkshire, England
I take it that you already have the executable you mention - something like Visual Audit Pro, or suchlike, I guess? - so you just need to determine the date, and call the executable. Something like this might suit you:-

code:
If @MONTHNO = 7 ;Or whatever date-related criteria you choose
Goto Skip
Else
Shell "%COMPSPEC% /c c:\vap.exe" ;Or whatever you need to run
Endif

:Skip
;Carry on the rest of the script here...

There are a couple of good UDFs that will write log files as you need - search under WriteLog in the UDF forum.

If you would prefer the audit/inventory to be done by Kix itself then you shuld begin by searching the board for "inventory" or "audit" - look for "wmi" as well as this is an invaluable tool in software and hardware inventory. There are dozens of examples on the board that should help to get you started.

[ 16 July 2002, 13:16: Message edited by: Breaker ]
_________________________
================================================
Breaker


Top
#68383 - 2002-07-16 01:29 PM Re: Script Help!!
MarkB Offline
Lurker

Registered: 2002-07-16
Posts: 4
Loc: England
Thanks for that, but how do you write the original text file with the system date??
Top
#68384 - 2002-07-16 01:49 PM Re: Script Help!!
MCA Offline
KiX Supporter
*****

Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
Dear MarkB,

It isn't necessary to use a file, when you can define your algorithm in the script.
In the above script no executable will be run for the month July.
Of course it is possible that you can make it more complex f.e. verify it is already installed
or updated. Possible by checking for f.e. registry keys or specifice files.

When it has to deal will Scriptlogic we advise to put your request also on their forum.
greetings.
_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA

Top
#68385 - 2002-07-22 03:04 PM Re: Script Help!!
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
See WriteLog() and WriteLog2() for some ideas.
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#68386 - 2002-07-22 03:11 PM Re: Script Help!!
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
mark, it could help a lot if your topic title's would start with some short explanation what is what you are after.
in this topic word schedule or log would be a goodie...
this probably helps answer to take place sooner as some oldies look up for the topics of somekind (which they probably can answer quickly)

even I thought this was the same topic as your two previous ones as the only difference in topic was lack of one additional !

regards.
_________________________
!

download KiXnet

Top
#68387 - 2002-07-22 03:25 PM Re: Script Help!!
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Mark,
Please take a moment to familiarize yourself with board etiquette.

Topic: ABC's of KiXtart board etiquette

Unless your post has some actual code to be discussed, it should be in the Starters forum (item A).

It helps to be descriptive in the topic as well (item F).

Questions like these have been answered often (item F).
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
Page 1 of 1 1


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

Who's Online
0 registered and 302 anonymous users online.
Newest Members
Sir_Barrington, batdk82, StuTheCoder, M_Moore, BeeEm
17886 Registered Users

Generated in 0.057 seconds in which 0.026 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