# data[].attributes.body
Windows PowerShell

Copyright (C) Microsoft Corporation. All rights reserved.

Try the new cross-platform PowerShell https://aka.ms/pscore6

PS C:\Windows\system32> # ============================================

PS C:\Windows\system32> # OpenSSL Complete Installation and Setup

PS C:\Windows\system32> # Windows 10 / Windows 11

PS C:\Windows\system32> # ============================================

PS C:\Windows\system32>

PS C:\Windows\system32> Write-Host "============================================"

============================================

PS C:\Windows\system32> Write-Host " OpenSSL Installation and Setup"

OpenSSL Installation and Setup

PS C:\Windows\system32> Write-Host "============================================"

============================================

PS C:\Windows\system32> Write-Host ""

PS C:\Windows\system32>

PS C:\Windows\system32> # Step 1 - Check Administrator privileges

PS C:\Windows\system32> $currentUser = [Security.Principal.WindowsIdentity]::GetCurrent()

PS C:\Windows\system32> $principal = New-Object Security.Principal.WindowsPrincipal($currentUser)

PS C:\Windows\system32>

PS C:\Windows\system32> if (-not $principal.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) {

>> Write-Host "ERROR: Please run PowerShell as Administrator." -ForegroundColor Red

>> exit

>> }

PS C:\Windows\system32>

PS C:\Windows\system32> Write-Host "[1/7] Administrator privileges: OK" -ForegroundColor Green

[1/7] Administrator privileges: OK

PS C:\Windows\system32>

PS C:\Windows\system32> # Step 2 - Check Winget

PS C:\Windows\system32> if (-not (Get-Command winget -ErrorAction SilentlyContinue)) {

>> Write-Host "ERROR: winget is not installed." -ForegroundColor Red

>> exit

>> }

PS C:\Windows\system32>

PS C:\Windows\system32> Write-Host "[2/7] winget detected." -ForegroundColor Green

[2/7] winget detected.

PS C:\Windows\system32>

PS C:\Windows\system32> # Step 3 - Install OpenSSL

PS C:\Windows\system32> Write-Host "[3/7] Installing OpenSSL..." -ForegroundColor Yellow

[3/7] Installing OpenSSL...

PS C:\Windows\system32>

PS C:\Windows\system32> winget install --id ShiningLight.OpenSSL.Light -e `

>> --accept-package-agreements `

>> --accept-source-agreements

Found an existing package already installed. Trying to upgrade the installed package...

No available upgrade found.

No newer package versions are available from the configured sources.

PS C:\Windows\system32>

PS C:\Windows\system32> # Step 4 - Locate openssl.exe

PS C:\Windows\system32> Write-Host "[4/7] Searching for openssl.exe..." -ForegroundColor Yellow

[4/7] Searching for openssl.exe...

PS C:\Windows\system32>

PS C:\Windows\system32> $opensslExe = Get-ChildItem "C:\" -Filter openssl.exe -Recurse -ErrorAction SilentlyContinue |

>> Select-Object -First 1

# data[].attributes.body
# ============================================

# OpenSSL Complete Installation and Setup

# Windows 10 / Windows 11

# ============================================

Write-Host "============================================"

Write-Host " OpenSSL Installation and Setup"

Write-Host "============================================"

Write-Host ""

# Step 1: Check Administrator privileges

$currentUser = [Security.Principal.WindowsIdentity]::GetCurrent()

$principal = New-Object Security.Principal.WindowsPrincipal($currentUser)

if (-not $principal.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) {

Write-Host "ERROR: Please run PowerShell as Administrator." -ForegroundColor Red

exit

}

Write-Host "[1/6] Administrator privileges: OK" -ForegroundColor Green

# Step 2: Check if OpenSSL is already installed

$opensslExe = Get-ChildItem "C:\Program Files\OpenSSL-Win64\bin\openssl.exe" -ErrorAction SilentlyContinue

