# Agent Installation - Quick Fix Guide

## ❌ Masalah: File PCMonitorAgent.exe tidak ditemukan

Path yang error:
```
C:\Windows\System32\E:\xampp\htdocs\tracker\agent-csharp\bin\PCMonitorAgent.exe
```

---

## ✅ Solusi

### **Opsi 1: Build Project (Recommended)**

Jalankan di Command Prompt/PowerShell:

```bash
cd E:\xampp\htdocs\tracker\agent-csharp
dotnet restore
dotnet build -c Release
dotnet publish -c Release -f net6.0-windows -o bin
```

Setelah build selesai, jalankan **INSTALL.bat** lagi.

---

### **Opsi 2: Gunakan INSTALL.bat yang sudah diupdate**

INSTALL.bat sekarang sudah diupdate untuk:
- ✅ Cari di folder Release otomatis
- ✅ Cari di folder Debug jika Release tidak ada
- ✅ Prompt manual path jika tidak ketemu
- ✅ Instruksi build otomatis jika file tidak ada

Cukup jalankan:
```bash
INSTALL.bat
```

---

### **Opsi 3: Manual Path Entry**

Jika INSTALL.bat gagal tapi sudah ada executable di folder lain:
1. INSTALL.bat akan meminta path manual
2. Ketik path lengkap ke PCMonitorAgent.exe
3. Contoh: `E:\xampp\htdocs\tracker\agent-csharp\bin\Release\net6.0-windows\PCMonitorAgent.exe`

---

## 📍 Lokasi File (setelah build)

```
E:\xampp\htdocs\tracker\agent-csharp\
├── bin\
│   ├── Release\
│   │   └── net6.0-windows\
│   │       └── PCMonitorAgent.exe ✅ (inilah yang dicari)
│   └── Debug\
└── INSTALL.bat
```

---

## 🔍 Verifikasi

Setelah build, pastikan file ada:

```bash
ls E:\xampp\htdocs\tracker\agent-csharp\bin\Release\net6.0-windows\PCMonitorAgent.exe
```

Atau via Explorer: Navigate ke folder di atas.

---

## 🚀 Setelah Executable Ada

```bash
cd E:\xampp\htdocs\tracker\agent-csharp
INSTALL.bat install
```

Selesai! Service akan auto-start.

---

**Updated:** 2026-03-27
