Page 1 of 2 12>
Topic Options
#152102 - 2005-11-23 05:57 PM Script Help
estradac Offline
Fresh Scripter
*

Registered: 2003-09-11
Posts: 18
All,

Can someone help setting up the following:

1. Exclude running this on servers
2. Greetings not working properly
3. Need to change local Admin password
4. Check for TrendMicro if not exist install
5. If Trend does exist update to latest definition


; ========================================================================
; Setting Variables
;
$ServerName = "\\chifs1001" ;File Server
$AVServer = "\\chiau1001" ;Trend Micro
;***********************************************************

;delete any old drive shares
;***********************************************************
Use * /delete
;***********************************************************
; Displaying Logon Info Screen
;***********************************************************
; Determine password expiration DATE
$PWDEXPIRE = @MAXPWAGE - @PWAGE
$PWDEXPIRE=IIF($PWDEXPIRE <=0,"Your password has no expiration date.","Your current password will expire in "+$PWDEXPIRE+" day(s).")

; Determine time of day
$TIME = @TIME
Select
CASE $TIME > "00:000:01" AND $TIME < "12:00:00"
$TOD = "Good morning"
CASE $TIME > "11:59:59" AND $TIME < "18:00:00"
$TOD = "Good afternoon"
CASE $TIME > "17:59:59" AND $TIME < "24:00:00"
$TOD = "Good evening"
CASE 1
$TOD = "Welcome"
EndSelect

Cls

Color B+/N
Box ( 0, 0, 24, 79, GRID ) ; Background grid

; Information Box
Color B/N
Box ( 4, 8, 23, 69, Å ) ; shadow
Color B+/N
Box ( 3, 7, 22, 68, FULL ) ; Box

;Display Banner
Color r+/n
At (1,2) $title
At (2,10)$TOD + @USERID + " to " + @DOMAIN + " Domain."
;At (2,10)$TOD + ", " + @FULLNAME + " to " + $Domain + " Domain."
Color w/n
At (6,10) "* Date:"
At (7,10) "* Time:"
At (8,10) "* user:"
At (9,10) "* workstation:"
At (10,10)"* logon server:"
At (11,10)"* domain:"
At (12,10)"* IP Address:"
At (13,10) "* OS:"
At (14,10) "* Service Pack:"
At (15,10) "* Setting Workstation time:"

Color w+/n
At (6,39) @DAY + " " + @MDAYNO + " " + @MONTH + " " + @YEAR
At (7,39) @TIME
At (8,39) @USERID + " (" + @FULLNAME + ")"
At (9,39) @WKSTA
At (10,39) @LSERVER
At (11,39) @DOMAIN
At (12,39) @IPADDRESS0
At (13,39) @PRODUCTTYPE
At (14,39) @CSD
Color g+/n
At (15,39) "done"
SetTime "\\CHIDC1001"
Color r+/n
At (19,15) $PWDEXPIRE

Sleep 2
Cls

$Caption = "Connecting shares"
$Comment = "Connecting Drive Mappings to the server"
;__________________________________________________________________________
; All domain users get the following directories mapped - P: is the Company
; Public directoy and H: is the Users personal directory.
;__________________________________________________________________________
If InGroup("Domain Users")
Use P: "$ServerName\public"
Use H: @HOMESHR "\" @HOMEDIR
EndIf

If InGroup("Domain_Admins")
Use I: "\\chifs1001\tech-ops"
Else Goto "Administration_Mappings"
EndIf

;Administration_Mappings
:Administration_Mappings
If InGroup("Administrations")
Use T: "$ServerName\public"
Else Goto "Business_Mappings"
EndIf

;Business
:Business_Mappings
If InGroup("Marketing")
Use T: "$ServerName\Business"
Else Goto "Executive_Mappings"
EndIf

;Executives
:Executive_Mappings
If InGroup("Executives")
Use T: "$ServerName\CEO"
Else Goto "Facilities_Mappings"
EndIf

;Customer Service
;:Customer Service_Mappings
;If InGroup("Customer Service")
;Use T: \\chifs1001\CustomerSupport
;Use S: \\chifs1001\business
;Else Goto "Facilities_Mappings"
;EndIf

;Facilities
:Facilities_Mappings
If InGroup("Facilities")
Use T: \\chifs1001\Facilities
Use S: \\chifs1001\Administration
Else Goto "Finance_Mappings"
EndIf