if (-not $opensslExe) {

Write-Host "[2/6] OpenSSL not found. Installing..." -ForegroundColor Yellow

# Check if winget exists

if (-not (Get-Command winget -ErrorAction SilentlyContinue)) {

Write-Host "ERROR: winget is not available on this computer." -ForegroundColor Red

Write-Host "Please install/update App Installer from Microsoft Store."

exit

}

# Install OpenSSL

winget install --id ShiningLight.OpenSSL.Light -e --accept-source-agreements --accept-package-agreements

# Check again after installation

$opensslExe = Get-ChildItem "C:\Program Files\OpenSSL-Win64\bin\openssl.exe" -ErrorAction SilentlyContinue

if (-not $opensslExe) {

Write-Host "ERROR: OpenSSL installation could not be located." -ForegroundColor Red

exit

}

} else {

Write-Host "[2/6] OpenSSL is already installed." -ForegroundColor Green

}

# Step 3: Set OpenSSL path

$opensslBin = "C:\Program Files\OpenSSL-Win64\bin"

Write-Host "[3/6] OpenSSL location found:" -ForegroundColor Green

Write-Host $opensslBin

# Step 4: Add OpenSSL to System PATH

$systemPath = [Environment]::GetEnvironmentVariable("Path", "Machine")

if ($systemPath -notlike "*$opensslBin*") {

Write-Host "[4/6] Adding OpenSSL to System PATH..." -ForegroundColor Yellow

[Environment]::SetEnvironmentVariable(

"Path",

"$systemPath;$opensslBin",

"Machine"

)

Write-Host "OpenSSL added to PATH successfully." -ForegroundColor Green

} else {

Write-Host "[4/6] OpenSSL is already in System PATH." -ForegroundColor Green

}

# Step 5: Refresh PATH for current PowerShell session

Write-Host "[5/6] Refreshing PATH..." -ForegroundColor Yellow

$env:Path = [Environment]::GetEnvironmentVariable("Path", "Machine") + ";" +

[Environment]::GetEnvironmentVariable("Path", "User")

# Step 6: Test OpenSSL

Write-Host "[6/6] Testing OpenSSL..." -ForegroundColor Yellow

Write-Host ""

$opensslCommand = Get-Command openssl.exe -ErrorAction SilentlyContinue

if ($opensslCommand) {

Write-Host "============================================"

Write-Host " OpenSSL Setup Successful!"

Write-Host "============================================"

Write-Host ""

Write-Host "OpenSSL Location:"

Write-Host $opensslCommand.Source

Write-Host ""

Write-Host "OpenSSL Version:"

openssl version

Write-Host ""

Write-Host "OpenSSL is ready to use." -ForegroundColor Green

} else {

Write-Host "OpenSSL was installed, but the current PowerShell session cannot find it." -ForegroundColor Yellow

Write-Host ""

Write-Host "Please close PowerShell, open a NEW PowerShell window, and run:"

Write-Host ""

Write-Host "openssl version" -ForegroundColor Cyan

}

# data[].attributes.body
#include<stdio.h>

#include<graphics.h>

#include<dos.h>

#include<conio.h>

int main()

{

int x,y,p,x1,y1,x2,y2,dx,dy,gd=DETECT,gm;

initgraph(&gd,&gm,(char*)"");

printf("Enter starting coordinates");

scanf("%d%d",&x1,&y1);

printf("Enter end coordinates");

scanf("%d%d",&x2,&y2);

dx=x2-x1;

dy=y2-y1;

x=x1;

y=y1;

p=2*dy-dx;

while(x<x2)

{

if(p>=0)

{

putpixel(x,y,WHITE);

y=y+1;

x=x+1;

p=p+2*dy-2*dx;

}

else

{

putpixel(x,y,WHITE);

x=x+1;

p=p+2*dy;

}

//x=x+1;

}

delay(100);

getch();

closegraph();

return 0;

}

# data[].attributes.attachment_link.title
FREE Preeti Typing | Type in Preeti Fonts

# data[].attributes.attachment_link.description
प्रिती फोंत मा टाइप गर्नुहोस् - Official Site to Type in Preeti Font using Preeti Keyboard Layout for FREE