Hi to add to Michel,
If it's a winapp you can also use Application.Sta rtupPath
And if you want some more information abouyt the windows you're running you
can also use wmi, you need to add a reference to system.manageme nt and a
multiline textbox called txtWindows for this to work:
Dim moReturn As Management.Mana gementObjectCol lection
Dim moSearch As Management.Mana gementObjectSea rcher
Dim mo As Management.Mana gementObject
moSearch = New Management.Mana gementObjectSea rcher("Select * from
Win32_Operating System")
moReturn = moSearch.Get
For Each mo In moReturn
txtWindows.Text &= "Name: " & String.Format(" {0}", mo("Caption")) &
vbCrLf
txtWindows.Text &= "Service Pack: " & String.Format(" {0}",
mo("ServicePack MajorVersion")) & vbCrLf
txtWindows.Text &= "Version: " & String.Format(" {0}", mo("Version")) &
vbCrLf
txtWindows.Text &= "Producent: " & String.Format(" {0}",
mo("Manufacture r")) & vbCrLf
txtWindows.Text &= "Serialnumb er: " & String.Format(" {0}",
mo("SerialNumbe r")) & vbCrLf
Next
hth Greetz Peter
--
Programming today is a race between software engineers striving to build
bigger and better idiot-proof programs, and the Universe trying to produce
bigger and better idiots. So far, the Universe is winning. (Rich Cook)
"M. Posseth" <MP******@discu ssions.microsof t.com> schreef in bericht
news:00******** *************** ***********@mic rosoft.com...
1. © copy paste or ALT 0169
2. System.Environm ent.OSVersion.T oString
3. Friend Shared ReadOnly Property Assemblypath() As String
Get
Return
Path.GetDirecto ryName(System.R eflection.Assem bly.GetExecutin gAssembly.Locat i
on()) End Get
End Property
hth
Michel Posseth [MCP]
"Xero" wrote:
hi, i have some questions about programming with visual basic .net ...
1) how do i display the Copyright icon properly? (the letter 'C'
enclosed by a circle)
2) how to detect the operating system of the computer using the class
library of .net framework 1.1?
3) how to determine the installation location of the executable file?
(tits, if the exe file is installed at C:\Program Files\vb program\vbasic. exe,
how do i determine the 'C:\Program Files\vb program\' within the program)
thanks a lot!
--
Xero
http://www.chezjeff.net
My personal web portal