Page 1 of 1 1
Topic Options
#3713 - 2000-08-07 06:15 PM 2 Questions
Anonymous
Unregistered


I've beem writing a simple script the last few days (see my other post MessageBox Selection) and now I want to add two more things to it. My questions are:

Is there a way to setup the proxy settings in IE using a kixtart script

and

I want to be able to get the amount of space used from a user's home directory, then log them off if it is above a number I specify. I understand the logic in how to do this, but is there a way to get just the space in the user's directory? (The GetDiskSpace command seems to just get the entire drive's available space.)

Thanks for any help!

-Patrick

Top
#3714 - 2000-08-08 03:47 PM Re: 2 Questions
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Patrick:

I'll respond to your first question about configuring IE - Yes:

code:

break on


; Use this key for subsequent RegPokes ...


$key = "Software\Microsoft\Windows\CurrentVersion\Internet Settings"


; Configure proxy server address and port ...


$name = "ProxyServer"
$data = "www.proxy.com:80"
$type = "REG_SZ"


gosub "RegPoke"


; Enable proxy ...


$name = "ProxyEnable"
$data = "1"
$type = "REG_DWORD"


gosub "RegPoke"


; Bypass proxy server for local (Intranet) addresses"


$name = "ProxyOverride"
$data = "*.intranet.com;*.inside.com;*.within.com;<local>"
$type = "REG_SZ"


gosub "RegPoke"


; or - just use automatic configuration script


$name = "AutoConfigURL"
$data = "http://www.proxy.com/install.ins"
$type = "REG_SZ"


gosub "RegPoke"


exit


:RegPoke


$rs = writevalue ( "$key", "$name", "$data", "$type" )


if $rs
?
?"Key = " $key
?"Name = " $name
?"Type = " $type
?"Data = " $data
?"Error= $rs (@serror)"


endif


return



Shawn.

[This message has been edited by Shawn (edited 08 August 2000).]

Top
#3715 - 2000-08-08 05:34 PM Re: 2 Questions
Bryce Offline
KiX Supporter
*****

Registered: 2000-02-29
Posts: 3167
Loc: Houston TX
here is a way using the diruse.exe command from the NT resource kit.

code:

$path = "\\houston\@userid$$"
$tempfile = "temp.dat"
shell '%comspec% /c diruse $path | find /i "total" > $tempfile'
$q = open(1,"$tempfile",2)
$q = readline(1)
$dirsize = readline(1)
$q = close(1) del "$tempfile"
$dirsize = val(substr("$dirsize",1,17))

? "the Directory size of $path = $dirsize"


Bryce

Top
#3716 - 2000-08-08 05:51 PM Re: 2 Questions
Anonymous
Unregistered


Thanks a lot - both of you!

-Patrick

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 302 anonymous users online.
Newest Members
Sir_Barrington, batdk82, StuTheCoder, M_Moore, BeeEm
17886 Registered Users

Generated in 0.048 seconds in which 0.021 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