'registry'에 해당되는 글 6건
- 2019.02.16 How to make a volatile registry using NSIS script
- 2018.01.22 How to get the edition information of Windows
- 2015.08.04 registry value redirection
- 2015.03.26 registry relate to COM
- 2013.11.15 Redirect Registry on WOW64
- 2011.07.13 Internet Explorer 추가기능관리
How to make a volatile registry using NSIS script
There is no native way to make a volatile registry key in NSIS, so we have to call WINAPI directly.
!define REG_OPTION_VOLATILE 1 Function MakeVolatileKey System::Call 'advapi32::RegCreateKeyEx(i ${HKEY_LOCAL_MACHINE}, t "Software\volatile", i0, i0, i ${REG_OPTION_VOLATILE}, i ${GENERIC_WRITE}, i0, *i.r1, *i)i.r0' |
But, there is one thing we have to consider on 64bit Windows.
If we add a code 'SetRegView 64' in order to avoid registry redirection, two registry keys are made:
1. HKEY_LOCAL_MACHINE\SOFTWARE\Volatile (by WriteRegDWORD)
2, HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\volatile (by RegCreateKeyEx)
SetRegView can not affect native registry APIs; then we should apply a KEY_WOW64_64KEY option to RegCreateKeyEx API.
!include WinCore.nsh !define REG_OPTION_VOLATILE 1
${If} ${RunningX64} |
How to get the edition information of Windows
- GetProductionInfo API
- note: minimum support : Windows Vista / Windows Server 2008
- link
- prodspec.ini
- location: %systemroot%\system32\prodspec.ini
- example
- [Product Specification]
- Product=Windows XP Professional
- note: This file is only existed in Windows XP.
- link
- EditionID (REG_SZ)
- location: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion
- note: This registry value is not exist in Windows XP.
registry value redirection
registry value redirection
- %ProgramFiles% => %ProgramFiles(x86)%
- %commonprogramfiles% => %commonprogramfiles(x86)%
https://msdn.microsoft.com/en-us/library/aa384232(VS.85).aspx