;Finance
:Finance_Mappings
If InGroup("Finance")
Use T: \\chifs1001\Finance
Use S: \\chifs1001\Finance_temp
Else Goto "HR_Mappings"
EndIf

;Human Resources
:HR_Mappings
If InGroup("HR")
use T: \\chifs1001\HR
use R: \\chifs1001\Facilities
Use S: \\chifs1001\Administration
Else Goto "Latin_America"
EndIf

;Latin America
:Latin_America
If InGroup("latin America")
use T: \\chifs1001\Latin America
Else Goto "Legal_Mappings"
EndIf

;Legal
:Legal_Mappings
If InGroup("Legal")
use T: \\chifs1001\legal
Else Goto "Marketing_Mappings"
EndIf

;Marketing
:Marketing_Mappings
If InGroup("Marketing")
use T: \\chifs1001\Marketing
Else Goto "Sales_Mappings"
EndIf

;Sales
:Sales_mappings
If InGroup("Sales")
use s: \\chifs1001\business
use t: \\chifs1001\sales
Else Goto "TechOps_Mappings"
EndIf


;Tech-Ops
:TechOps_Mappings
If InGroup("Domain_Admins")
use G: \\chifs1001\gxs
use I: \\chifs1001\Contractors
use P: \\chifs1001\Public
use T: \\chifs1001\tech-ops
EndIf

$Caption = "Inventorying Computer"
$Comment = "GS1US will now conduct an inventory on your machine"


;Inventory:

;_____________________________________________________________
; The first portion of the script does five things
; 1) Writes basic computer information to a text file = NetBIOS
; name.txt (overwrites)
; 2) Writes logon time to a text file = username.txt (appends)
; 3) Writes logon time to a text file = NetBIOS name.txt (appends)
; 4) Writes all logon info to a .csv file (appends)
; 5) Writes computer info to a .csv one time only for inventory
; purposes

Use z: /Delete /persistent
Use z: "\\chifs1001\inventory"

; 1) Basic computer info for reference

RedirectOutput ("z:\Inventory\@WKSTA.txt",1)

?"NetBIOS name = "@WKSTA
?"Last login by "@USERID
?"OS = "@PRODUCTTYPE" with "@CSD
?"Memory = "MemorySize(0)" MB"
?"Processor type is "@CPU
?"Processor speed is "@MHZ
?"IP address = "@IPADDRESS0
?"MAC address = "@ADDRESS
?"This information was gathered on "@DATE" at "@TIME

; 2) Tracks all logons by user

RedirectOutput ("Z:\Logins\@USERID.txt",0)

?@USERID" logged into the "@DOMAIN" on "@WKSTA" at "@TIME" on "@DATE" "

; 3) Tracks all logons by computer

RedirectOutput ("Z:\Logins\Computer\@WKSTA.txt",0)

?@USERID" logged into the "@DOMAIN" on "@WKSTA" at "@TIME" on "@DATE" "

; 4) Records all logon info to a .csv file

RedirectOutput ("Z:\Logins\CSV\logins.txt",0)

?@USERID","@WKSTA","@DATE","@TIME","@LSERVER","

; 5) Records computer info one time to a .csv file and copies a check file
; to prevent future writes of same computer

If Exist ("c:\check3.txt")

Goto "software"

EndIf

RedirectOutput ("Z:\Inventory\CSV\inventory.txt",0)

?@WKSTA","@PRODUCTTYPE","@CSD","MemorySize(0)","@CPU","@MHZ","@IPADDRESS0","@ADDRESS","

Copy "Z:\check3.txt" "c:\check3.txt"

; The second part of this script performs an inventory of installed software on a PC
; by examining the portion of the registry where uninstall information is kept.
; The information is then recorded to a text file = computer name that is overwritten
; with each successive logon.

:software

RedirectOutput ("Z:\Software\@HOSTNAME.txt", 1)
?"Software installed on @HOSTNAME as of @DATE"
?
; Scroll through each subkey

$Index = 0

:Loop1

$KeyName = EnumKey("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall", $Index)
If @ERROR = 0
Goto DisplayCheck

Else
Goto End

EndIf

isplayCheck

; Check for DisplayName string, record information if it exists

