Results 1 to 8 of 8

Thread: Wmi

  1. #1
    Join Date
    Feb 2006
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Wmi

    hi I have a page where i need to identify the client's computer in order to allow the access.

    so I developed an activex that uses wmi to grab the HD id and then checks it with the db and give access. could you give and example on how to do this using javascripts

    regards

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    That's awful. That'll lock out anyone not running Internet Explorer on Windows. Never, ever, ever do this!

    There are two "reliable" ways of doing it: 1) check the IP address, and 2) check the MAC address. The latter is more reliable than the former, but also more easily circumvented. And of course, a proxy will blow the whole thing. What you want can't be done effectively. You could possibly try doing something similar using Java and not WMI (check the hostname, network info and so on, as many as possible) but it's still not recommended.

    Perhaps if you say why you need this, we could suggest a workable alternative?
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #3
    Join Date
    Feb 2006
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by Twey
    That's awful. That'll lock out anyone not running Internet Explorer on Windows. Never, ever, ever do this!

    There are two "reliable" ways of doing it: 1) check the IP address, and 2) check the MAC address. The latter is more reliable than the former, but also more easily circumvented. And of course, a proxy will blow the whole thing. What you want can't be done effectively. You could possibly try doing something similar using Java and not WMI (check the hostname, network info and so on, as many as possible) but it's still not recommended.

    Perhaps if you say why you need this, we could suggest a workable alternative?
    Hi thanks for the reply, well i heard so, that i shouldn't use wmi but the the thing is that we sell computers and we will only give support to those computers that people buy from us (i know they can change the HD to any other computer but that's not very common). so far it's working but we have to deal with ie not allowing to use activex

    I think the way to go is what you said about using java instead, but haven't used java

    regards

  4. #4
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Have you thought about just assigning a serial number to each computer you sell? That's the only real way to do this. Java is possible, but not everyone has Java installed.
    so far it's working but we have to deal with ie not allowing to use activex
    No, it isn't. Consider this: I am a customer of yours. I have installed Linux on the PC I bought from you. However, I have a problem (with my hardware, obviously, as the software wasn't provided by you). So, I enter your site, looking for some support, but... oh. I need to download Internet Explorer. Well, that irritates me for a start -- I shouldn't need to run proprietary software just to get a bit of support. So anyway, being a patient and technically-savvy person (which a lot of your customers won't be), I boot up qemu, install Windows onto a small file on my hard drive, and try to use ActiveX on IE there to access the support.
    Oh dear. The qemu-emulated hard drive doesn't have the same signature as my real HD. Now what do I do?

    Personally, I'd have returned the PC and gone to another company at the first setback. Using Java is considerably better than using ActiveX and WMI (as it at least makes some sort of attempt at cross-browser and -platform compatibility) but is still not an ideal solution. While the applet will be platform-independent, you'd still have to use platform-dependent code to check whatever you use to judge the machine by, which is a very bad situation to find one's self in, as it's impossible to anticipate every possible environment. And, of course, there are always those who don't have Java.
    i know they can change the HD to any other computer but that's not very common
    You're right; probably not too many people will move their hard drive to another machine just so they can request support using a machine that isn't their own. Hard drive upgrades, however, are very common indeed.
    Also, had you considered what the poor customer would do if the malfunctioning PC wouldn't boot?
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  5. #5
    Join Date
    Feb 2006
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by Twey
    Have you thought about just assigning a serial number to each computer you sell? That's the only real way to do this. Java is possible, but not everyone has Java installed.No, it isn't. Consider this: I am a customer of yours. I have installed Linux on the PC I bought from you. However, I have a problem (with my hardware, obviously, as the software wasn't provided by you). So, I enter your site, looking for some support, but... oh. I need to download Internet Explorer. Well, that irritates me for a start -- I shouldn't need to run proprietary software just to get a bit of support. So anyway, being a patient and technically-savvy person (which a lot of your customers won't be), I boot up qemu, install Windows onto a small file on my hard drive, and try to use ActiveX on IE there to access the support.
    Oh dear. The qemu-emulated hard drive doesn't have the same signature as my real HD. Now what do I do?

    Personally, I'd have returned the PC and gone to another company at the first setback. Using Java is considerably better than using ActiveX and WMI (as it at least makes some sort of attempt at cross-browser and -platform compatibility) but is still not an ideal solution. While the applet will be platform-independent, you'd still have to use platform-dependent code to check whatever you use to judge the machine by, which is a very bad situation to find one's self in, as it's impossible to anticipate every possible environment. And, of course, there are always those who don't have Java.You're right; probably not too many people will move their hard drive to another machine just so they can request support using a machine that isn't their own. Hard drive upgrades, however, are very common indeed.
    Also, had you considered what the poor customer would do if the malfunctioning PC wouldn't boot?
    well honestly everything you say at this point might be true that's why i came here. but let me tell you that I consider our clients are pretty happy with us cause we solve several issues regarding simple hardware problems, spyware, virus, driver problems, os updates, installing licenced sw, games not working properly and so on.

    gonna have to study java like back in school since I'm a visual studio .net programmer

    regards,

  6. #6
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Did you consider my first suggestion? It's the simplest and most effective and reliable way of solving your problem.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  7. #7
    Join Date
    Feb 2006
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by Twey
    Did you consider my first suggestion? It's the simplest and most effective and reliable way of solving your problem.
    do you mean like having a serial number as a login and password? well, if that's the case we will have to check once we enter the computer for the hd number but we don't want to bother our customers entering their computers and then go check with our database if it applies or not.

  8. #8
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    do you mean like having a serial number as a login and password? well, if that's the case we will have to check once we enter the computer for the hd number
    You're completely missing my point Checking for the hard drive ID is about the worst way you could possibly have come up with to do this. Inconvenience or no, you do not want to be doing it.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •