473,320 Members | 1,957 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Detect Change in PC Name

Is there a way to detect if the computer name has been changed in .NET?
Jul 21 '05 #1
3 1459
I believe this would require a service of some sort running on the box.

This could poll the computer name at regular intervals and ensure that it
hadn't changed and then react when it had. Not sure how usefull that would
be if you have to reboot when changing the name of a pc in xp.

Off the top of my head I can't recall if changing the name of a computer
requires a reboot in xp but if you had an app running on startup that
detected the computer name and then compared it to the previous name (The
app would have to store this), then you could then execute some sort of code
to respond at that point.

Sorry it isn't more helpful but I don't believe that the changing of the
computer name fires any type of event that you could handle.
<an*******@discussions.microsoft.com> wrote in message
news:O8*************@TK2MSFTNGP09.phx.gbl...
Is there a way to detect if the computer name has been changed in .NET?

Jul 21 '05 #2
Changing the name 'does' require a reboot

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .
If U Need My Email ,Ask Me

Time flies when you don't know what you're doing

"Anthony Sullivan" <to**@nebulasys.net> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
I believe this would require a service of some sort running on the box.

This could poll the computer name at regular intervals and ensure that it
hadn't changed and then react when it had. Not sure how usefull that would
be if you have to reboot when changing the name of a pc in xp.

Off the top of my head I can't recall if changing the name of a computer
requires a reboot in xp but if you had an app running on startup that
detected the computer name and then compared it to the previous name (The
app would have to store this), then you could then execute some sort of code to respond at that point.

Sorry it isn't more helpful but I don't believe that the changing of the
computer name fires any type of event that you could handle.
<an*******@discussions.microsoft.com> wrote in message
news:O8*************@TK2MSFTNGP09.phx.gbl...
Is there a way to detect if the computer name has been changed in .NET?


Jul 21 '05 #3

"One Handed Man ( OHM - Terry Burns )" <news.microsoft.com> wrote in message
news:e4**************@TK2MSFTNGP11.phx.gbl...
Changing the name 'does' require a reboot


....in ALL versions of Windows.
Jul 21 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Phil Powell | last post by:
How do you detect an image MIME type if you know of the image in a directory? For example, I know of: if (is_file("$myImagePath/$myImageName")) { // FIND MIME TYPE BUT HOW I DUNNO } The...
23
by: David McCulloch | last post by:
QUESTION-1: How can I detect if Norton Internet Security is blocking pop-ups? QUESTION-2a: How could I know if a particular JavaScript function has been declared? QUESTION-2b: How could I...
6
by: Kiran | last post by:
Hi, I have program, which opens file at the startup and logs error messages to the file, file handle is closed at the end of the program. However if file is deleted in-between, program do not...
3
by: | last post by:
Is there a way to detect if the computer name has been changed in .NET?
1
by: Steve.Goodman | last post by:
Appologies if this has already been asked, but after scanning the web and this news group I could find no decent solution. We have a windows App that calls a webservice, using this bit of basic...
3
by: teslar91 | last post by:
I need to display a tiled image in the MDI container form's client area, and also detect right-clicks in that area. How do you do that? So far, I've unsuccessfully tried: 1) Placing my image...
1
by: Jeff | last post by:
I have located the following code and trying to change this so I know if the USB device has been inserted or removed. The problem I have is I alwayd get the Console.WriteLine("Usb removed") so I...
2
by: GS | last post by:
How do I properly detect row change before allowing moving to next row? I tried using RowLeave . here is brief descript of the form setup. I have ieStringTmpDataSetwith regex table...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.