[Version]
Signature=$Windows NT$
AdvancedINF= 2.5,"advpack.dll"

[Uninstall.AddReg]
; Uninstall entry
HKLM,Software\Microsoft\Windows\CurrentVersion\Uninstall\ConhostFullScreen,DisplayName,,"%REMOVE_DESC%"
HKLM,Software\Microsoft\Windows\CurrentVersion\Uninstall\ConhostFullScreen,DisplayVersion,,"%FIX_VERSION%"
HKLM,Software\Microsoft\Windows\CurrentVersion\Uninstall\ConhostFullScreen,HelpLink,,"https://github.com/leecher1337/ntvdmx64/issues"
HKLM,Software\Microsoft\Windows\CurrentVersion\Uninstall\ConhostFullScreen,URLInfoAbout,,"https://github.com/leecher1337/ntvdmx64"
HKLM,Software\Microsoft\Windows\CurrentVersion\Uninstall\ConhostFullScreen,URLUpdateInfo,,"https://github.com/leecher1337/ntvdmx64"
HKLM,Software\Microsoft\Windows\CurrentVersion\Uninstall\ConhostFullScreen,Publisher,,"leecher1337"
HKLM,Software\Microsoft\Windows\CurrentVersion\Uninstall\ConhostFullScreen,DisplayIcon,,"%11%\cmd.exe"
HKLM,Software\Microsoft\Windows\CurrentVersion\Uninstall\ConhostFullScreen,EstimatedSize,0x00010001,1400
HKLM,Software\Microsoft\Windows\CurrentVersion\Uninstall\ConhostFullScreen,NoModify,0x00010001,1
HKLM,Software\Microsoft\Windows\CurrentVersion\Uninstall\ConhostFullScreen,NoRepair,0x00010001,1
HKLM,Software\Microsoft\Windows\CurrentVersion\Uninstall\ConhostFullScreen,UninstallString,,"RunDll32 advpack.dll,LaunchINFSection ntvdmx64.Inf,DefaultUninstall"
HKLM,Software\Microsoft\Windows\CurrentVersion\Uninstall\ConhostFullScreen

[Ntvdmx64.amd64.AddReg]
HKLM,SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows,LoadAppInit_DLLs,0x00010001,1
HKLM,SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows,RequireSignedAppInit_DLLs,0x00010001,0
HKCU,Console,ForceV2,0x00010001,0
HKLM,SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows,AppInit_DLLs,0x00000002,ldntvdm.dll

[Ntvdmx64.amd64.AddRegVdm]
HKLM,SYSTEM\CurrentControlSet\Control\VirtualDeviceDrivers,VDD,0x00010002,
HKLM,SYSTEM\CurrentControlSet\Control\WOW,DefaultSeparateVDM,,"no"
HKLM,SYSTEM\CurrentControlSet\Control\WOW,KnownDLLs,,"comm.drv commdlg.dll ctl3dv2.dll ddeml.dll keyboard.drv lanman.drv mmsystem.dll mouse.drv netapi.dll olecli.dll olesvr.dll pmspl.dll shell.dll sound.drv system.drv toolhelp.dll vga.drv wfwnet.drv win87em.dll winoldap.mod winsock.dll winspool.exe wowdeb.exe timer.drv compobj.dll storage.dll ole2.dll ole2disp.dll ole2nls.dll typelib.dll msvideo.dll avifile.dll msacm.dll mciavi.drv mciseq.drv mciwave.drv progman.exe avicap.dll mapi.dll"
HKLM,SYSTEM\CurrentControlSet\Control\WOW,LPT_timeout,,"15"
HKLM,SYSTEM\CurrentControlSet\Control\WOW,SharedWowTimeout,0x00010001,0x00000e10
HKLM,SYSTEM\CurrentControlSet\Control\WOW,DisallowedPolicyDefault,0x00010001,0
HKLM,SYSTEM\CurrentControlSet\Control\WOW,NTVDMInstalled,0x00010001,1

