在局域网计算机的Windows注册表中设置字体信息 [英] Set Font Information in Windows Registry of LAN Machine

查看:117
本文介绍了在局域网计算机的Windows注册表中设置字体信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

我的应用程序可以将字体文件复制并粘贴到LAN机器的"windows/fonts"目录中,但是字体文件在LAN机器中不可见,因为Windows注册表中缺少注册表. >
因此,我想知道如何在远程计算机的系统注册表中设置字体信息.这样字体就可以从服务器正确安装,并且可以由LAN计算机上的用户使用.

谢谢,
Sahil Banker

Hello,

I have application that can copy and paste the font file in LAN machine''s ''windows/fonts'' directory, but the font file is not visible in the LAN machine because the lack of registry in the windows registry.

So I want to know how to set the font information in the systems registry from remote machine. So that the font can be installed properly from the server and can be usable by the user on LAN machine.

Thanks,
Sahil Banker

推荐答案

您要定位哪个操作系统?在XP中,有一个注册表项指向已安装的字体

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts]

我不确定该键在Vista/Win7中是否仍然有效.
Which OS are you targeting? In XP there is registry key that points to the installed fonts

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts]

I''m not sure if this keys is still valid in Vista/Win7.


我从未尝试过,但是System.Management命名空间可以帮助您访问远程注册表.
这是一个样本,可以作为基础. 参考 [
I have never tried it, but System.Management namespace may help you access remote registry.

Here is a sample which may serve as bases. Ref[^]
Sub remoteReg()
  Dim strComputerName As String = "REMOTE_PC_NAME"
  Dim strKeyPath As String = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" 
  Dim objManagementScope As ManagementScope
  Dim objManagementClass As ManagementClass
  Dim objManagementBaseObject As ManagementBaseObject

  objManagementScope = New ManagementScope
  objManagementScope.Path.Server = strComputerName
  objManagementScope.Path.NamespacePath = "root\default"
  objManagementScope.Options.EnablePrivileges = True
  objManagementScope.Options.Impersonation = ImpersonationLevel.Impersonate
  objManagementScope.Connect()

  objManagementClass = New ManagementClass("stdRegProv")
  objManagementClass.Scope = objManagementScope
  objManagementBaseObject = objManagementClass.GetMethodParameters("EnumKey")
  'here onwards objManagementBaseObject has GetPropertyValue and SetPropertyValue

End Sub


这篇关于在局域网计算机的Windows注册表中设置字体信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