$Displayname = ReadValue("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$Keyname", "DisplayName")

; DisplayName exists

If @ERROR = 0
?$Displayname
$Index = $Index + 1
Goto Loop1
; DisplayName does not exist
Else
$Index = $Index + 1
Goto Loop1
:End
; Finished checking all subkeys, exit program
Use Z: /Delete /persistent

EndIf

;******************************************************************************
; Antivirus update
;******************************************************************************
DisplayText(9, 11,"Updating Antivirus...","w+/r")
$cmdLine = "\\"+$AVServer+"\OfcScan\Autopccp.exe"
SHELL "%comspec% /C START %comspec% /C " + $cmdLine
;**************************************************************************

Top
#152103 - 2005-11-23 07:32 PM Re: Script Help
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
CASE $TIME > "00:000:01"

That does not look right. maybe "00:00:01"
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#152104 - 2005-11-23 10:41 PM Re: Script Help
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
can we finally see the code-tags?
_________________________
!

download KiXnet

Top
#152105 - 2005-11-23 11:19 PM Re: Script Help
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
LOL
Last time I asked for that he deleted his post and started a new topic. Maybe if we just ignore it it will go away.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#152106 - 2005-11-24 02:07 AM Re: Script Help
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11628
Loc: CA
Okay, did not FIX the script but did format it some to make it easier to read.

No need for the labels and GOTO statements. Other fixes needed as well.

 
; ======================================================================== 
; Setting Variables
;
$ServerName = "\\chifs1001" ;File Server
$AVServer = "\\chiau1001" ;Trend Micro
;***********************************************************

;delete any old drive shares
;***********************************************************
Use * /delete
;***********************************************************
; Displaying Logon Info Screen
;***********************************************************
; Determine password expiration DATE
$PWDEXPIRE = @MAXPWAGE - @PWAGE
$PWDEXPIRE=IIF($PWDEXPIRE <=0,"Your password has no expiration date.","Your current password will expire in "+$PWDEXPIRE+" day(s).")

; Determine time of day
$TIME = @TIME
Select
CASE $TIME > "00:000:01" AND $TIME < "12:00:00"
$TOD = "Good morning"
CASE $TIME > "11:59:59" AND $TIME < "18:00:00"
$TOD = "Good afternoon"
CASE $TIME > "17:59:59" AND $TIME < "24:00:00"
$TOD = "Good evening"
CASE 1
$TOD = "Welcome"
EndSelect

Cls

Color B+/N
Box ( 0, 0, 24, 79, GRID ) ; Background grid

; Information Box
Color B/N
Box ( 4, 8, 23, 69, Å ) ; shadow
Color B+/N
Box ( 3, 7, 22, 68, FULL ) ; Box

;Display Banner
Color r+/n
At (1,2) $title
At (2,10)$TOD + @USERID + " to " + @DOMAIN + " Domain."
;At (2,10)$TOD + ", " + @FULLNAME + " to " + $Domain + " Domain."
Color w/n
At (6,10) "* Date:"
At (7,10) "* Time:"
At (8,10) "* user:"
At (9,10) "* workstation:"
At (10,10)"* logon server:"
At (11,10)"* domain:"
At (12,10)"* IP Address:"
At (13,10) "* OS:"
At (14,10) "* Service Pack:"
At (15,10) "* Setting Workstation time:"

Color w+/n
At (6,39) @DAY + " " + @MDAYNO + " " + @MONTH + " " + @YEAR
At (7,39) @TIME
At (8,39) @USERID + " (" + @FULLNAME + ")"
At (9,39) @WKSTA
At (10,39) @LSERVER
At (11,39) @DOMAIN
At (12,39) @IPADDRESS0
At (13,39) @PRODUCTTYPE
At (14,39) @CSD
Color g+/n
At (15,39) "done"
SetTime "\\CHIDC1001"
Color r+/n
At (19,15) $PWDEXPIRE

Sleep 2
Cls

$Caption = "Connecting shares"
$Comment = "Connecting Drive Mappings to the server"
;__________________________________________________________________________
; All domain users get the following directories mapped - P: is the Company
; Public directoy and H: is the Users personal directory.
;__________________________________________________________________________
If InGroup("Domain Users")
Use P: "$ServerName\public"
Use H: @HOMESHR "\" @HOMEDIR
EndIf

