T54W7U64 CSIDL_SYSTEMX86
CSIDL_PROGRAM_FILES | C:\Program Files (x86) |
CSIDL_PROGRAM_FILESX86 | C:\Program Files (x86) |
CSIDL_SYSTEM | C:\Windows\system32 |
CSIDL_SYSTEMX86 | C:\Windows\SysWOW64 |
2020/01/23 64bit.exe で出力
CSIDL_ADMINTOOLS 30 C:\Users\Iwao\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Administrative Tools CSIDL_ALTSTARTUP 1d C:\Users\Iwao\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup CSIDL_APPDATA 1a C:\Users\Iwao\AppData\Roaming CSIDL_BITBUCKET 0a CSIDL_CDBURN_AREA 3b C:\Users\Iwao\AppData\Local\Microsoft\Windows\Burn\Burn CSIDL_COMMON_ADMINTOOLS 2f C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Administrative Tools CSIDL_COMMON_ALTSTARTUP 1e C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup CSIDL_COMMON_APPDATA 23 C:\ProgramData CSIDL_COMMON_DESKTOPDIRECTORY 19 C:\Users\Public\Desktop CSIDL_COMMON_DOCUMENTS 2e C:\Users\Public\Documents CSIDL_COMMON_FAVORITES 1f C:\Users\Iwao\Favorites CSIDL_COMMON_MUSIC 35 C:\Users\Public\Music CSIDL_COMMON_OEM_LINKS 3a CSIDL_COMMON_PICTURES 36 C:\Users\Public\Pictures CSIDL_COMMON_PROGRAMS 17 C:\ProgramData\Microsoft\Windows\Start Menu\Programs CSIDL_COMMON_STARTMENU 16 C:\ProgramData\Microsoft\Windows\Start Menu CSIDL_COMMON_STARTUP 18 C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup CSIDL_COMMON_TEMPLATES 2d C:\ProgramData\Microsoft\Windows\Templates CSIDL_COMMON_VIDEO 37 C:\Users\Public\Videos CSIDL_COMPUTERSNEARME 3d CSIDL_CONNECTIONS 31 CSIDL_CONTROLS 03 CSIDL_COOKIES 21 C:\Users\Iwao\AppData\Local\Microsoft\Windows\INetCookies CSIDL_DESKTOP 00 C:\Users\Iwao\Desktop CSIDL_DESKTOPDIRECTORY 10 C:\Users\Iwao\Desktop CSIDL_DRIVES 11 CSIDL_FAVORITES 06 C:\Users\Iwao\Favorites CSIDL_FONTS 14 C:\WINDOWS\Fonts CSIDL_HISTORY 22 C:\Users\Iwao\AppData\Local\Microsoft\Windows\History CSIDL_INTERNET 01 CSIDL_INTERNET_CACHE 20 C:\Users\Iwao\AppData\Local\Microsoft\Windows\INetCache CSIDL_LOCAL_APPDATA 1c C:\Users\Iwao\AppData\Local CSIDL_MYDOCUMENTS 0c CSIDL_MYMUSIC 0d C:\Users\Iwao\Music CSIDL_MYPICTURES 27 C:\Users\Iwao\Pictures CSIDL_MYVIDEO 0e C:\Users\Iwao\Videos CSIDL_NETHOOD 13 C:\Users\Iwao\AppData\Roaming\Microsoft\Windows\Network Shortcuts CSIDL_NETWORK 12 CSIDL_PERSONAL 05 C:\Users\Iwao\Documents CSIDL_PRINTERS 04 CSIDL_PRINTHOOD 1b C:\Users\Iwao\AppData\Roaming\Microsoft\Windows\Printer Shortcuts CSIDL_PROFILE 28 C:\Users\Iwao CSIDL_PROGRAM_FILES 26 C:\Program Files CSIDL_PROGRAM_FILES_COMMON 2b C:\Program Files\Common Files CSIDL_PROGRAM_FILES_COMMONX86 2c C:\Program Files (x86)\Common Files CSIDL_PROGRAM_FILESX86 2a C:\Program Files (x86) CSIDL_PROGRAMS 02 C:\Users\Iwao\AppData\Roaming\Microsoft\Windows\Start Menu\Programs CSIDL_RECENT 08 C:\Users\Iwao\AppData\Roaming\Microsoft\Windows\Recent CSIDL_RESOURCES 38 C:\WINDOWS\resources CSIDL_RESOURCES_LOCALIZED 39 CSIDL_SENDTO 09 C:\Users\Iwao\AppData\Roaming\Microsoft\Windows\SendTo CSIDL_STARTMENU 0b C:\Users\Iwao\AppData\Roaming\Microsoft\Windows\Start Menu CSIDL_STARTUP 07 C:\Users\Iwao\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup CSIDL_SYSTEM 25 C:\WINDOWS\system32 CSIDL_SYSTEMX86 29 C:\WINDOWS\SysWOW64 CSIDL_TEMPLATES 15 C:\Users\Iwao\AppData\Roaming\Microsoft\Windows\Templates CSIDL_WINDOWS 24 C:\WINDOWS CSIDL_xxxxxxx 0f CSIDL_xxxxxxx 32 CSIDL_xxxxxxx 33 CSIDL_xxxxxxx 34 CSIDL_xxxxxxx 3c CSIDL_xxxxxxx 3e CSIDL_xxxxxxx 3f
登録エントリ (.reg) ファイルの構文
kb 310516 登録エントリ (.reg) ファイルを使用してレジストリ サブキーおよび値を追加、変更、または削除する方法
kb 256986 上級ユーザー向けの Windows レジストリ情報
reg export key file
Win 7 で file が存在する時,”y/n” の確認が入る.XP ではない.
ShellExec クラス経由で呼び出していたので,file は更新されず原因がわかり難かったのでメモ.
{
CString command = _T(“Reg.exe”) ;
CString param ;
{
CString dateTime= CTime::GetCurrentTime().Format(_T(“%y%m%d%H%M%S”)) ;
CString tmpFile = ::FolderAddLastSP(::GetTempPath()) + _T(“M___.tmp\\Reg\\”) + dateTime + _T(“.reg”) ;
::CreateEmptyFile(tmpFile) ;
CFile::Remove(tmpFile) ;
param = _T(“export hkcu\\”) + subKey + _T(” “) + tmpFile ;
}
{
ShellExec se ;
se.SetFile(command) ;
se.SetNon2QMark(TRUE) ;
se.SetParamaters(param) ;
se.SetShowCmd(SW_HIDE) ;
se.Execute() ;
}
}
//*******************************************************************************
// 関数名 :文字列に変換
// 作成日 :’10/03/05
//*******************************************************************************
CString RegAccessF::ToString (HKEY hKey,LPCTSTR subKey,LPCTSTR entry)
{
HSecKey = GetSecKey(hKey,subKey,KEY_QUERY_VALUE) ;
if (HSecKey == NULL) { return _T(“”) ; }
Entry = entry ;
Type = REG_NONE ;
Count = 0 ;
wchar_t wcEntry[1024] ;
::ToStringWC(wcEntry,countof(wcEntry),Entry) ;
LONG checkStatus = ::RegQueryValueExW(HSecKey,wcEntry,0,&Type,NULL,&Count) ;
if (checkStatus != ERROR_SUCCESS) { return _T(“”) ; }
CByteArray dataAry ; dataAry.SetSize(Count+10) ;
BYTE* dataPtr = dataAry.GetData() ;
LONG get__Status = ::RegQueryValueExW(HSecKey,wcEntry,0,&Type,dataPtr,&Count) ;
if (checkStatus != ERROR_SUCCESS) { return _T(“”) ; }
CString str ;
str.Format(_T(“\”%s\”=hex(%x):”),entry,Type) ;
for (int index=0 ; index BYTE b1 = dataAry[index] ;
CString bStr ; bStr.Format(_T(“%02x,”),b1) ;
str += bStr ;
}
CloseSecKey() ;
return str ;
}