[Launch]
ProgramExecutable=ProcessMonitor\Procmon.exe
WorkingDirectory=%PAL:AppDir%\ProcessMonitor
DirectoryMoveOK=yes
SupportsUNC=yes
RunAsAdmin=compile-force

[Activate]
Registry=true

[RegistryKeys]
ProcessMonitorPortable=HKCU\Software\Sysinternals\Process Monitor
-=HKCU\Software\Classes\.PML
-=HKCU\Software\Classes\ProcMon.Logfile.1
-=HKLM\SYSTEM\CurrentControlSet\Services\PROCMON23

[RegistryCleanupIfEmpty]
1=HKCU\Software\Sysinternals

[FileWrite1]
Type=Replace
File=%PAL:DataDir%\settings\ProcessMonitorPortable.reg
Find=%PAL:LastDrive%%PAL:LastPackagePartialDir:DoubleBackslash%\\
Replace=%PAL:Drive%%PAL:PackagePartialDir:DoubleBackslash%\\

[FileWrite2]
Type=Replace
File=%PAL:DataDir%\settings\ProcessMonitorPortable.reg
Find=%PAL:LastPortableAppsBaseDir:DoubleBackslash%\\
Replace=%PAL:PortableAppsBaseDir:DoubleBackslash%\\

[FileWrite3]
Type=Replace
File=%PAL:DataDir%\settings\ProcessMonitorPortable.reg
Find=%PAL:LastDrive%\\
Replace=%PAL:Drive%\\