If InGroup("Domain_Admins")
Use I: "\\chifs1001\tech-ops"
Else
Goto "Administration_Mappings"
EndIf

;Administration_Mappings
:Administration_Mappings
If InGroup("Administrations")
Use T: "$ServerName\public"
Else
Goto "Business_Mappings"
EndIf

;Business
:Business_Mappings
If InGroup("Marketing")
Use T: "$ServerName\Business"
Else
Goto "Executive_Mappings"
EndIf

;Executives
:Executive_Mappings
If InGroup("Executives")
Use T: "$ServerName\CEO"
Else
Goto "Facilities_Mappings"
EndIf

;Customer Service
;:Customer Service_Mappings
;If InGroup("Customer Service")
;Use T: \\chifs1001\CustomerSupport
;Use S: \\chifs1001\business
;Else Goto "Facilities_Mappings"
;EndIf

;Facilities
:Facilities_Mappings
If InGroup("Facilities")
Use T: \\chifs1001\Facilities
Use S: \\chifs1001\Administration
Else
Goto "Finance_Mappings"
EndIf

;Finance
:Finance_Mappings
If InGroup("Finance")
Use T: \\chifs1001\Finance
Use S: \\chifs1001\Finance_temp
Else
Goto "HR_Mappings"
EndIf

;Human Resources
:HR_Mappings
If InGroup("HR")
use T: \\chifs1001\HR
use R: \\chifs1001\Facilities
Use S: \\chifs1001\Administration
Else
Goto "Latin_America"
EndIf

;Latin America
:Latin_America
If InGroup("latin America")
use T: \\chifs1001\Latin America
Else
Goto "Legal_Mappings"
EndIf

;Legal
:Legal_Mappings
If InGroup("Legal")
use T: \\chifs1001\legal
Else
Goto "Marketing_Mappings"
EndIf

;Marketing
:Marketing_Mappings
If InGroup("Marketing")
use T: \\chifs1001\Marketing
Else
Goto "Sales_Mappings"
EndIf

;Sales
:Sales_mappings
If InGroup("Sales")
use s: \\chifs1001\business
use t: \\chifs1001\sales
Else
Goto "TechOps_Mappings"
EndIf


;Tech-Ops
:TechOps_Mappings
If InGroup("Domain_Admins")
use G: \\chifs1001\gxs
use I: \\chifs1001\Contractors
use P: \\chifs1001\Public
use T: \\chifs1001\tech-ops
EndIf

$Caption = "Inventorying Computer"
$Comment = "GS1US will now conduct an inventory on your machine"


;Inventory:

;_____________________________________________________________
; The first portion of the script does five things
; 1) Writes basic computer information to a text file = NetBIOS
; name.txt (overwrites)
; 2) Writes logon time to a text file = username.txt (appends)
; 3) Writes logon time to a text file = NetBIOS name.txt (appends)
; 4) Writes all logon info to a .csv file (appends)
; 5) Writes computer info to a .csv one time only for inventory
; purposes

Use z: /Delete /persistent
Use z: "\\chifs1001\inventory"

; 1) Basic computer info for reference

RedirectOutput ("z:\Inventory\@WKSTA.txt",1)

?"NetBIOS name = "@WKSTA
?"Last login by "@USERID
?"OS = "@PRODUCTTYPE" with "@CSD
?"Memory = "MemorySize(0)" MB"
?"Processor type is "@CPU
?"Processor speed is "@MHZ
?"IP address = "@IPADDRESS0
?"MAC address = "@ADDRESS
?"This information was gathered on "@DATE" at "@TIME

; 2) Tracks all logons by user

RedirectOutput ("Z:\Logins\@USERID.txt",0)

?@USERID" logged into the "@DOMAIN" on "@WKSTA" at "@TIME" on "@DATE" "

; 3) Tracks all logons by computer

RedirectOutput ("Z:\Logins\Computer\@WKSTA.txt",0)

?@USERID" logged into the "@DOMAIN" on "@WKSTA" at "@TIME" on "@DATE" "

; 4) Records all logon info to a .csv file

RedirectOutput ("Z:\Logins\CSV\logins.txt",0)

?@USERID","@WKSTA","@DATE","@TIME","@LSERVER","

; 5) Records computer info one time to a .csv file and copies a check file
; to prevent future writes of same computer