[SourceDisksNames.amd64]
2="NTVDM Loader x64",,,"\ldntvdm\system32"
6="Symbols",,,"\symbols\dbghelp\x64"
7="Installer"

[SourceDisksFiles.amd64]
ldntvdm.dll=2
dbghelp.dll=6
symsrv.dll=6
symsrv.yes=6
install.bat=7

[Ntvdmx64.amd64.System.Files]
ldntvdm.dll,,,0x4022

[Ntvdmx64.amd64.System.Files.Del]
ansi.sys,,,0x41
append.exe,,,0x41
autoexec.nt,,,0x10
backup.exe,,,0x41
bios1.rom,,,0x4022
bios4.rom,,,0x4022
cmos.ram,,,0x4022
command.com,,,0x4022
config.nt,,,0x10
country.sys,,,0x4022
debug.exe,,,0x41
dosx.exe,,,0x4022
edit.com,,,0x41
edit.hlp,,,0x41
edlin.exe,,,0x41
exe2bin.exe,,,0x41
fastopen.exe,,,0x41
gorilla.bas,,,0x41
graphics.com,,,0x41
graphics.pro,,,0x41
himem.sys,,,0x4022
kb16.com,,,0x4022
keyboard.sys,,,0x4022
krnl386.exe,,,0x4022
loadfix.com,,,0x41
mem.exe,,,0x41
money.bas,,,0x41
mscdexnt.exe,,,0x4022
msherc.com,,,0x41
nibbles.bas,,,0x41
ntdos.sys,,,0x4022
ntio.sys,,,0x4022
ntvdm.exe,,,0x4022
qbasic.exe,,,0x41
qbasic.hlp,,,0x41
redir.exe,,,0x41
remline.bas,,,0x41
setver.exe,,,0x41
share.exe,,,0x41
v7vga.rom,,,0x4022

[Ntvdmx64.amd64.Symbol.Files]
dbghelp.dll,,,0x4022
symsrv.dll,,,0x4022
symsrv.yes,,,0x41

[Ntvdmx64.amd64.Setup.Files]
instntvdmx64.bat,install.bat,,0x4022

[Ntvdmx64.amd64.Inf.Files.Add]
ntvdmx64.inf

[Ntvdmx64.amd64.Inf.Files.Del]
ntvdmx64.inf
ntvdmx64.PNF

[DestinationDirs]
Ntvdmx64.amd64.System.Files = 11
Ntvdmx64.amd64.System.Files.Del = 11
Ntvdmx64.amd64.Symbol.Files = 10,Symbols\dbghelp\x64
Ntvdmx64.amd64.Setup.Files = 10,Symbols
Ntvdmx64.amd64.Inf.Files.Add = 17
Ntvdmx64.amd64.Inf.Files.Del = 17

[InstallCmdsPre]
RunDll32 advpack.dll,LaunchINFSection %01%\ntvdmx64-32.Inf

