Fixup
This commit is contained in:
parent
f01ab51fac
commit
703b98b722
23
README.md
23
README.md
|
@ -4,24 +4,31 @@ AE-Send is a Windows application that integrates into the context menu, allowing
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
To install AE-Send, run the following command in PowerShell as Administrator:
|
To install AE-Send, follow these steps:
|
||||||
|
|
||||||
|
1. **Download the AE-Send Executable**:
|
||||||
|
- Click [here](https://git.nixc.us/colin/ae-send/raw/branch/master/dist/ae-send_windows_amd64.exe) to download the `ae-send_windows_amd64.exe` file.
|
||||||
|
- Save the file to a convenient location, such as your `Downloads` folder.
|
||||||
|
|
||||||
|
2. **Run the Executable to Install**:
|
||||||
|
- Open the **Start Menu**, type `PowerShell`, right-click on **Windows PowerShell**, and select **Run as Administrator**.
|
||||||
|
- In the PowerShell window, navigate to the folder where you saved the executable by typing the following command and pressing Enter:
|
||||||
```powershell
|
```powershell
|
||||||
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope Process -Force; Invoke-WebRequest -Uri "https://git.nixc.us/colin/ae-send/raw/branch/master/install.ps1" -OutFile "$env:TEMP\install.ps1"; & "$env:TEMP\install.ps1"; Remove-Item "$env:TEMP\install.ps1" -Force
|
cd $env:USERPROFILE\Downloads
|
||||||
|
```
|
||||||
|
- Run the executable with the install argument to create the context menu entry by typing the following command and pressing Enter:
|
||||||
|
```powershell
|
||||||
|
.\ae-send_windows_amd64.exe install
|
||||||
```
|
```
|
||||||
|
|
||||||
This command downloads and executes the installation script which sets up AE-Send on your system.
|
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
Right-click any file in Windows Explorer to see the "Send with AE Send" option.
|
- **To Use AE-Send**: Right-click any file in Windows Explorer to see the "Send with AE Send" option.
|
||||||
|
|
||||||
## Uninstallation
|
## Uninstallation
|
||||||
|
|
||||||
To uninstall AE-Send, use the following PowerShell command:
|
To uninstall AE-Send, use the following PowerShell command:
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
Start-Process "C:\Program Files\AE-Send\ae-send.exe" -ArgumentList "uninstall" -Wait
|
.\ae-send_windows_amd64.exe uninstall
|
||||||
```
|
```
|
||||||
|
|
||||||
Enjoy using AE-Send for your file transfer needs!
|
|
29
install.ps1
29
install.ps1
|
@ -1,20 +1,17 @@
|
||||||
|
|
||||||
|
### Updated `install.ps1` Script
|
||||||
|
|
||||||
|
```powershell
|
||||||
# install.ps1
|
# install.ps1
|
||||||
|
|
||||||
# Download the executable to the Temp directory
|
# Create the directory in Program Files if it doesn't exist
|
||||||
$exeUrl = "https://git.nixc.us/colin/ae-send/raw/branch/master/dist/ae-send_windows_amd64.exe"
|
$installPath = "C:\Program Files\AE-Send"
|
||||||
$downloadPath = "$env:TEMP\ae-send.exe"
|
if (!(Test-Path -Path $installPath)) {
|
||||||
Invoke-WebRequest -Uri $exeUrl -OutFile $downloadPath
|
New-Item -ItemType Directory -Force -Path $installPath
|
||||||
|
}
|
||||||
|
|
||||||
# Create the directory in Program Files
|
# Open the directory in File Explorer
|
||||||
$installPath = "C:\Program Files\AE-Send\ae-send.exe"
|
Start-Process explorer.exe $installPath
|
||||||
New-Item -ItemType Directory -Force -Path "C:\Program Files\AE-Send"
|
|
||||||
|
|
||||||
# Copy the executable to the Program Files directory
|
Write-Output "Please download the AE-Send executable and drag it into the opened directory."
|
||||||
Copy-Item -Path $downloadPath -Destination $installPath -Force
|
Write-Output "Download link: https://git.nixc.us/colin/ae-send/raw/branch/master/dist/ae-send_windows_amd64.exe"
|
||||||
|
|
||||||
# Attempt to install (add context menu entry)
|
|
||||||
$exeArgs = "install"
|
|
||||||
& $installPath $exeArgs
|
|
||||||
|
|
||||||
# Clean up downloaded file
|
|
||||||
Remove-Item $downloadPath -Force
|
|
||||||
|
|
5
main.go
5
main.go
|
@ -32,14 +32,11 @@ func installContextMenuItem() {
|
||||||
keyPath := `Software\Classes\*\shell\AE Send`
|
keyPath := `Software\Classes\*\shell\AE Send`
|
||||||
command := "\"" + exePath + "\" \"%1\""
|
command := "\"" + exePath + "\" \"%1\""
|
||||||
|
|
||||||
k, err := registry.OpenKey(registry.CURRENT_USER, keyPath, registry.ALL_ACCESS)
|
k, _, err := registry.CreateKey(registry.CURRENT_USER, keyPath, registry.ALL_ACCESS)
|
||||||
if err != nil {
|
|
||||||
k, _, err = registry.CreateKey(registry.CURRENT_USER, keyPath, registry.ALL_ACCESS)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatalf("Failed to create registry key: %v", err)
|
log.Fatalf("Failed to create registry key: %v", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
|
||||||
defer k.Close()
|
defer k.Close()
|
||||||
|
|
||||||
err = k.SetStringValue("", "Send with AE Send")
|
err = k.SetStringValue("", "Send with AE Send")
|
||||||
|
|
Loading…
Reference in New Issue