wmi

Is it possible to determine the Win32_DiskDrive SerialNumber of the Environment.SpecialFolder.System drive?

旧时模样 提交于 2020-01-02 17:35:27
问题 I've been going around in circles for a bit now, can't seem to find the answer on google either. As the title says, if i get the current drive letter windows is running on, let's say like this: Path.GetPathRoot(Environment.GetFolderPath(Environment.SpecialFolder.System)); Can i then determine its Win32_DiskDrive SerialNumber? I cannot find a way to link them. That is the manufacturer's S/N not the VolumeSerialNumber. Thanks in advance 回答1: You can use ManagmentObjectSearch combined with

Can/Why Does A Hard Drive Serial Number Change

我们两清 提交于 2020-01-02 07:03:54
问题 Our anti-piracy software identifies people according to their Hard Drive Serial. This I believe is a constant feature and will not change unless the user changes their primary physical drive - correct me if I am wrong? We use the WMI python module to obtain the users Hard Drive Serial Number. For 2 of our test computers the Hard Drive serial number has changed. But we haven't changed their hard drive at all. What could cause such a problem? Is our code that identifies the serial not

Where does Add/Remove programs pull data for the “Installed On” column?

╄→гoц情女王★ 提交于 2020-01-02 02:23:12
问题 I'm working on replicating the Windows 7/8 add remove programs applet with VBScript. I've gotten the script to include all the correct entries, but I have not been able to get it to include all the correct additional information Windows displays. As an example: Windows displays the "Installed On" column with a date. In some cases it gets these from the relevant registry keys like: HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\InstallDate HKLM\Software\Wow6432Node\Microsoft\Windows

Bootstrapping SQL Express from WiX?

一笑奈何 提交于 2020-01-02 02:00:14
问题 I'm working on a WPF app, and using WiX as an installer. I'd like to start using SQL Express 2012, but want to resolve installer issues first. I'm looking for a full-up example of detecting, bootstrapping, installing, upgrading and uninstalling SQL Express 2012 using WiX (although partials will be useful, too). Also, most of the detection logic I've found so far on the web uses registry keys. However, Microsoft recommends using WMI instead (see http://blogs.msdn.com/b/sqlexpress/archive/2006

Bootstrapping SQL Express from WiX?

扶醉桌前 提交于 2020-01-02 02:00:02
问题 I'm working on a WPF app, and using WiX as an installer. I'd like to start using SQL Express 2012, but want to resolve installer issues first. I'm looking for a full-up example of detecting, bootstrapping, installing, upgrading and uninstalling SQL Express 2012 using WiX (although partials will be useful, too). Also, most of the detection logic I've found so far on the web uses registry keys. However, Microsoft recommends using WMI instead (see http://blogs.msdn.com/b/sqlexpress/archive/2006

Remotely change computer name for a Windows Server 2008 machine using C#?

此生再无相见时 提交于 2020-01-01 18:59:10
问题 Might someone be able to point me towards a conclusive resource to learn how to remotely change a computer name on a Windows Server 2008 machine using C# I've looked at lots of sites for help and now in day two of my task and not really any closer (other than deciding WMI is pretty much my only option) Totally out of my normal skillset so I guess pretty much any info would be nice, but especially anything having to do with changing a computer name remotely. (this would occur right after I

How to eject CD using WMI and Python?

狂风中的少年 提交于 2020-01-01 04:50:29
问题 Using Windows' WMI library, how can I eject CD rom mounted in a specific CD/DVD drive? I am asking for sources from WMI docs or examples since I am using wmi.py library on Python. It would be great if solution satisfies Windows computer newer than Windows 2000 and having multi CD-ROMs. (i.e. I have D: F: drives and both are CD-ROM drives. I might want to eject cd in F: specifically.) Searched on the net but could not find anything relevant. The last solution must be having 3rd party binaries

Mount Network Drive with WMI

喜你入骨 提交于 2019-12-31 05:59:19
问题 Trying to write a WMI class function to mount a network drive on any computer (remote or local) using the credentials of the logged in computer. This is a class for a larger project that I wrote for help desk staff to do first line fixes on remote PC's. The tech types in the the machine name or ip address and the app connects to it and allows to tech to click a couple of buttons and fix some basic items without having to remote(VNC) into the PC. I've read all over the internet that it is much

Mount Network Drive with WMI

亡梦爱人 提交于 2019-12-31 05:59:13
问题 Trying to write a WMI class function to mount a network drive on any computer (remote or local) using the credentials of the logged in computer. This is a class for a larger project that I wrote for help desk staff to do first line fixes on remote PC's. The tech types in the the machine name or ip address and the app connects to it and allows to tech to click a couple of buttons and fix some basic items without having to remote(VNC) into the PC. I've read all over the internet that it is much

Managing remote DACLs on fileshares: Win32_ACE to Win32_Share

China☆狼群 提交于 2019-12-31 03:04:07
问题 Goal: Add a local user account share-level Read/Write permissions to an existing file share. I'm hitting a roadblock in developing this. Apparently Microsoft wants you to add your user's ACE to the DACL and then back into the security descriptor of the share. (1). (No, NET SHARE /ADD is not available for existing shares, I was surprised.) In theory that should be simple enough, but my main fear is doing it wrong and losing the existing share permissions (lots of network users, specific groups