|
Now the Error is gone. But nothing is populated on the List View.
This might be coz of my hard drives. Is this requires Administrative login or role to function this Method?
Thanks
|
|
|
|
|
The code has to have FullTrust in order to run. That means, by default, it needs to be run from the local workstation, or if querying other machines, needs to have admin rights to the target workstation.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
I am trying this in an Windows Based Application and am quering to the local machine. Am a user under a Domine. Will this be the reason for not getting the answer?
|
|
|
|
|
So long as that account has admin rights to the machine, it should work. The other possibility is that the data isn't being created by any providers installed on the machine. People keep asking "How do I get the serial number of my motherboard using WMI??". Well, if the manufacturer of the motherboard doesn't provide a WMI provider, you can't. On top of that, there's nothing that says the manufacturer, even though they are providing a WMI Provider, has to fill in these kinds of details.
Like I said in my previous post, I ran the code on one of my test machines (with 6 hard drives in it) and only 2 returned serial numbers!
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
Anyways thanks Dave.
I will try it with other systems and see how it goes.
Regards,
Anas TM
|
|
|
|
|
I am looking for retrieving the Serial Number and Hard Disc detail of an Windows Xp Machine using Vb.Net. I found some code using query to Win32_PhysicalMedia, but its not working properly. Can any one help me in this...
Regards
Anas
|
|
|
|
|
Let's see the code you're using. WMI is about the only method you've got to get this information. But, there's nothing that says the hardware or the provider for it has to fill in all the details of what you're looking for, like the serial number.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
Hi Dave,
I have posted the code for getting Serial Number using the WMI
The post subject is SerialNumber of an Xp Machine.
Thanks,
Anas
|
|
|
|
|
Sorry if this is a silly question and I may just be being thick, but I can't seem to get a startup project going as I don't want to use a one-click setup, in the MS instructions it says, you go file ==> add ==> New Project, and select startup project from there, I just don't have this option at all, I'm using VB.net 2005 express edition.
many thanks..
|
|
|
|
|
I think you're referring to the Setup project, not Startup.
And no, the Express Editions don't come with one. They're relegated to ClickOnce deployment.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
yup, setup project and b****r I had an idea that might be the case...
|
|
|
|
|
|
The Express Editions don't come with the Setup projects you use in your article. Express only uses ClickOnce Deployment.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
I guess it shows that I don't use Express Edition of VS.
Thanks,
Ben
|
|
|
|
|
Neither do I...
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
But you know more about its limitations then I do.
Ben
|
|
|
|
|
The results of a quick visit to the Visual Studio Developer Center on MSDN. Look for the Product edition comparison in the navigation tree on the left.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
You know it is sort of funny they don't include it. It is not like you don't need to deploy your apps. I guess they just want everyone to start using clickonce.
Ben
|
|
|
|
|
kubben wrote: You know it is sort of funny they don't include it. It is not like you don't need to deploy your apps.
The Express Editions weren't meant to build production apps. They're meant to plaay around with so you can get an introduction to the languages they support and the .NET Framework. Those Editions don't even have project templates for Windows Services, Web Services, ..., just Windows Forms.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
Just because they weren't ment to build production apps, doesn't mean it isn't happening. My article is on the windows setup project. I never did one on the web setup. So from my perspective it still make sense since all you have is a windows project. You probably want a way to deploy it. I can understand the windows services not being there. Anyway, I guess it doesn't have to make sense. I am sure somewhere somebody said, "hey look if we leave the windows setup project out of the express version it will save us like half a cent somehow and that adds up you know?" I am sure that nobody is going to buy the full version of VS just so they can get windows setup projects.
Ben
|
|
|
|
|
on that note if I write my own setup project template anyone any objections if I post it up on here...
|
|
|
|
|
You can put one together, but it doesn't mean that it'll work. The designer support for Setup projects isn't in the Express Editions.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
hmm, should be able to get something running I would think, I suppose I could just use clickonce for the purpose of the program, it'll work well enough, just means I'll have to rebuild all my datasources, as I'm not a fan of having MDF files in a roaming profile, heh, suppose if I'd set up the SQL properly at the start it'd actually work better as click once...
|
|
|
|
|
kubben wrote: Just because they weren't ment to build production apps, doesn't mean it isn't happening.
If you use the tool for something that's it's not intended for, is that the tool manufacturers fault?
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
True, I guess their logic doesn't match my logic in this issue. I guess I tend to try and look at the big picture and do what will help people out in the long run. But I am not so sure that is Microsoft's objective. I am pretty sure they are in the business of making money anyway they can, but that is in part why they are so successful.
Ben
|
|
|
|