If Exist ("c:\check3.txt")
Goto "software"
EndIf

RedirectOutput ("Z:\Inventory\CSV\inventory.txt",0)

?@WKSTA","@PRODUCTTYPE","@CSD","MemorySize(0)","@CPU","@MHZ","@IPADDRESS0","@ADDRESS","

Copy "Z:\check3.txt" "c:\check3.txt"

; The second part of this script performs an inventory of installed software on a PC
; by examining the portion of the registry where uninstall information is kept.
; The information is then recorded to a text file = computer name that is overwritten
; with each successive logon.

:software

RedirectOutput ("Z:\Software\@HOSTNAME.txt", 1)
?"Software installed on @HOSTNAME as of @DATE"
?
; Scroll through each subkey

$Index = 0

:Loop1

$KeyName = EnumKey("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall", $Index)
If @ERROR = 0
Goto DisplayCheck
Else
Goto
End
EndIf

; DisplayCheck

; Check for DisplayName string, record information if it exists

$Displayname = ReadValue("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$Keyname", "DisplayName")

; DisplayName exists

If @ERROR = 0
?$Displayname
$Index = $Index + 1
Goto Loop1
; DisplayName does not exist
Else
$Index = $Index + 1
Goto Loop1

:End
; Finished checking all subkeys, exit program
Use Z: /Delete /persistent
EndIf

;******************************************************************************
; Antivirus update
;******************************************************************************
DisplayText(9, 11,"Updating Antivirus...","w+/r")
$cmdLine = "\\"+$AVServer+"\OfcScan\Autopccp.exe"
SHELL "%comspec% /C START %comspec% /C " + $cmdLine
;**************************************************************************


 
 

Top
#152107 - 2005-11-24 02:10 AM Re: Script Help
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11628
Loc: CA
estradac if you really want assistance then you need to do followup on the postings.

When people post you need to return and read what they say and provide proper feedback otherwise people can't really help you very well.

From some of your other posts you seem to ask a question and then not return.

Top
#152108 - 2005-11-28 04:52 PM Re: Script Help
estradac Offline
Fresh Scripter
*

Registered: 2003-09-11
Posts: 18
Sorry Mr. Moderator. It was a holiday weekend and being in the military ....I took full advatage of the free time.

I have gone ahead and changed the time as requested on the first reply. The time now works! Can someone please provide guidance to how to check for AV and if not installed install.

Top
#152109 - 2005-11-28 04:59 PM Re: Script Help
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
You could check this registry key.

Quote:


HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall





Or check if the installation folder exists on the machine, or check for some kind of executable file in the installation directory.
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#152110 - 2005-11-28 05:54 PM Re: Script Help
estradac Offline
Fresh Scripter
*

Registered: 2003-09-11
Posts: 18
All,

I have the following for checking for Trend Micro.....its very generic though ....does anyone know if there is a UDF for TrendMicro


$Caption = "Checking Antivirus"
$Comment = "Checking Antivirus on your system "
;******************************************************************************
; Antivirus update
;******************************************************************************
$cmdLine = "\\"+$AVServer+"\OfcScan\Autopccp.exe"
Shell "%comspec% /C START %comspec% /C " + $cmdLine
;**************************************************************************

Top
#152111 - 2005-11-28 09:10 PM Re: Script Help
estradac Offline
Fresh Scripter
*

Registered: 2003-09-11
Posts: 18
Ok now i have a minor problem. I am testing my script with a Dummy User Account but the KIX Script will not load. I used a login.bat to call my KIX Script. Here's what I have for my login. I'm currently testing on a Windows XP machine.

@echo off

SETLOCAL

VER | find "NT" > nul
If NOT errorlevel 1 GoTo Win_NT

VER | find "2000" > nul
If NOT errorlevel 1 GoTo Win_2000

VER | find "XP" > nul
If NOT errorlevel 1 GoTo Win_XP


GoTo unknown_os

:win_NT
Call kix32.exe GS1wAV.KIX
GoTo end

:win_2000
Call kix32.exe GS1wAV.KIX
GoTo end

:win_XP
Call kix32.exe GS1wAV.KIX
GoTo end


:unknown_os

:end

Top
#152112 - 2005-11-28 09:22 PM Re: Script Help
Aaron Perrault Offline
Fresh Scripter

