Inno Setup을 사용하여 현재 날짜를 레지스트리에 바이너리 형식으로 저장 (Storing the current date to the registry in binary format with Inno Setup)


문제 설명

Inno Setup을 사용하여 현재 날짜를 레지스트리에 바이너리 형식으로 저장 (Storing the current date to the registry in binary format with Inno Setup)

Inno Setup을 사용하여 현재 날짜를 레지스트리 키에 바이너리 데이터로 쓸 수 있습니까? (문자열이면 변경하기가 매우 쉽습니다.)

내 MFC C++ 프로젝트에서 DATE 변수를 사용하여 WriteProfileBinary.

결국 나는 읽을 수 있어야 합니다. 이 값을 DateTime .NET C#을 사용하는 변수. 존재하지 않는 경우에만 값을 저장하기 위해 공통 프로그램 데이터 키를 사용할 것입니다.


[레지스트리]는 이진 데이터에 적합합니다.

binary가 지정된 경우 설치 프로그램은 바이너리(REG_BINARY) 값을 생성합니다 ... 데이터 유형이 binary인 경우 형식의 16진수 바이트 시퀀스입니다. : "00 ff 12 34".

타임스탬프를 어떻게 필요한 형식으로 변환합니까?<


참조 솔루션

방법 1:

To write the current date to registry as a binary value, you can do something like this:

var
  DateStr: string;
begin
  DateStr := GetDateTimeString('yyyy/mm/dd', '‑', ':');
  RegWriteBinaryValue(
    HKEY_AUTO, 'Software\My Company\My Program', 'InstallDate', DateStr);
end;

It will result in:

C:\>reg query "HKCU\Software\My Company\My Program"

HKEY_CURRENT_USER\Software\My Company\My Program
    InstallDate    REG_BINARY    323032312D31302D3039  

You can do even more obfuscation if you like. No matter what you do, user will be able to modify the value with more or less effort.

(by Andrew TruckleMartin Prikryl)

참조 문서

  1. Storing the current date to the registry in binary format with Inno Setup (CC BY‑SA 2.5/3.0/4.0)

#pascalscript #registry #inno-setup






관련 질문

Inno Setup의 WizardForm 페이지에서 레이블 텍스트 변경 (Changing label texts on WizardForm page in Inno Setup)

파스칼스크립트 디버깅 중에 양식 양식을 일시 중단할 수 있습니까? (Can a forms modality be suspended during pascalscript debugging?)

Inno Setup: .NET Framework 설치, 시스템 재부팅 후 설치 계속 (Inno Setup: Install .NET framework, reboot the system and continue installation)

Inno Setup - [code] 내부의 기본 경로 정의 (Inno Setup - Defining a default path inside [code])

파스칼스크립트에 DLL 함수 등록하기 (Registering DLL-Functions in Pascalscript)

HelpNDoc 파스칼 스크립트는 구조를 지원합니까? (Does HelpNDoc Pascal Script support structures?)

하위 설치 다운로드 및 실행 - Inno Download Plugin 다운로드 중에 진행률 표시줄이 이동하지 않음 (Download and run sub install - Inno Download Plugin progress bar does not move during download)

TBitmapImage는 Inno Setup 6에서 크기 조정된 디스플레이의 크기보다 크게 렌더링됩니다. (TBitmapImage is rendered larger than its size on scaled display in Inno Setup 6)

Inno Setup에서 필요할 때 시작 화면을 표시하지 않으려면 어떻게 해야 합니까? (How can I prevent showing the splash screen when I need it in Inno Setup?)

Inno Setup을 사용하여 현재 날짜를 레지스트리에 바이너리 형식으로 저장 (Storing the current date to the registry in binary format with Inno Setup)

Inno Setup 설치 프로그램 이전의 시작 화면에 이미지가 표시되지 않음 (Image on a splash screen before Inno Setup installer does not display)

Inno Setup 단어 완성이 전혀 작동하지 않습니다 (Inno Setup word completion doesn't work at all)







코멘트