Page 1 of 1 1
Topic Options
#29550 - 2002-09-24 05:06 PM obtain drive size for Symantec install
theunrealgladiator Offline
Lurker

Registered: 2002-09-23
Posts: 2
I am doing a complete uninstall of Mcafee antivirus and a install of Symantec antivirus using the kix32 during login.
I need to check the drive space of every computer that Symantec will be installed on to make sure that there is at least 100MB of hard drive space. I wrote this but when I change the value or the redirectoutput command from 1 to 0 it put a 1 in the hddsize.log file in front of the hard drive size number. Here is what I wrote. Also if there is a way to do this in memory instead of using a file please let me know.

redirectoutput ("c:\temp\hddsize.log") = 0

GetDiskSpace( "C:\" )

IF OPEN (1, "C:\TEMP\HDDSIZE.LOG")

$SPACE = READLINE(1)

IF $SPACE > 102400

messagebox ('Your Workstation does not have enough hard drive space to install Symantec.)

Please Contact Network Services to resolve this issue.','!! Insufficiant Hard Drive Space Detected !!',4144)

Top
#29551 - 2002-09-24 05:09 PM Re: obtain drive size for Symantec install
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
$SPACE = GetDiskSpace("C:\")

or

IF GetDiskSpace("C:\") > 102400
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#29552 - 2002-09-24 05:37 PM Re: obtain drive size for Symantec install
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
And please read the function/command syntax in the KiXtart Manual. It explains in detail how to use REDIRECTOUTPUT and GETDISKSPACE.
_________________________
There are two types of vessels, submarines and targets.

Top
#29553 - 2002-09-24 06:08 PM Re: obtain drive size for Symantec install
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11623
Loc: CA
Another sample:

code:
$Nul = REDIRECTOUTPUT("%temp%\hddsize.log",1)
$DiskSpace = GetDiskSpace("C:\") /1024
$RequiredSpace="200"
IF $DiskSpace < $RequiredSpace
$Low="WARNING! - WARNING! : Disk space on your C: drive is low"
Else
$Low=""
Endif
$Nul = REDIRECTOUTPUT("",1)



[ 24. September 2002, 18:11: Message edited by: NTDOC ]

Top
Page 1 of 1 1


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

Who's Online
0 registered and 248 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.054 seconds in which 0.025 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