[InstallCmds]
fsutil hardlink create %11%\ansi.sys %16425%\ansi.sys 
fsutil hardlink create %11%\append.exe %16425%\append.exe
fsutil hardlink create %11%\autoexec.nt %16425%\autoexec.nt
fsutil hardlink create %11%\backup.exe %16425%\backup.exe
fsutil hardlink create %11%\bios1.rom %16425%\bios1.rom
fsutil hardlink create %11%\bios4.rom %16425%\bios4.rom
fsutil hardlink create %11%\cmos.ram %16425%\cmos.ram
fsutil hardlink create %11%\command.com %16425%\command.com
fsutil hardlink create %11%\config.nt %16425%\config.nt
fsutil hardlink create %11%\country.sys %16425%\country.sys
fsutil hardlink create %11%\debug.exe %16425%\debug.exe
fsutil hardlink create %11%\edit.com %16425%\edit.com
fsutil hardlink create %11%\edit.hlp %16425%\edit.hlp
fsutil hardlink create %11%\edlin.exe %16425%\edlin.exe
fsutil hardlink create %11%\exe2bin.exe %16425%\exe2bin.exe
fsutil hardlink create %11%\fastopen.exe %16425%\fastopen.exe
fsutil hardlink create %11%\gorilla.bas %16425%\gorilla.bas
fsutil hardlink create %11%\graphics.com %16425%\graphics.com
fsutil hardlink create %11%\graphics.pro %16425%\graphics.pro
fsutil hardlink create %11%\himem.sys %16425%\himem.sys
fsutil hardlink create %11%\kb16.com %16425%\kb16.com
fsutil hardlink create %11%\keyboard.sys %16425%\keyboard.sys
fsutil hardlink create %11%\krnl386.exe %16425%\krnl386.exe
fsutil hardlink create %11%\loadfix.com %16425%\loadfix.com
fsutil hardlink create %11%\mem.exe %16425%\mem.exe
fsutil hardlink create %11%\money.bas %16425%\money.bas
fsutil hardlink create %11%\mscdexnt.exe %16425%\mscdexnt.exe
fsutil hardlink create %11%\msherc.com %16425%\msherc.com
fsutil hardlink create %11%\nibbles.bas %16425%\nibbles.bas
fsutil hardlink create %11%\ntdos.sys %16425%\ntdos.sys
fsutil hardlink create %11%\ntio.sys %16425%\ntio.sys
fsutil hardlink create %11%\ntvdm.exe %16425%\ntvdm.exe
fsutil hardlink create %11%\qbasic.exe %16425%\qbasic.exe
fsutil hardlink create %11%\qbasic.hlp %16425%\qbasic.hlp
fsutil hardlink create %11%\redir.exe %16425%\redir.exe
fsutil hardlink create %11%\remline.bas %16425%\remline.bas
fsutil hardlink create %11%\setver.exe %16425%\setver.exe
fsutil hardlink create %11%\share.exe %16425%\share.exe
fsutil hardlink create %11%\v7vga.rom %16425%\v7vga.rom
%10%\Symbols\instntvdmx64.bat install

[UninstallCmds]
RunDll32 advpack.dll,LaunchINFSection %01%\ntvdmx64-32.Inf,DefaultUninstall
%10%\Symbols\instntvdmx64.bat uninstall

[BeginUnInsPrompt]
Title      = %REMOVE_DESC% Uninstaller
Prompt     = %UnInsPrompt%
ButtonType = YESNO

[EndUnInsPrompt]
Prompt 	   = %EndUnInsPrompt%

[EndInsPrompt]
Prompt 	   = %EndInsPrompt%

[DefaultInstall.ntamd64]
;CheckAdminRights = 1
RunPreSetupCommands = InstallCmdsPre
CopyFiles   =  Ntvdmx64.amd64.System.Files, Ntvdmx64.amd64.Symbol.Files, Ntvdmx64.amd64.Setup.Files, Ntvdmx64.amd64.Inf.Files.Add
AddReg      = Ntvdmx64.amd64.AddReg, Ntvdmx64.amd64.AddRegVdm, Uninstall.AddReg
RunPostSetupCommands = InstallCmds:1
EndPrompt            = EndInsPrompt

[DefaultUninstall.ntamd64]
BeginPrompt          = BeginUnInsPrompt
Cleanup = 1
RunPreSetupCommands = UninstallCmds
DelFiles    = Ntvdmx64.amd64.System.Files, Ntvdmx64.amd64.System.Files.Del, Ntvdmx64.amd64.Symbol.Files, Ntvdmx64.amd64.Setup.Files, Ntvdmx64.amd64.Inf.Files.Del
Delreg      = Ntvdmx64.amd64.AddRegVdm, Uninstall.AddReg
EndPrompt            = EndUnInsPrompt


[Strings]
REMOVE_DESC="NTVDM x64"
FIX_VERSION="1.0.0.0"
EndInsPrompt  = "NTVDM was installed. You may need to reboot in order to execute the loader."
UnInsPrompt     = "Are you sure you want to remove NTVDM from your computer?"
EndUnInsPrompt  = "NTVDM was removed from your computer."
