Deployment Installer Logic Target Folder Selection - rpapub/WatchfulAnvil GitHub Wiki

๐Ÿ› ๏ธ Installer Logic and UX

The installer deploys Workflow Analyzer rule DLLs to the appropriate UiPath Studio rule folders, based on filesystem probing or user input.


๐ŸŽฏ Objectives

  • Auto-detect target paths based on actual folder presence
  • Optionally allow manual override via folder picker
  • Support both admin (system) and user installs
  • Work offline and without registry dependencies
  • Be robust, reversible, and scriptable

๐Ÿ“ฆ DLL Deployment Mapping

The ๐Ÿ“„ UiPath Version โ†’ Target Folder โ†’ Workflow Analyzer rule build DLL

UiPath Studio Version Target Folder (Install Mode) Rule Build DLL to Install
< 2021.10 %ProgramFiles%\UiPath\Studio\Rules (system mode) net461
< 2021.10 %LocalAppData%\Programs\UiPath\Studio\Rules (user mode) net461
**2021.10 โ€“ < 2024.10 %ProgramFiles%\UiPath\Studio\net461\Rules (system mode) net461
**2021.10 โ€“ < 2024.10 %LocalAppData%\Programs\UiPath\Studio\net461\Rules (user mode) net461
**2021.10 โ€“ < 2024.10 %ProgramFiles%\UiPath\Studio\Rules\net6.0 (system mode) net6.0
**2021.10 โ€“ < 2024.10 %LocalAppData%\Programs\UiPath\Studio\Rules\net6.0 (user mode) net6.0
2024.10+ %ProgramFiles%\UiPath\Studio\Rules\net8.0 (system mode) net8.0
2024.10+ %LocalAppData%\Programs\UiPath\Studio\Rules\net8.0 (user mode) net8.0
2024.10+ %ProgramFiles%\UiPath\Studio\net472\Rules (system mode) net461
2024.10+ %LocalAppData%\Programs\UiPath\Studio\net472\Rules (user mode) net461
User-selected (override) user-defined folder (any location) net6.0
Fallback / Unknown %Public%\Documents\UiPath\Rules (fallback) net6.0

๐Ÿ” Target Folder Selection Logic

function DetermineInstallTargets():
    if USER_SELECTED_FOLDER is not empty:
        return [
            { source: "net6.0",  target: USER_SELECTED_FOLDER }
        ]

    results = []

    // net8.0 โ†’ UiPath 2024.10+ (Windows & cross-platform)
    if dir_exists("%LOCALAPPDATA%\\Programs\\UiPath\\Studio\\Rules\\net8.0") OR
       dir_exists("%ProgramFiles%\\UiPath\\Studio\\Rules\\net8.0"):
        results.append({ source: "net8.0", target: existing_path })

    // net6.0 โ†’ UiPath 2021.10+ (Windows & cross-platform)
    if dir_exists("%LOCALAPPDATA%\\Programs\\UiPath\\Studio\\Rules\\net6.0") OR
       dir_exists("%ProgramFiles%\\UiPath\\Studio\\Rules\\net6.0"):
        results.append({ source: "net6.0", target: existing_path })

    // net472 โ†’ UiPath 2025+ (Windows-Legacy)
    if dir_exists("%LOCALAPPDATA%\\Programs\\UiPath\\Studio\\net472\\Rules") OR
       dir_exists("%ProgramFiles%\\UiPath\\Studio\\net472\\Rules"):
        results.append({ source: "net461", target: existing_path })

    // net461 โ†’ UiPath 2021.10โ€“2023.x (Windows-Legacy)
    if dir_exists("%LOCALAPPDATA%\\Programs\\UiPath\\Studio\\net461\\Rules") OR
       dir_exists("%ProgramFiles%\\UiPath\\Studio\\net461\\Rules"):
        results.append({ source: "net461", target: existing_path })

    if results is not empty:
        return results

    // Fallback
    return [
        { source: "net6.0", target: "%PUBLIC%\\Documents\\UiPath\\Rules" }
    ]


๐Ÿ”„ Flow Diagram

                โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                โ”‚ 1. Is the installer running in silent mode?  โ”‚
                โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                โ”‚
                  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                  โ”‚                         โ”‚
                Yes                       No
                  โ”‚                         โ”‚
  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
  โ”‚ Proceed with autodetection    โ”‚     โ”‚ 2. User selects detection mode via UI       โ”‚
  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                                โ”‚
                                   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                                   โ”‚                         โ”‚
                          Auto-detect selected     Custom folder selected
                                   โ”‚                         โ”‚
                  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                  โ”‚ Probe known UiPath rule paths   โ”‚     โ”‚ Install net6.0 DLL to selected folder      โ”‚
                  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                   โ”‚
                      โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                      โ”‚ Any matching folders found?    โ”‚
                      โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                   โ”‚
                            Yes   โ–ผ
                          โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                          โ”‚ For each known folder:                      โ”‚
                          โ”‚ - Determine matching source (e.g. net6.0)   โ”‚
                          โ”‚ - Copy rule DLL to that folder              โ”‚
                          โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                            No โ–ผ
                          โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                          โ”‚ Fallback: use %Public%\Documents\UiPath\Rules      โ”‚
                          โ”‚ - Copy net6.0 DLL to that folder                   โ”‚
                          โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿงช Silent Mode Support

  • The installer supports /SILENT and /VERYSILENT
  • In silent mode, auto-detection is always used
  • The same detection logic applies without user interaction

๐Ÿงน Uninstallation

  • Future distribution installers will clean only known files
  • Strategy: track files via log or deterministic pattern matching