WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Samples from Users
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Pc Inventory Update


AddExtender("WWPRT34I.DLL")
AddExtender("WWIPG34I.DLL")
AddExtender("WWWSK34I.DLL")

winplatform= WinMetrics(-4)

:Begin

dir1=""
mmodel=""
cmodel=""
cspeed=""


;***************************************************************************
;**This section gets the current user id information and creates directory
;**with that user id as follows C:\USERID Backup and saves the doc
;**to the current directory
;***************************************************************************
curruser = Environment("username")
DirMake(StrCat("c:\",curruser," Backup"))

;***************************************************************************
;**Gets current operating system on local machine
;***************************************************************************
ver=""
CheckReg=regexistVALUE(@REGMACHINE,"Software\Microsoft\Windows\CurrentVersion[Version]")
if CheckReg==0 then 
    checkNT=regexistVALUE(@regmachine, "software\microsoft\windows nt\currentversion[CurrentVersion]")
    if checkNT==0 then
        message("Notice:", "Windows Version not detected!!!")
        exit
    else
        NTVersion=regqueryvalue(@regmachine, "software\microsoft\windows nt\currentversion[CurrentVersion]")
		  if NTVersion=="5.2" then ver="Windows 2003"
        if NTVersion=="5.1" then ver="Windows XP Pro"
        if NTVersion=="5.0" then ver="Windows 2000"
        if NTVersion=="4.0" then ver="WinNT NT 4.0"
    end if
else
    WindowsVersion=RegQueryValue(@REGMACHINE,"Software\Microsoft\Windows\CurrentVersion[Version]")
    if WindowsVersion=="Windows 95" then
        SubVersionNumber=RegQueryValue(@REGMACHINE,"Software\Microsoft\Windows\CurrentVersion[SubVersionNumber]")
        if SubVersionNumber == "" then 
            ver="Win950"
            message("Netware Client Upgrade", "%@CRLF%Service Pack 1 for Win95 needs installed,%@CRLF%please contact I.S. immediately.%@CRLF%")
            exit
        END IF
        if SubVersionNumber == "A" then ver="Windows 95A"
        if SubVersionNumber == "B" then ver="Windows 95B"
        if SubVersionNumber == "C" then ver="Windows 95C"
    END IF

    If WindowsVersion=="Windows 98" then
        VersionNumber=RegQueryValue(@REGMACHINE,"Software\Microsoft\Windows\CurrentVersion[VersionNumber]")
        if VersionNumber == "4.10.1998" then ver="Win98"
        if VersionNumber == "4.10.2222" then ver="Win98SE" 
    END IF
    
    If WindowsVersion == "Windows Millennium Edition" then ver="WinME" 
end if
if ver=="" then 
    message("Notice:", "%@CRLF%Unable to Determine OS!!!!!!%@CRLF%")
    exit
end if
;---------------------------------------------------------------------------
;***************************************************************************
;**Gets the current users default Domain information
;***************************************************************************
regk=RegOpenkey(@RegMachine, "SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\")
Domain = RegQueryValue(regk,"[DefaultDomainName]")
RegCloseKey(regk)

;***************************************************************************
;**Gets ip and mac information from current network card
;***************************************************************************
#DefineFunction GetTCPIPInfo_UDF(value)
      origdir        = DirGet()
		OutputFile     = StrCat (origdir, "IPCFG_TEMP.TXT")
		If WinVersion(4) == 4;WINNT	   
		   RunHideWait(Environment('COMSPEC'), '/c IPCONFIG /ALL >"%OutputFile%"')
		Else
		  RunHideWait('WINIPCFG', '/ALL /BATCH > "%OutputFile%"')
		Endif
		
		If !FileExist(OutputFile)
		     MessageTxt = StrCat ("TCP/IP parameters can't be determined.", @CRLF)
		     MessageTxt = StrCat (MessageTxt, @CRLF, "No data will be captured.", @CRLF)
		     Message (Caption, MessageTxt)
		     exit
		EndIf
		
		fs        = Filesize (OutputFile)
		buf       = BinaryAlloc(fs)
		BinaryRead(buf, OutputFile)
		;		
		; Grab value from file
		;
		lacptr = BinaryIndexEx(buf, 0, "Description", @FWDSCAN, 0)
		ptr  = BinaryIndexEx(buf, lacptr, value, @FWDSCAN, 0)
		colonptr    = BinaryIndexEx(buf, ptr, ":", @FWDSCAN, 0)
		CRLFptr     = BinaryIndexEx(buf, ptr, @CRLF, @FWDSCAN, 0)
		Address  = BinaryPeekStr(buf, colonptr+2, CRLFptr-colonptr-2)
		Address  = StrTrim(Address)
		BinaryFree (buf)
		FileDelete(OutputFile)
		return Address
#EndFunction

value = "Physical Address"
mac = GetTCPIPInfo_UDF(value)

value = "IP Address"
ip = GetTCPIPInfo_UDF(value)
;---------------------------------------------------------------------------------------------------
;***************************************************************************
;** Gets current Service Pack Level
;***************************************************************************

if RegExistValue(@REGMACHINE, "SOFTWARE\Microsoft\Windows NT\CurrentVersion[CSDVersion]") == @TRUE
        SP=RegQueryValue(@REGMACHINE, "SOFTWARE\Microsoft\Windows NT\CurrentVersion[CSDVersion]")
  If winplatform == 4 then goto Winnt
;--------------------------------------------------------------------------------------------------

:Winnt ;Windows NT Begin
curruser = Environment("username")
gosub nt40

:contnt

;Get Time & Date
date=Timedate( )

;Get PTN Number
CPTN = Environment("computername")

;***************************************************************************
;**Gets current application installed on local system
;***************************************************************************
;Installed Programs
ErrorMode(@OFF)
winkey = RegOpenKey(@RegMachine, "SOFTWARE")
ErrorMode(@CANCEL)
If winkey == @False
	installed = "No Applications Installed"
else
	installed=RegQueryKeys(winkey)
	RegCloseKey (winkey)
End If

tin=persistent
tin2=printers
apps2=installed
gosub boardnt

:boardnt

WkstationFormat=`WWWDLGED,6.1`

WkstationCaption=`Workstation Interview Checklist`
WkstationX=-01
WkstationY=-01
WkstationWidth=360
WkstationHeight=228
WkstationNumControls=068
WkstationProcedure=`DEFAULT`
WkstationFont=`DEFAULT`
WkstationTextColor=`DEFAULT`
WkstationBackground=`DEFAULT,DEFAULT`
WkstationConfig=0

Wkstation001=`023,015,027,011,EDITBOX,curruser,"Edit 1",DEFAULT,1,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
Wkstation002=`217,002,046,011,EDITBOX,cptn1,"",DEFAULT,2,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
Wkstation003=`049,033,054,015,ITEMBOX,modelc,DEFAULT,DEFAULT,3,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
Wkstation004=`049,044,054,011,EDITBOX,CPUPTN,"",DEFAULT,4,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
Wkstation005=`049,089,054,011,EDITBOX,MPTN,"",DEFAULT,5,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
Wkstation006=`049,076,054,011,ITEMBOX,modelm,DEFAULT,DEFAULT,6,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
Wkstation007=`049,060,054,011,ITEMBOX,speedc,DEFAULT,DEFAULT,7,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
Wkstation008=`033,002,051,011,EDITBOX,cuser,"",DEFAULT,8,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
Wkstation009=`084,015,035,011,EDITBOX,LANPWD,"",DEFAULT,9,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
Wkstation010=`140,015,033,011,EDITBOX,MAILID,"",DEFAULT,10,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
Wkstation011=`204,015,035,011,EDITBOX,MAILPWD,"",DEFAULT,11,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
Wkstation012=`281,015,071,011,EDITBOX,TECH,"",DEFAULT,12,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
Wkstation013=`097,002,015,011,EDITBOX,EXT,"",DEFAULT,13,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
Wkstation014=`138,002,035,011,EDITBOX,LOC,"",DEFAULT,14,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
Wkstation015=`158,198,030,009,PUSHBUTTON,DEFAULT,"&Save As",1,15,32,DEFAULT,DEFAULT,DEFAULT`
Wkstation016=`111,114,041,011,STATICTEXT,DEFAULT,"Printers Installed",DEFAULT,16,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
Wkstation017=`174,002,042,011,STATICTEXT,DEFAULT,"Computer Name:",DEFAULT,17,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
Wkstation018=`116,002,022,011,STATICTEXT,DEFAULT,"Location:",DEFAULT,18,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
Wkstation019=`244,100,110,104,ITEMBOX,installed,DEFAULT,DEFAULT,19,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
Wkstation020=`113,127,126,030,ITEMBOX,printers,DEFAULT,DEFAULT,20,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
Wkstation021=`001,002,030,011,STATICTEXT,DEFAULT,"User Name:",DEFAULT,21,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
Wkstation022=`054,015,030,013,STATICTEXT,DEFAULT,"User PWD:",DEFAULT,22,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
Wkstation023=`002,015,019,013,STATICTEXT,DEFAULT,"User ID:",DEFAULT,23,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
Wkstation024=`281,002,071,011,EDITBOX,DATE,"",DEFAULT,24,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
Wkstation025=`162,033,048,011,EDITBOX,ver,"",DEFAULT,25,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
Wkstation026=`113,159,083,008,STATICTEXT,DEFAULT,"Persistent Network Connections",DEFAULT,26,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
Wkstation027=`009,046,035,009,STATICTEXT,DEFAULT,"CPU PTN:",DEFAULT,27,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
Wkstation028=`002,090,035,011,STATICTEXT,DEFAULT,"Monitor PTN",DEFAULT,28,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
Wkstation029=`086,002,009,011,STATICTEXT,DEFAULT,"Ext:",DEFAULT,29,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
Wkstation030=`247,087,073,011,STATICTEXT,DEFAULT,"Current Installed Applications",DEFAULT,30,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
Wkstation031=`113,169,126,027,ITEMBOX,persistent,DEFAULT,DEFAULT,31,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
Wkstation032=`122,033,038,011,STATICTEXT,DEFAULT,"OS-Version:",DEFAULT,32,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
Wkstation033=`196,198,030,009,PUSHBUTTON,DEFAULT,"&Exit",2,33,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
Wkstation034=`121,015,019,013,STATICTEXT,DEFAULT,"Mail ID:",DEFAULT,34,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
Wkstation035=`177,015,025,013,STATICTEXT,DEFAULT,"Mail PWD:",DEFAULT,35,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
Wkstation036=`263,017,016,011,STATICTEXT,DEFAULT,"TECH:",DEFAULT,36,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
Wkstation037=`266,002,014,013,STATICTEXT,DEFAULT,"Date:",DEFAULT,37,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
Wkstation038=`122,047,038,011,STATICTEXT,DEFAULT,"Available Ram:",DEFAULT,38,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
Wkstation039=`162,047,027,011,EDITBOX,RAM,"",DEFAULT,39,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
Wkstation040=`118,062,041,010,STATICTEXT,DEFAULT,"Hard Drive Size:",DEFAULT,40,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
Wkstation041=`162,062,027,009,EDITBOX,csize,"",DEFAULT,41,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
Wkstation042=`130,076,027,011,STATICTEXT,DEFAULT,"Disk Free:",DEFAULT,42,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
Wkstation043=`162,076,027,009,EDITBOX,Cavail,"",DEFAULT,43,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
Wkstation044=`190,062,014,010,STATICTEXT,DEFAULT,"GB",DEFAULT,44,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
Wkstation045=`190,076,014,011,STATICTEXT,DEFAULT,"GB",DEFAULT,45,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
Wkstation046=`191,047,014,011,STATICTEXT,DEFAULT,"MB",DEFAULT,46,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
Wkstation047=`002,105,059,011,CHECKBOX,HCDROM,"System Has CDROM",1,47,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
Wkstation048=`002,121,066,011,CHECKBOX,NCDROM,"System Needs CDROM",1,48,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
Wkstation049=`002,135,059,011,CHECKBOX,HMODEM,"System Has Modem",1,49,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
Wkstation050=`002,150,059,009,CHECKBOX,NMODEM,"System Needs Modem",1,50,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
Wkstation051=`004,164,102,011,PUSHBUTTON,DEFAULT,"&Backup Users Profile 2K - XP",3,51,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
Wkstation052=`004,178,102,011,PUSHBUTTON,DEFAULT,"&Backup Users Profile Windows NT 4.0",8,52,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
Wkstation053=`244,041,035,011,STATICTEXT,DEFAULT,"Service Pack:",DEFAULT,53,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
Wkstation054=`281,041,067,011,EDITBOX,SP,"",DEFAULT,54,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
Wkstation055=`250,055,029,011,STATICTEXT,DEFAULT,"IP Address:",DEFAULT,55,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
Wkstation056=`281,055,067,009,EDITBOX,IP,"",DEFAULT,56,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
Wkstation057=`242,070,037,009,STATICTEXT,DEFAULT,"MAC Address:",DEFAULT,57,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
Wkstation058=`281,068,067,011,EDITBOX,MAC,"E",DEFAULT,58,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
Wkstation059=`254,028,025,009,STATICTEXT,DEFAULT,"Domain:",DEFAULT,59,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
Wkstation060=`281,028,067,011,EDITBOX,DOMAIN,"",DEFAULT,60,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
Wkstation061=`001,212,358,011,EDITBOX,comment,"",DEFAULT,61,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
Wkstation062=`004,214,030,009,STATICTEXT,DEFAULT,"Comments:",DEFAULT,62,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
Wkstation063=`151,102,086,010,EDITBOX,defprint,"",DEFAULT,63,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
Wkstation064=`111,102,035,010,STATICTEXT,DEFAULT,"Default Printer:",DEFAULT,64,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
Wkstation065=`121,198,030,009,PUSHBUTTON,DEFAULT,"&Support",4,65,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
Wkstation066=`002,073,042,011,PUSHBUTTON,DEFAULT,"Monitor Model",6,66,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
Wkstation067=`002,031,042,011,PUSHBUTTON,DEFAULT,"Computer Model",5,67,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
Wkstation068=`002,057,042,011,PUSHBUTTON,DEFAULT,"CPU Speed",7,68,DEFAULT,DEFAULT,DEFAULT,DEFAULT`

ButtonPushed=Dialog("Wkstation")



;Application currently installed
apps=installed
cptn=cptn1

;System Has CDROM
If HCDROM == 1 then
	HCDROM1="System Has CDROM"
End If

;System Needs CDROM
If NCDROM == 1 then
	NCDROM1="System Needs CDROM"
;Else
;	cpu="Do Not Upgrade CPU"
End If


;System Has MODEM
If HMODEM == 1 then
	HMODEM1="System Has Modem"
;Else
;	mem="Do Not Upgrade Memory"
End If

;System Needs MODEM
If NMODEM == 1 then
	NMODEM1="System Needs Modem"
;Else
;	CDROM="Doesnt Need CDROM"
End If

if buttonpushed == 1 then gosub case1
if buttonpushed == 2 then gosub case2
if buttonpushed == 3 then gosub case3
if buttonpushed == 4 then gosub case4
if buttonpushed == 5 then gosub case5
if buttonpushed == 6 then gosub case6
if buttonpushed == 7 then gosub case7
if buttonpushed == 8 then gosub case8
if buttonpushed == 9 then gosub case9


:nt40     ;Windows NT Hardware Information

modelc = cmodel
modelm = mmodel
speedc=cspeed

;***************************************************************************
;** This section gets the amount of memory installed on system
;***************************************************************************
ram=WinResources(11)/1024
ram=(ram/1024.00)
cnt2=ram
for dec2 = 0 to 0
Decimals(dec2)
next

;***************************************************************************
;** This section gets the current Hard Disk Size and free disk space
;***************************************************************************
Csize = Int (DiskSize("C")/1048576)
Cavail = Int (DiskFree("C")/1048576)

;***************************************************************************
;** This section gathers the current network mappings
;***************************************************************************
persistent = ""
ErrorMode(@OFF)
netkey=RegOpenKey(@Regcurrent, "Network")
ErrorMode(@CANCEL)
if netkey
	Network=RegQueryKeys(NetKey)
	RegCloseKey(NetKey)
	item = network
	num= itemcount(item, @tab)
	persistent = ""
	for i = 1 to num
		a = itemextract (i, item, @tab)
		regkey = RegOpenKey(@RegCurrent, "Network\%a%")
		ErrorMode(@OFF)
		it = RegQueryValue(regkey, "[RemotePath]")
		ErrorMode(@CANCEL)
		RegCloseKey(regkey)
		persistent = iteminsert("%a% = %it%", -1 ,persistent, @tab)
	next
endif


;***************************************************************************
;** This section gathers the current printers that or installed on the 
;** current workstation
;***************************************************************************
regk = RegOpenKey(@RegCurrent, "Software\Microsoft\Windows NT\CurrentVersion\Windows")
ErrorMode(@OFF)
defprint = RegQueryValue(regk, "[Device]")
ErrorMode(@CANCEL)
If defprint == @False
 	defprint = "No Printer Installed"
Else
	defprint = RegQueryValue(regk, "[Device]")
	RegCloseKey(regk)
End If
printkey=RegOpenKey(@RegMachine, "SYSTEM\ControlSet001\Control\Print\Printers")
printers=RegQueryKeys(printkey)
RegCloseKey(printkey)

;***************************************************************************
;** This section gets the current computer name information
;***************************************************************************
CPTN1 = Environment("computername")
gosub contnt

	netkey=RegOpenKey(@RegCurrent, "Network\persistent")
	Network=RegQueryKeys(Netkey)
	RegCloseKey(Netkey)
	item=network
;***************************************************************************
;** This section the default printer settings
;***************************************************************************
regk = RegOpenKey(@RegMachine, "Config\0001\system\Currentcontrolset\control\print\printers")
ErrorMode(@OFF)
defprint = RegQueryValue(regk,"[default]")
ErrorMode(@CANCEL)
If regk == @False
	defprint = "No Printer Installed"	
Else
	defprint = RegQueryValue(regk,"[default]")
	RegCloseKey(regk)
End If

printkey=RegOpenKey(@RegMachine, "System\CurrentControlSet\Control\Print\Printers")
printers=RegQueryKeys(printkey)
RegCloseKey(printkey)
speedc=cspeed

;***************************************************************************
;** This section saves your current document to the current user backup
;** directory C:\USERID Backup\USERID.DOC
;***************************************************************************
:case1
types="All Files|*.*|Text Files|*.txt|"
saveas=AskFileName("SelectFile", "C:\%curruser% Backup\", types, "%curruser%.doc",0)

;Windows NT Report Section
handle = FileOpen(saveas, "write")
FileWrite(handle, "")
FileWrite(handle,  "==================================================================")                       
FileWrite(handle, "                     Workstation Interview Checklist")
FileWrite(handle,  "==================================================================")
FileWrite(handle, "")
FileWrite(handle, "Date:                     %date%")
FileWrite(handle, "Technician:               %tech%")
FileWrite(handle, "-------------------------------------------------------------------")
FileWrite(handle, "")
FileWrite(handle, "User Network Logon ID/LOC/EXT/ Information ")
FileWrite(handle, "-------------------------------------------------------------------")
FileWrite(handle, "")
FileWrite(handle, "User Name:                %cuser%")
FileWrite(handle, "User ID:                  %curruser%")
FileWrite(handle, "User Password:            %lanpwd%")
FileWrite(handle, "User EXT:                 %ext%")
FileWrite(handle, "User Location:            %loc%")
FileWrite(handle, "User Mail ID:             %mailid%")
FileWrite(handle, "User Mail Password:       %mailpwd%")
FileWrite(handle,  "==================================================================")
FileWrite(handle, "")
FileWrite(handle, "Computer Name:            %cptn%")
FileWrite(handle, "Computer Model:           %cmodel% ")
FileWrite(handle, "Computer PTN:             %cpuptn%")
FileWrite(handle, "CPU Speed:                %cspeed%")
FileWrite(handle, "Current Domain            %Domain%")
FileWrite(handle, "Service Pack              %SP%")
FileWrite(handle, "TCPIP Information         %ip%")
FileWrite(handle, "MAC Address               %mac%")
FileWrite(handle, "Monitor Model:            %mmodel%")
FileWrite(handle, "Monitor PTN:              %mptn%")
FileWrite(handle, "Operating System:         %ver%")
FileWrite(handle, "RAM Memory:               %ram% MB")
FileWrite(handle, "Hard Drive Size:          %csize% GB")
FileWrite(handle, "Avail Hard Drive:         %Cavail% GB")
FileWrite(handle, "Ststem Has CDROM:         %HCDROM1%")
FileWrite(handle, "System Needs CDROM:       %NCDROM1%")
FileWrite(handle, "System Has Modem:         %HMODEM1%")
FileWrite(handle, "System Needs Modem:       %NMODEM1%")
FileWrite(handle, "")


;***************************************************************************
;** This section gathers the current applications that or installed
;***************************************************************************
FileWrite(handle,  "==================================================================")
FileWrite(handle, "Installed Applications")
FileWrite(handle, "----------------------")
FileWrite(handle, "")

apps = itemcount(apps2, @tab)
for h = 1 to apps
app1 = itemextract(h, apps2, @tab)
	If app1 == " "
		app1="No Applications Installed"
		FileWrite(handle, app1)
	else
		FileWrite(handle, app1)
	End If
next

;***************************************************************************
;** This section writes the current mapping information to your document
;***************************************************************************
FileWrite(handle, "")
FileWrite(handle,  "==================================================================")
FileWrite(handle, "Permanent Drive Mappings ")
FileWrite(handle, "-------------------------")
FileWrite(handle, "")

m = itemcount(tin, @tab)
for j = 1 to m
mapping = itemextract(j, tin, @tab)
FileWrite(handle, mapping)
next

;***************************************************************************
;** This section writes the printer information to you your current document
;***************************************************************************
FileWrite(handle, "")
FileWrite(handle,  "==================================================================")
FileWrite(handle, "Printers Installed")
FileWrite(handle, "------------------")
FileWrite(handle, "")
FileWrite(handle, "Default Printer: %defprint%")
FileWrite(handle, "")

p = itemcount(tin2, @tab)
for j = 1 to p
printers = itemextract(j, tin2, @tab)
FileWrite(handle, printers)
next


;***************************************************************************
;** This section is for placeing you comments about the workstation
;***************************************************************************
FileWrite(handle, "")
FileWrite(handle,  "==================================================================")
FileWrite(handle, "Comments: %comment%")
FileWrite(handle, "-------------------")


;***************************************************************************
;** This section goes to the exit section and closes the script
;***************************************************************************
:case2
goto exit


;***************************************************************************
;** This section will backup the current user profile to the following
;** location C:\XXXID\Backup as an achrive with the current users
;** XXXID
;***************************************************************************

:case3
;Contents of Win2k.lst
;
;Windows 2000 and XP only""
;
;This script will backup the
;current users profile under 
;c:\Documents and Settings\userid
;and copy it to the following directory as
;C:\userid backup\userid_profile.ZIP
;
;
;1:
;2:
;3:
;4:
;5:
;6:
;7:
;8:

A=AskFileText("Windows 2000 and XP Profile Backup ", "Win2k.lst", @unsorted, @single)
AddExtender("WWZIP34I.DLL")
AddExtender("WWZIP32I.DLL")
FileAttrSet("C:\Documents and Settings\%curruser%\*.*", "rash")
curruser = Environment("username")
DirMake("c:\%curruser% Backup")
TimeDelay (1)
DirChange("C:\Documents and Settings\%curruser%")
zZipFiles("RS9", "C:\%curruser% Backup\%curruser%_profile.ZIP", "*.*", "")
If winplatform == 4 then gosub nt40

;***************************************************************************
;** This section executes the support.lst files
;***************************************************************************
:Case4
;contents of support.lst
;your support information can go here
;
;
;              ? support numbers
;                    _ __ _  
;                    (.)  (.)
;                     \ .. /
;              ooO  --  Ooo
;             /---------------------\
;1:
;2:
;3:
;4:
;5:
;6:
;7:
;8:
;9:
;10:               
A=AskFileText("Support Contact Number:", "Support.lst", @unsorted, @single)
If winplatform == 4 then gosub nt40

;***************************************************************************
;** This section executes the computer models list
;***************************************************************************
:case5
cmodel  = StrCat("Compaq EN", @tab,"Compaq EP", @tab, "Compaq XE", @tab, "Compaq XL",  @tab, "Compaq DP 2000", @tab, "Compaq DP 4000", @tab, "Compaq DP 6000", @tab, "Dell GX110", @tab,"Dell CSX", @tab,"Dell CPX", @tab, "Other")
IntControl(33,0,0,0,0)
HardwareFormat='WWWDLGED,5.0'
HardwareCaption= 'Computer Hardware'
HardwareX=150
HardwareY=120
HardwareWidth=73
HardwareHeight=104
HardwareNumControls=2
Hardware01 = '4,2,66,88,ITEMBOX,cmodel, default'
Hardware02 = '4,88,64,DEFAULT,PUSHBUTTON,DEFAULT,"&OK",1'
ButtonPushed=Dialog("Hardware")
If winplatform == 4 then gosub nt40

;***************************************************************************
;** This section executes the monitor model list
;***************************************************************************
:case6
mmodel = StrCat("Compaq V70", @tab, "Compaq V75", @tab, "Compaq V700", @tab, "Compaq 151 FS", @tab, "Compaq 171 FS", @tab, "Compaq 172", @tab, "Hitachi 813", @tab, "Mitsubishi 21TX", @tab, "NEC 3V", @tab, "NEC 2V", @tab, "Dell", @tab, "Other")
IntControl(33,0,0,0,0)
MyDialogFormat= 'WWWDLGED,5.0'
MyDialogCaption='Monitor Hardware'
MyDialogX=150
MyDialogY=150
MyDialogWidth=73
MyDialogHeight=104
MyDialogNumControls=2
MyDialog01='4,2,66,88,ITEMBOX,mmodel,default'
MyDialog02='4,88,64,DEFAULT,PUSHBUTTON,DEFAULT,"&OK",1'
ButtonPushed=Dialog("MyDialog")
If winplatform == 4 then gosub nt40

;***************************************************************************
;** This section executes the cpu speed list
;***************************************************************************
:case7
cspeed = StrCat("90",@tab,"100",@tab,"120",@tab,"133",@tab,"166",@tab,"200",@tab,"266",@tab,"300",@tab,"333",@tab,"350",@tab,"400",@tab,"433",@tab,"466",@tab,"500", @tab,"550",@tab,"600",@tab,"650",@tab,"667",@tab,"750",@tab,"800",@tab,"Other")
IntControl(33,0,0,0,0)
MyDialogFormat= 'WWWDLGED,5.0'
MyDialogCaption='CPU Speed'
MyDialogX=150
MyDialogY=150
MyDialogWidth=73
MyDialogHeight=104
MyDialogNumControls=2
MyDialog01='4,2,66,88,ITEMBOX,cspeed,default'
MyDialog02='4,88,64,DEFAULT,PUSHBUTTON,DEFAULT,"&OK",1'
ButtonPushed=Dialog("MyDialog")
If winplatform == 4 then gosub nt40

;***************************************************************************
;** This section will backup the current user registry settings
;** c:\Winnt\repair\old_erd
;***************************************************************************

:case8
;Contents of Winnt.lst
;""Windows NT""
;
;This script will backup the
;c:\Winnt\repair directory 
;and copy it to the following directory as
;c:\Winnt\repair\old_erd
;
;
;1:
;2:
;3:
;4:
;5:
;6:
;7:
;8:

A=AskFileText("Windows NT 4.0 Profile Backup ", "Winnt.lst", @unsorted, @single)
IntControl(29, @TAB, 0, 0, 0)
temp=Environment("TEMP")
DirMake("c:\Winnt\repair\old_erd")
DirChange("c:\Winnt\repair")

FileCopy("*.*", "c:\Winnt\repair\old_erd", @FALSE)
TimeDelay(5)
time=10

BoxOpen("Essential Technology Services","")
stopped=0

while time > 0
   BoxText(strcat("Time left = ",time,@crlf,"Please Standby Registry Backup Procedure"))
   TimeDelay(1)
   if IsKeyDown(@shift)
      stopped=1
      break
   endif
   time=time-1 
endwhile
if stopped==1
   else
   endif
Run ("rdisk", " /s-")
If winplatform == 4 then gosub nt40

:exit
exit

Article ID:   W16196
File Created: 2004:03:30:15:43:14
Last Updated: 2004:03:30:15:43:14