Page 1 of 1 1
Topic Options
#122110 - 2004-07-02 07:57 PM Var for program files..
Stephen Wintle Offline
Seasoned Scripter

Registered: 2001-04-10
Posts: 444
Loc: England
Hi,

I am working on a simple project in kix/forms that displays the schools internet useage policy.
I want to run Iexplore.exe if the users press button one.

I know how the command 'run' works but cant rem.
The environment var for the 'program files' dir.
Is there one?

Code:
break on


SetConsole ("HIDE")

$Form = createobject("Kixtart.Form")
$Form.Size = 450,350
$Form.Caption = "Internet Rules"
$Form.Backcolor = "deepskyblue"
$Form.Fontsize = 8
$Form.bold = 1
$Form.visible

$Label1 = $Form.label("IMPORTANT: please read.",20,10,180,30)

$TextBox = $Form.TextBox("As a student at King's Norton Girls' School, you are bound by the terms in this agreement: I will only access the system with my own login
and password, which I will keep secret; I will not access other people's files; I will only use the computers for school work and homework; I will not bring in floppy disks from outside school unless I have been given permission; I
will ask permission from a member of staff before using the
Internet; I will only E-mail people I know, or my teacher has approved; The messages I send will be polite and responsible; I will not visit Internet sites that I know may contain material of an unsuitable nature; I will
respect copyright rules whilst using the computer systems; I will not post or forward anonymous messages on the Network or Internet; I will always ask the person supervising me before downloading any material from the
Internet; I will take care not to infect the computer systems with viruses and I shall always use the Anti-Virus software on a fdisk; I will not give my home address or telephone number, or arrange to meet someone, unless my
parent, carer or teacher has given permission; I will report any unpleasant material or messages sent to me. I

understand this report would be confidential and would help
protect other students and myself; I understand that the school may check my computer files and may monitor the

Internet sites I visit, and that the use of the computer
systems without permission or for a purpose not agreed by the school could constitute a criminal offence under the
Computer Misuse Act 1990",20,60,230,180)
$TextBox.MultiLine =true
$TextBox.Scrollbars = 2

$Label1.Fontsize = 10
$Label1.Forecolor = "yellow"

$Image = $Form.Image("\\curricsvr1\netlogon\kings.bmp",320,20,114,113)


$Button1 = $Form.Button("Yes I agree",160,270,90,40)
$Button1.onClick = "Button1_Click()"


$Button2 = $Form.Button("No I dont agree",20,270,90,40)
$Button2.onClick = "Button2_Click()"

$Form.Center
$Form.Show



While $Form.visible
$ = Execute($Form.DoEvents)
Loop

Function Button1_Click()
; Run "want to insert the correct path for iexplore using a var.. Im sure theres on for program files.....
EndFunction

Function Button2_Click()
$Form = "Nothing"
EndFunction



Thanks

Steve.


Edited by Stephen Wintle (2004-07-06 11:48 AM)
_________________________
Dont worry because a rival imitates you. As long as they follow in your tracks they cant pass you!

Top
#122111 - 2004-07-02 08:01 PM Re: Var for program files..
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Ackk!!

Long line police..

To answer your Q with regard to IE..

Code:

$ie=READVALUE('HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\IEXPLORE.EXE','')
RUN $ie+' http://www.microsoft.com'



HTH,

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

Top
#122112 - 2004-07-02 08:25 PM Re: Var for program files..
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
or simply skip the reg read and do:
Run 'explorer http://www.kixtart.org'

Please break the long line.
_________________________
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:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Henriques) and 2516 anonymous users online.
Newest Members
fgarcia, Viginette, ManuvdWielNL, Sir_Barrington, batdk82
17889 Registered Users

Generated in 0.055 seconds in which 0.028 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