Registered: 2003-08-29
Posts: 27
Loc: Emeryville, CA
estradac,
Why are you using a .bat file? Are you in an Active Directory domain? If so, setup a GPO to launch the login script. From what you posted, the only time that you dont launch the KIX script is with an Unknown OS, you could totally get rid of that. If you are unsure how to setup the GPO, you can either search the forum or shoot me an email and I can walk you through it. I used to try and run this using a .bat file, and it never worked correctly. Once i moved to the GPO, it works great.

talk to you later

Aaron

Top
#152113 - 2005-11-28 10:03 PM Re: Script Help
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Quote:


VER | find "NT" > nul
If NOT errorlevel 1 GoTo Win_NT




Well... this alone would be a deal breaker since NT4 cannot do GPO.

None the less, BATch kickers are only needed for Wintendos.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#152114 - 2005-11-29 12:40 AM Re: Script Help
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11628
Loc: CA
From: Mr Moderator (NTDOC)


Not fully tested, but here is a UDF for you to try.


Function GetTrendAV($sComputer)
Dim $AVEngine,$VSApiNT,$TmFilter,$DatNum,$Pattern,$AVInstallPath,$AVAge
$AVInstallPath = '\\'+$sComputer+'\'+Join(Split(ReadValue('\\'+$sComputer+'\'+'HKLM\SOFTWARE\TrendMicro\PC-cillinNTCorp\CurrentVersion','Application Path'),':'),Chr(36))
$AVEngine = 'Engine: ' + GetFileVersion($AVInstallPath +'\NTRtScan.exe','FileVersion')
$VSApiNT = 'VSApiNT: ' + GetFileVersion($AVInstallPath +'\vsapint.sys','FileVersion')
$TmFilter = 'TmFilter: ' + GetFileVersion($AVInstallPath +'\tmfilter.sys','FileVersion')
$Pattern = 'Pattern: ' + ReadValue('\\'+$sComputer+'\'+'HKLM\SOFTWARE\TrendMicro\PC-cillinNTCorp\CurrentVersion\Misc.','InternalPatternVer')
$DatNum = 'Pattern Date: ' + ReadValue('\\'+$sComputer+'\'+'HKLM\SOFTWARE\TrendMicro\PC-cillinNTCorp\CurrentVersion\Misc.','PatternDate')
$AVAge = 'Age: ' + FormatDate(ReadValue('\\'+$sComputer+'\'+'HKLM\SOFTWARE\TrendMicro\PC-cillinNTCorp\CurrentVersion\Misc.','PatternDate'))[1]
$GetTrendAV=$AVEngine,$VSApiNT,$TmFilter,$DatNum,$Pattern,$AVAge,$AVInstallPath
EndFunction

 
For further information on the AV detection you could also look here.

 
AntiVirus Dection Code - Request for feedback
http://www.kixtart.org/ubbthreads/showflat.php?Cat=&Board=UBB2&Number=133168
 

Top
#152115 - 2005-11-29 04:45 PM Re: Script Help
estradac Offline
Fresh Scripter
*

Registered: 2003-09-11
Posts: 18
Thanks for all the help. In reference to changing local admin password on laptop\desktops only, I know how i can do this via vbs but can someone show me how i can manipulate this simple vbs script into kix

strComputer = "."
Set objUser = GetObject("WinNT://" & strComputer & "/Administrator, user")
objUser.SetPassword "G00df3llas"
objUser.SetInfo


Edited by estradac (2005-11-29 04:46 PM)

Top
#152116 - 2005-11-29 06:14 PM Re: Script Help
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
here you go..

Code:

$strComputer = "."
$objUser = GetObject("WinNT://"+$strComputer+"/Administrator, user")
$objUser.SetPassword "G00df3llas"
$objUser.SetInfo
?@error
?@serror



HTH,

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#152117 - 2005-11-29 07:43 PM Re: Script Help
estradac Offline
Fresh Scripter
*

Registered: 2003-09-11
Posts: 18
Damn you guys are Good! I'm all set. Now its just a matter of testing. Thank you all.
Top
#152118 - 2005-11-29 09:44 PM Re: Script Help
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Shouldn't:

$objUser.SetPassword "G00df3llas"

be:

$objUser.SetPassword("G00df3llas")

also when you troubleshoot COM related script check @error and @serror after each method call.
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#152119 - 2005-11-30 03:25 PM Re: Script Help
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Thanks Howard! I believe you are correct as I just did a quick change-over for him.

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#152120 - 2005-11-30 06:02 PM Re: Script Help
estradac Offline
Fresh Scripter
*

Registered: 2003-09-11
Posts: 18
Long lines removed by NTDOC
 
 
All, I am trying to incorporate this TrendMicro UDF but it keeps failing not sure what i am doing wrong.
Can someone shed some guidance.


Code:
  ?$Caption = "Checking Antivirus"
?$Comment = "Checking Antivirus on your system "

dim $rc, $SetupFilespec


$SetupFilespec='\\chiau1001\ofcscan\AutoPcc.exe'
;
$SetupNotifyMsg='Trend Micro Office Scan anti-virus will be installed to your computer.' + @CRLF +
'While this process completes in the background, your system may respond a bit slower than normal. ' + @CRLF + @CRLF +
'Please do not logoff or reboot for at least 5 minutes to allow the process to complete normally.' + @CRLF + @CRLF +
'If you receive this message more than once, please notify HelpDesk at xxx xxx-xxxx.'
;
$NoSetupFileMsg='Your computer is not allowed to connect to this network without the approved Anti-Virus software. '+
'Please contact the HelpDesk at xxx xxx-xxxx for assistance.'
;
if @InWin = 1 ; NT Family
;
if not keyexist('HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OfficeScanNT')
if exist($SetupFilespec)
$rc=slExec('Admin Async Hidden',$SetupFilespec,)
$rc=slAlert('X','PLEASE READ - IMPORTANT NOTICE',$SetupNotifyMsg,0,1)
Else
$rc=slAlert('X','',$NoSetupFileMsg,60,1)
$rc=slLogoff(1)
EndIf
EndIf
EndIf
EndIf






Minor modifications by NTDOC
 
Don't see anything in the code to call the Trend UDF or an installer
Are you using ScriptLogic with this code?

 
Code:

Break On
Dim $SO
$SO=SetOption('Explicit','On')
$SO=SetOption('NoVarsInStrings','On')
$SO=SetOption('NoMacrosInStrings','On')
 
Dim $Caption,$Comment,$rc, $SetupFilespec,$SetupNotifyMsg,$NoSetupFileMsg
$Caption = "Checking Antivirus" ?
$Comment = "Checking Antivirus on your system " ?
$SetupFilespec='\\chiau1001\ofcscan\AutoPcc.exe'
$SetupNotifyMsg='Trend Micro Office Scan anti-virus will be installed to your computer.' + @CRLF +
'While this process completes in the background, your system may respond a bit slower than normal. ' + @CRLF + @CRLF +
'Please do not logoff or reboot for at least 5 minutes to allow the process to complete normally.' + @CRLF + @CRLF +
'If you receive this message more than once, please notify HelpDesk at xxx xxx-xxxx.'
$NoSetupFileMsg='Your computer is not allowed to connect to this network without the approved Anti-Virus software. ' +
'Please contact the HelpDesk at xxx xxx-xxxx for assistance.'
 
If @InWin = 1 ; NT Family
If Not KeyExist('HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OfficeScanNT')
If Exist($SetupFilespec)
$rc=slExec('Admin Async Hidden',$SetupFilespec,)
$rc=slAlert('X','PLEASE READ - IMPORTANT NOTICE',$SetupNotifyMsg,0,1)
Else
;What is slAlert ? and slLogoff - don't see them anywhere here
$rc=slAlert('X','',$NoSetupFileMsg,60,1)
$rc=slLogoff(1)
EndIf
EndIf
EndIf


 


Edited by NTDOC (2005-11-30 08:33 PM)

Top
#152121 - 2005-11-30 08:15 PM Re: Script Help
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
I'm not seeing any UDF. Did you hack it up? See the FAQ on how to use a UDF.
_________________________
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 2 12>


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

Who's Online
1 registered (Allen) and 1198 anonymous users online.
Newest Members
M_Moore, BeeEm, min_seow, Audio, Hoschi
17883 Registered Users

Generated in 0.143 seconds in which 0.076 seconds were spent on a total of 13 queries. Zlib compression enabled.

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