2011-09-09 1 views

答えて

2

public static string GetCommonAppData(string machineName) 
{ 
    var shellFoldersPath = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders"; 
    using (var remoteBaseKey = RegistryKey.OpenRemoteBaseKey(RegistryHive.LocalMachine, machineName)) 
    using (var shellFolders = remoteBaseKey.OpenSubKey(shellFoldersPath)) 
    { 
     return (string) shellFolders.GetValue("Common AppData"); 
    } 
} 
それを働きました
関連する問題