Skip to content

Instantly share code, notes, and snippets.

View 0xbadfca11's full-sized avatar
💭
I may be slow to respond.

0xbadfca11

💭
I may be slow to respond.
View GitHub Profile
@0xbadfca11
0xbadfca11 / .md
Last active August 22, 2020 09:27
Windows ReFS bug

Summary

Windows ReFS driver crashes when enabling integrity streams of large file.

Affect

  • Windows Server 2012
  • Windows Server 2012 R2
  • Windows Server 2016 (with ReFS 1.2)
  • Windows 10 v1703 (with ReFS 1.2)

Not affect

  • Windows Server 2016 (with ReFS 3.1)
@0xbadfca11
0xbadfca11 / .md
Last active June 13, 2017 08:04
Windows exFAT bug

Summary

Windows exFAT driver crashes when making huge file.

Affect

  • Windows XP with KB955704
  • Windows Server 2003 with KB955704
  • Windows Vista
  • Windows Server 2008
  • Windows 7
  • Windows Server 2008 R2
@0xbadfca11
0xbadfca11 / Fix-Combined-Character-FileName.ps1
Last active March 22, 2017 03:31 — forked from pekeq/Fix-Combined-Character-FileName.ps1
Windows上で、UNICODEの結合文字が含まれるファイル名を、正規化したファイル名にリネームするスクリプト作った。
<#
.SYNOPSIS
ファイル名、ディレクトリ名のUNICODE結合文字を、普通の1文字に変換する
.DESCRIPTION
ファイル名、ディレクトリ名のUNICODE結合文字になっている部分を、普通の1文字に変換する。
例えば、「か + ゛(濁点記号)」を、「が」に変換する。
Macは、ファイル名をUNICODE結合文字で保存するが、Windowsは、普通の1文字で保存するので、
MacからWindowsに、USBメモリーでファイルをコピーした際など、MacとWindowsのファイル交換時に
@0xbadfca11
0xbadfca11 / What is .PFILE file extension.ja.md
Created February 17, 2017 13:02
What is .PFILE file extension

.PFILE 拡張子とは何か

Microsoft Rights Management Services

あなたが探している情報はこちらではないね?

Windows 10 の EFS

Windows 10 の新機能の一つで FAT16/FAT32/exFAT で EFS(Encrypting File System) が使用可能になりました。 公式にはバージョン 1607 からとありますが実際には FAT16/FAT32 ではバージョン 1507 から exFAT ではバージョン 1511 から使用可能でした。 暗号化されたファイルは Windows 10 以外からはファイル名の末端に .PFILE が付きます。 Windows 10 の EFS 以外でファイル名の末端を .PFILE に変えても Windows 10 で EFS として扱われることはありません。

Windows 10 同士で共有したい

NTFS の EFS の場合と同じ方法で可能です。

@0xbadfca11
0xbadfca11 / How to use a USB thumb drive as Hyper-V pass-through disk.en.md
Created August 9, 2016 12:00
How to use a USB stick as Hyper-V pass-through disk

Not goal of this document

  • Pass-through USB device as USB device.

Goal of this document

  • Using USB storage as pass-through disk.

USB-HDD and Windows To Go certified USB stick

This is easy.

Normal USB sticks

@0xbadfca11
0xbadfca11 / CreateDirectory.cpp
Last active March 5, 2018 05:20
BOOLEAN WINAPI RtlAreLongPathsEnabled()
#include <windows.h>
#include <atlalloc.h>
#include <atlcore.h>
#include <clocale>
#include <cstdio>
int wmain(int, PWSTR argv[])
{
setlocale(LC_ALL, "");
IFDYNAMICGETCACHEDFUNCTIONTYPEDEF(L"ntdll", BOOLEAN(WINAPI*)(), "RtlAreLongPathsEnabled", RtlAreLongPathsEnabled)
@0xbadfca11
0xbadfca11 / Wrong usage Optimize-VHD.md
Created January 5, 2016 09:38
お前らの Optimize-VHD の使い方は間違っている
  • ゲストでsdelete -z→シャットダウンして→Optimize-VHD -Mode Prezeroed
  • ホストでMount-VHDsdelete -zDismount-VHDOptimize-VHD -Mode Prezeroed

これらは時間と書き込み量を浪費しているだけだから今すぐ止めて
Mount-VHD <VHD> [-NoDriveLetter] -ReadOnly -Passthru | Optimize-VHD [-Mode {Quick|Full}] -Passthru | Dismount-VHD
を使うべき。

なんで?

読み取り専用でマウントしている時に Optimize-VHD をすればディスクイメージ内の NTFS から得られる空き領域情報を利用するから。

@0xbadfca11
0xbadfca11 / 00_README.md
Last active March 6, 2024 12:51
Windows ReFS versions