Hi to add to Michel,
If it's a winapp you can also use Application.StartupPath
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.management and a
multiline textbox called txtWindows for this to work:
Dim moReturn As Management.ManagementObjectCollection
Dim moSearch As Management.ManagementObjectSearcher
Dim mo As Management.ManagementObject
moSearch = New Management.ManagementObjectSearcher("Select * from
Win32_OperatingSystem")
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("ServicePackMajorVersion")) & vbCrLf
txtWindows.Text &= "Version: " & String.Format("{0}", mo("Version")) &
vbCrLf
txtWindows.Text &= "Producent: " & String.Format("{0}",
mo("Manufacturer")) & vbCrLf
txtWindows.Text &= "Serialnumber: " & String.Format("{0}",
mo("SerialNumber")) & 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******@discussions.microsoft.com> schreef in bericht
news:00**********************************@microsof t.com...
1. © copy paste or ALT 0169
2. System.Environment.OSVersion.ToString
3. Friend Shared ReadOnly Property Assemblypath() As String
Get
Return
Path.GetDirectoryName(System.Reflection.Assembly.G etExecutingAssembly.Locati
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