Skip to content

Commit 7f03e85

Browse files
committed
Setup.iss: user-mode install via /CURRENTUSER (PR-B)
Extends the existing Inno Setup installer with a /CURRENTUSER flag that routes to a complete user-mode install path. Default behavior (admin, system-mode) is unchanged. User-mode (/CURRENTUSER) flow: 1. Drift-detect: checks ProjFS enabled + EnableProjFSOnAllDrives task registered with current hash marker 2. If drift detected: self-elevates via /ADMINSTAGE=true to enable ProjFS and register the task from pre-built embedded XML 3. Deploys payload to %LocalAppData%\GVFS\Versions\<version>\ 4. Creates/swaps Current junction with verification + rollback 5. Updates user PATH (HKCU) and GVFS env vars 6. Registers per-user \GVFS\AutoMount logon task (conhost --headless) 7. GCs old versions (keeps most recent 2) Build changes: - GVFS.Installers.csproj: BuildProjFSTaskXml target runs build-task-xml.ps1 and passes output to ISCC - Setup.iss: PrivilegesRequiredOverridesAllowed=commandline Review fixes incorporated: - /ADMINSTAGE=true (not bare /ADMINSTAGE) for Inno Setup param parsing - Junction rollback reads old target via fsutil reparsepoint query and actually restores it via mklink /J - Logon task XML declares UTF-8 encoding (matches SaveStringToFile) Assisted-by: Claude Opus 4.8 Signed-off-by: Tyrie Vella <tyrielv@gmail.com>
1 parent 6714021 commit 7f03e85

2 files changed

Lines changed: 531 additions & 31 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)