Get Environment variables
Posted: Thu May 28, 2009 1:28 pm
This is an other code I 've writen.
Get all the environment variables from every OS (Tested under Windows but it should work fine under other operating Systems. Tell if not.)
Get all the environment variables from every OS (Tested under Windows but it should work fine under other operating Systems. Tell if not.)
Code: Select all
; Author: Wicker Man
; Date: May 22 2009
; OS: All
; Demo: No
; More codes at: www.geocities.com/kc2000labs/pb/pb.htm
If OpenWindow(0, 0, 0, 640, 520, "Environment Variables", #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_ScreenCentered)
If CreateGadgetList(WindowID(0))
ListIconGadget(0,10,10,621,500,"Variable",200,#PB_ListIcon_GridLines | #PB_ListIcon_FullRowSelect)
EndIf
AddGadgetColumn(0,1,"Data",400)
If ExamineEnvironmentVariables()
While NextEnvironmentVariable()
AddGadgetItem(0,-1,EnvironmentVariableName()+Chr(10)+EnvironmentVariableValue())
Wend
EndIf
Repeat
EventID = WaitWindowEvent()
If EventID = #PB_Event_CloseWindow
Quit = 1
EndIf
Until Quit = 1
EndIf