Skip to content

Commit b4a6320

Browse files
committed
/CURRENTUSER user-mode install with admin-layer drift detection
Add user-mode install support via Inno Setup's /CURRENTUSER flag: Admin-layer drift detection (0 UAC when current): - IsProjFSEnabled(): checks Client-ProjFS Windows optional feature - IsEnableProjFSTaskCurrent(): queries registered task XML for hash marker - NeedsAdminSetup(): combines both checks - Self-elevates via /ADMINSTAGE=true only when drift detected /CURRENTUSER mode (non-elevated): - Deploys payload to %LocalAppData%\VFSForGit\Versions\{ver}\ - Creates Current junction + user PATH (HKCU) - Sets GVFS_COMMON_APPDATA_ROOT and GVFS_SECURE_DATA_ROOT env vars - Registers per-user \GVFS\AutoMount logon task /ADMINSTAGE mode (elevated, minimal): - Enables ProjFS feature - Registers EnableProjFSOnAllDrives boot task from embedded XML - Exits without deploying payload (caller handles deployment) Build integration: - BuildProjFSTaskXml MSBuild target generates task XML with hash marker - Passes /DProjFSTaskXml to ISCC System-mode (elevated) unchanged: deploys to Program Files with versioned layout, same as Phase 2. PrivilegesRequiredOverridesAllowed=commandline enables the /CURRENTUSER flag without changing default behavior. Assisted-by: Claude Sonnet 4.5 Assisted-by: Claude Opus 4.6 Signed-off-by: Tyrie Vella <tyrielv@gmail.com>
1 parent 8181c35 commit b4a6320

2 files changed

Lines changed: 507 additions & 155 deletions

File tree

GVFS/GVFS.Installers/GVFS.Installers.csproj

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
<PropertyGroup>
44
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
55
<LayoutPath>$(RepoOutPath)GVFS.Payload\bin\$(Configuration)\win-x64\</LayoutPath>
6+
<ProjFSAttachScriptsDir>$(MSBuildThisFileDirectory)..\..\scripts\projfs-attach\</ProjFSAttachScriptsDir>
7+
<ProjFSTaskXmlPath>$(IntermediateOutputPath)enable-projfs-on-all-drives-task.xml</ProjFSTaskXmlPath>
68
</PropertyGroup>
79

810
<ItemDefinitionGroup>
@@ -24,8 +26,12 @@
2426
<Content Include="info.bat" />
2527
</ItemGroup>
2628

29+
<Target Name="BuildProjFSTaskXml" BeforeTargets="CreateInstaller" Condition="'$(SkipCreateInstaller)' != 'true'">
30+
<Exec Command='powershell.exe -NoProfile -ExecutionPolicy Bypass -File "$(ProjFSAttachScriptsDir)build-task-xml.ps1" -ScriptPath "$(ProjFSAttachScriptsDir)enable-projfs-on-all-drives.ps1" -TemplatePath "$(ProjFSAttachScriptsDir)enable-projfs-on-all-drives-task.xml.template" -OutputPath "$(ProjFSTaskXmlPath)"' />
31+
</Target>
32+
2733
<Target Name="CreateInstaller" BeforeTargets="Build" Condition="'$(SkipCreateInstaller)' != 'true'">
28-
<Exec Command='"$(PkgTools_InnoSetup)\tools\ISCC.exe" /DLayoutDir="$(LayoutPath)" /DGVFSVersion=$(GVFSVersion) Setup.iss /O"$(OutputPath)"' />
34+
<Exec Command='"$(PkgTools_InnoSetup)\tools\ISCC.exe" /DLayoutDir="$(LayoutPath)" /DGVFSVersion=$(GVFSVersion) /DProjFSTaskXml="$(ProjFSTaskXmlPath)" Setup.iss /O"$(OutputPath)"' />
2935
</Target>
3036

3137
<Target Name="CleanInstaller" BeforeTargets="AfterClean">

0 commit comments

Comments
 (0)