Friday, October 4, 2024

Downloading With Curl

Open CMD in directory you want the file

curl -O -L "https://github.com/microsoft/microsoft-ui-xaml/releases/download/v2.8.6/Microsoft.UI.Xaml.2.8.x64.appx"
-O download the file named
-L follow redirects
I needed both capital O and capital L for it to work

Looking to find how to redirect the download to another location within the command line.

I have had this structure work for multiple file downloads but also mysteriously fail.
curl -O -L https://patchmypc.com/freeupdater/PatchMyPC.exe 
curl -O -L https://www.carifred.com/uvk/UVKPortable.exe

This seems to be the preferred structure for multiple file downloads.
    After the initial curl command, list them one after the other separated by a space.
        Sadly more difficult to edit.
curl -O -L https://patchmypc.com/freeupdater/PatchMyPC.exe https://www.carifred.com/uvk/UVKPortable.exe

Wget is great also. Maybe faster for some reason.
    It requires install, were as Curl is part of Win 10 and beyond.
        There is Wget2 but the added 2 in the command irritates me :)
            Again, a continuous list separated by a single space.

wget install JernejSimoncic.Wget
Open CMD in folder for downloads

wget --nocheck-certificate  https://patchmypc.com/freeupdater/PatchMyPC.exe https://www.carifred.com/uvk/UVKPortable.exe https://www.sordum.org/files/download/defender-exclusion-tool/ExcTool.zip

Wednesday, October 2, 2024

Windows 11 Install - Recent

Depending on the Win11.iso
    If offered to set up work/school, do that. Any domain name works.
    New iso's will not have work/school option.

Installing starts
First reboot 79%
Second reboot 62%
"Just a moment..."
Yes, Yes, Skip
"Let's connect you to a network"
shift + f10
oobe\bypassnro
"Just a moment..."
reboot
"Just a moment..."
Yes, Yes, Skip
"Let's connect you to a network"
click "I don't have internet"
Name
Next "blank password" set up later
No to everything
Accept
Hi

sysdm.cpl advanced>performanc>settings turn off everything that moves, fades or slides
indexing options remove everything except start menu

cmd
winget upgrade
to get list - then likely these need upgrading - ignore the others
winget install Microsoft.AppInstaller
winget install Microsoft.WindowsTerminal
winget install Microsoft.VCLibs.Desktop.14

winget install -e --id=RevoUninstaller.RevoUninstaller
 remove some stuff you don't like or need

Chris Titus WinUtil
  powershell admin
    irm christitus.com/win | iex
      standard tweeks, updates security, create shorcut

paste in notepad
  save as "somename.bat"
    right click, run as admin

---
winget install -e --id=Notepad++.Notepad++
winget install -e --id=Chocolatey.Chocolatey
winget install -e --id=Chocolatey.ChocolateyGUI
winget install -e --id=MartiCliment.UniGetUI
winget install -e --id=7zip.7zip
winget install -e --id=voidtools.Everything
winget install -e --id=ShareX.ShareX
winget install -e --id=winaero.tweaker
winget install -e --accept-package-agreements --id=9PF4KZ2VN4W9
winget install -e --accept-package-agreements --id=9P8LTPGCBZXD
pause
---

cmd
choco install launchyqt -y

Remember to:
sysdm.cpl > Advanced > Performance > turn off Animate, Fade, Slide
indexing options > leave only Start Menu

What about that Schneegans autounattended.xml?

Here we go . . .
    with aggressive app removal

create autounattended.xml
    If on Virtualbox
        start Anyburn edit win-iso and add autounattended.xml > rebuild > save
    If on hardware
        copy autounattended.xml and Win.iso to flash drive installer.

Start Install
"We are getting a few things ready"
Choose drive
"Installing Windows"
78% reboot #1
"Installing"
58% starts running powershell scripts
reboot #2
"Just a moment"
Holly Hanna!
"Checking for updates"
"Hi"
More powershell magic being run
    The programs were uninstalled but the shortcuts are still on start
Yikes, I can't log on . . .
OK, I intended to have a blank password but left the default "password" in xml file.
So, "password" it is then :)
Remember to delete "password" in the autounattended file if you want "blank" :)


Strange:
    Some Win.iso versions won't pick up the inserted autounattend.xml on VB

Too Much? :)





Monday, September 30, 2024

Winget Installing Multiple Programs

Using a .bat file

Note the agreements arguement with the windows store app

@echo off
winget install -e --id=Chocolatey.Chocolatey
winget install -e --id=7zip.7zip
winget install -e --accept-package-agreements --id=9PF4KZ2VN4W9
pause

(the last install is a windows store package)

    Or

@echo off
winget install --accept-package-agreements Chocolatey.Chocolatey 7zip.7zip 9PF4KZ2VN4W9
pause

Using a .ps1 file

Nice to have all the arguments on one line. All the "" & commas are a pain.

#Install software
$SoftwareToInstall = "MartiCliment.UniGetUI", "7zip.7zip"
foreach ($Software in $SoftwareToInstall) {
    WinGet.exe install $software --silent --force --accept-source-agreements --accept-package-agreements --disable-interactivity --source winget
}

Windows Sandbox makes it difficult to install Winget.

Here is a .ps1 script that works now but things change.

#Install WinGet, used https://learn.microsoft.com/en-us/windows/package-manager/winget/#install-winget-on-windows-sandbox
Start-Transcript C:\users\wdagutilityaccount\desktop\Installing.txt
$progressPreference = 'silentlyContinue'
Write-Information "Downloading WinGet and its dependencies..."
Invoke-WebRequest -Uri https://aka.ms/getwinget -OutFile $env:temp\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle
Invoke-WebRequest -Uri https://aka.ms/Microsoft.VCLibs.x64.14.00.Desktop.appx -OutFile $env:temp\Microsoft.VCLibs.x64.14.00.Desktop.appx
Invoke-WebRequest -Uri https://github.com/microsoft/microsoft-ui-xaml/releases/download/v2.8.6/Microsoft.UI.Xaml.2.8.x64.appx -OutFile $env:temp\Microsoft.UI.Xaml.2.8.x64.appx
Add-AppxPackage $env:temp\Microsoft.VCLibs.x64.14.00.Desktop.appx
Add-AppxPackage $env:temp\Microsoft.UI.Xaml.2.8.x64.appx
Add-AppxPackage $env:temp\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle

Stop-Transcript
Rename-Item -Path C:\users\wdagutilityaccount\desktop\Installing.txt -NewName C:\users\wdagutilityaccount\desktop\Done.txt 

Hints:
    For bat scripts just copy/paste into notepad and save/name file "anything.bat"
        Double click should run in Windows & Sandbox
    For ps1 scripts just copy/paste into notepad and save/name file "anything.ps1"
        In regular Windows, double clicking the file will run it.
        In Sandbox, right click and "run with Powershell"

Which one do I like for installing multiple probrams?
    I like the bat file's verticle list and ease of editing
    I also like the continuous list. 
    Just remember store apps need additional argument to avoid interaction during install but can be stated once  with continuous list version.
I guess you could go the Full Monty with below or pick and choose as needed.
--silent --force --accept-source-agreements --accept-package-agreements --disable-interactivity --source winget


Wednesday, September 25, 2024

Powershell 7 - How The Heck Do I Start It

 I installed Powershell 7.
    The default is v5 and it remains the default

But how do you run v7?

Bring up a Command Prompt (or Powershell v5) and type "pwsh".
    CMD is the most interesting . . .

Here is the original CMD window

It tuns into this

When done in Powershell it does this

OK, your will look different. I'm running the Chris Titus profile.





Tuesday, September 24, 2024

Bat File To Exe With Icon

I still like RocketDock. The longer I use any PC, the more things go into my RocketDock.
I prefer using it as portable enabling copying to another machine. The problem is the link point to the wrong place and the attached icons need to be reattached.

One solution is to create a bat file to access the location and then convert the bat file to exe and embed the icon.

The bat file might be this:

@ECHO OFF 
start "" "%userprofile%\Pictures\Gimp Work"

or

@ECHO OFF 
start "" https://www.dropbox.com/h

Then grab this (or get the install version on MajorGeeks)
 (When it creates the exe it makes a temporary file & Defender freaks out so approve it.)



Monday, September 23, 2024

Windows Sandbox Testing Winget

Before we get to Winget, a short mention of more fun.
    I've never tried Tron script.
        Browsers treat it like the plague and refuse to download Tron.
        In Sandbox install PaleMoon and download.
            Better yet copy/paste portable PaleMoon into Sandbox :)
        Run Tron . . . it's interesting. Install Net 3.5 first or Stinger won't run.
    (Sandbox can't "turn features on/off - it does have limitations so no Stinger)
            In regular Windows download Tron with torrent
    Brilliant idea - Copy/paste PatchmyPC and install stuff.

Ok - back to Winget
It's great but don't expect it to do everything full Windows does.
While perfecting my "perfect" Winget appslist.json it worked great.
    Need to alter the list and try again? No problem Close Sandbox and restart clean.

Enable Windows Sandbox Feature
    copy/paste between sandbox & host system works
open sandbox

See Faster Winget Install On Bottom Of This Post

Chris Titus WinUtil
    powershell admin
        iwr -useb https://christitus.com/win | iex
        install UnigetUI
            will install winget
                and ask to install UnigetUi - say no today WinUtil has the wrong info now
                    click the little ? by UnigetUi and Uniget's website will open for download
OR
    Install UnigetUI
OR
    winget install MartiCliment.UniGetUI

Now open UniGetUI and it will install chocolatey.
    Close it. When you open it again choco search will work.
  
Copy the json below into a Notepad file and save as "appslist" on the sandbox desktop

Open Command Prompt
*The name of the file doesn't matter
    It must be a valid json format
        The name must match the entry in the command line
            Editing the json (if needed) in Notepad++ makes life easier!

Export command:
winget export -o %userprofile%\desktop\appslist --accept-source-agreements

Import command
winget import -i %userprofile%\desktop\appslist --ignore-versions --accept-package-agreements --accept-source-agreements

It takes awhile to load so be patient.

If app install fails error code 1 check VCRedist.2015+.x64 is installed.

If errors occur validate the json file here https://jsonlint.com/
Also check the file extension matches the command.
    Sandbox defaults to not show file extensions.
Open file explorer > view and check file extension. 
    You need to either delete ".txt" or add .txt to the import command.

A few install popus appeared but the install was not affected.
    RocketDock failed with hash not match. Couldn't install without swithches.
    Failures do not stop the installs.

By the way . . . RocketDock installs just fine in UnigetUI with Chocolatey.
UnigetUI installs Chocolatey when you start it the first time.
I also get LaunchyQT with Chocolatey.

            choco install rocketdock launchyqt irfanviewplugins -y

Observation
    UnigetUi bundles.json sometimes fails on simple installs like 7zip
    Where as Winget appslist.json does not fail

For now, I prefer Winget appslist.json installs.

appslist file

{
"$schema" : "https://aka.ms/winget-packages.schema.2.0.json",
"CreationDate" : "2024-09-29T09:35:27.698-00:00",
"Sources" : 
[
{
"Packages" : 
[
{
"PackageIdentifier" : "MartiCliment.UniGetUI"
},
{
"PackageIdentifier" : "ShareX.ShareX"
},
{
"PackageIdentifier" : "AutoHotkey.AutoHotkey"
},
{
"PackageIdentifier" : "voidtools.Everything"
},
{
"PackageIdentifier" : "HexChat.HexChat"
},
{
"PackageIdentifier" : "IrfanSkiljan.IrfanView"
},
{
"PackageIdentifier" : "Mozilla.Firefox"
},
{
"PackageIdentifier" : "Notepad++.Notepad++"
},
{
"PackageIdentifier" : "Proton.ProtonVPN"
},
{
"PackageIdentifier" : "VideoLAN.VLC"
},
{
"PackageIdentifier" : "winaero.tweaker"
},
{
"PackageIdentifier" : "nepnep.neofetch-win"
},
{
"PackageIdentifier" : "7zip.7zip"
},
{
"PackageIdentifier" : "AdrienAllard.FileConverter"
},
{
"PackageIdentifier" : "Microsoft.PowerShell"
},
{
"PackageIdentifier" : "Oracle.VirtualBox"
},
{
"PackageIdentifier" : "Google.Chrome.EXE"
},
{
"PackageIdentifier" : "2BrightSparks.SyncBackFree"
},
{
"PackageIdentifier" : "Chocolatey.ChocolateyGUI"
},
{
"PackageIdentifier" : "AOMEI.Backupper.Standard"
},
{
"PackageIdentifier" : "flux.flux"
},
{
"PackageIdentifier" : "LocalSend.LocalSend"
},
{
"PackageIdentifier" : "Microsoft.PowerToys"
}
],
"SourceDetails" : 
{
"Argument" : "https://cdn.winget.microsoft.com/cache",
"Identifier" : "Microsoft.Winget.Source_8wekyb3d8bbwe",
"Name" : "winget",
"Type" : "Microsoft.PreIndexed.Package"
}
},
{
"Packages" : 
[
{
"PackageIdentifier" : "9N0DX20HK701"
}
],
"SourceDetails" : 
{
"Argument" : "https://storeedgefd.dsx.mp.microsoft.com/v9.0",
"Identifier" : "StoreEdgeFD",
"Name" : "msstore",
"Type" : "Microsoft.Rest"
}
}
],
"WinGetVersion" : "1.8.1911"
}

Fast Powershell Winget Install Script

I looked all over & tried different way to install Winget on Sandbox without Chris Titus' help.
    I finally found this smart guy HERE 
        Much faster than the Chris Titus way of doing it
            Download, paste into Sandbox, right click, run with powershell

Or 

You can copy, paste this into a test file and save it as "Install_WinGet_and_Software.ps1"
    Or name it "Santa.ps1" for that matter.
        I removed install VSCode and added 7zip to have two installs so we see the pattern.

This is the Powershell script . . .

#Install WinGet, used https://learn.microsoft.com/en-us/windows/package-manager/winget/#install-winget-on-windows-sandbox
Start-Transcript C:\users\wdagutilityaccount\desktop\Installing.txt
$progressPreference = 'silentlyContinue'
Write-Information "Downloading WinGet and its dependencies..."
Invoke-WebRequest -Uri https://aka.ms/getwinget -OutFile $env:temp\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle
Invoke-WebRequest -Uri https://aka.ms/Microsoft.VCLibs.x64.14.00.Desktop.appx -OutFile $env:temp\Microsoft.VCLibs.x64.14.00.Desktop.appx
Invoke-WebRequest -Uri https://github.com/microsoft/microsoft-ui-xaml/releases/download/v2.8.6/Microsoft.UI.Xaml.2.8.x64.appx -OutFile $env:temp\Microsoft.UI.Xaml.2.8.x64.appx
Add-AppxPackage $env:temp\Microsoft.VCLibs.x64.14.00.Desktop.appx
Add-AppxPackage $env:temp\Microsoft.UI.Xaml.2.8.x64.appx
Add-AppxPackage $env:temp\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle

#Install software
$SoftwareToInstall = "Notepad++.Notepad++", "7zip.7zip"
foreach ($Software in $SoftwareToInstall) {
    WinGet.exe install $software --silent --force --accept-source-agreements --disable-interactivity --source winget
}
Stop-Transcript
Rename-Item -Path C:\users\wdagutilityaccount\desktop\Installing.txt -NewName C:\users\wdagutilityaccount\desktop\Done.txt

If you download the appx package on your own:
    in notepad & save script as "something.ps1" right click and run with powershell
Add-AppxPackage -path "C:\Users\WDAGUtilityAccount\Downloads\Microsoft.VCLibs.x64.14.00.Desktop.appx"

OK, Good Grief - How Many Of These Do We Need? (bat files are easier)
    Here is a ps1 to install programs only. I like how we put the switches on one command.
    The "", syntax is a pain.
    The --accept-package-agreements avoids answering "yes" to agreement

#Install software
$SoftwareToInstall = "MartiCliment.UniGetUI", "7zip.7zip", "2BrightSparks.SyncBackFree", "AOMEI.Backupper", "AutoHotkey.AutoHotkey", "Brave.Brave", "Chocolatey.ChocolateyGUI". "voidtools.Everything", "AdrienAllard.FileConverter", "Google.Chrome", "HexChat.HexChat", "IrfanSkiljan.IrfanView", "JavadMotallebi.NeatDownloadManager", "localsend", "Microsoft.PowerToys", "Notepad++.Notepad++", "qBittorrent.qBittorrent", "ShareX.ShareX", "Microsoft.WindowsTerminal", "Oracle.VirtualBox", "VideoLAN.VLC", "CharlesMilette.TranslucentTB", "9P8LTPGCBZXD", "RevoUninstaller.RevoUninstaller", "winaero.tweaker"
foreach ($Software in $SoftwareToInstall) {
    WinGet.exe install $software --silent --force --accept-source-agreements --accept-package-agreements --disable-interactivity --source winget
}

Wednesday, September 18, 2024

Let AI Help Blog Posting

I've only done this once and yep, it worked.

Create the blog post. Copy the text to clipboard.

Go to Claude and paste it in. 
Claude will create and format the blog post.
Download the *.md file.
Open the *.md file and copy the text

Go to Free Markdown and past the text. 
Free Markdown will interpret the md format and create the html file.

Now copy the raw html and paste it into your blog.

Here is what was produced from the above text . . .
***LOL, It's overkill but it does work***
So, now I've done it twice.

From Markdown to HTML: A Simple Workflow for Bloggers

Have you ever struggled with formatting your blog posts? I recently discovered a straightforward process that makes it easy to go from a simple text draft to a fully formatted HTML blog post. Here's the step-by-step workflow I've used successfully:

The Process

  1. Draft Your Content: Start by writing your blog post content in plain text.

  2. Use Claude for Formatting:

    • Copy your draft text.
    • Paste it into Claude (an AI assistant).
    • Ask Claude to format the text as a blog post.
  3. Get Your Markdown File:

    • Claude will provide a formatted version of your post in Markdown.
    • Download the .md file Claude creates.
  4. Convert Markdown to HTML:

    • Open the downloaded .md file.
    • Copy all the text from this file.
    • Go to a free Markdown-to-HTML converter (like "Free Markdown").
    • Paste your Markdown text into the converter.
  5. Finalize Your HTML:

    • The converter will interpret the Markdown and generate HTML.
    • Copy the raw HTML output from the converter.
  6. Publish Your Post:

    • Paste the HTML into your blog's editor or content management system.

Why This Works

This method is effective because it combines the ease of writing in plain text, the formatting capabilities of AI, and the universality of HTML. By using Markdown as an intermediary step, you get a clean, structured format that's easy to convert to polished HTML.

Conclusion

I've only tried this process once, but it worked seamlessly. It's a great way to streamline your blogging workflow, especially if you're not comfortable writing directly in HTML or using complex content management systems.

Give it a try for your next blog post and see how it simplifies your publishing process!

Thursday, August 29, 2024

Powershell Unrestricted and Download Windows ISO

Forget Windows Media Creation Tool. Download the Windows version you want.

Download the Fido.ps1 script here. Rufus uses it.
Open Powershell and type Get-ExecutionPolicy -List
You probably see this

We just want to run Fido.ps1 once and not change powershell policy forever.
You can use CMD or Powershell
> Of course change "username" and assuming Fido is located in Downloads<

Powershell.exe -ExecutionPolicy Unrestricted -File C:\Users\"username"\Downloads\Fido.ps1
>Remember shift+right-click and copy as path works<

Now when you close Powershell, nothing has changed.

The same thing can be done with Rufus to just grab the Windows.iso but it's not intutive.
In Boot selection choose Non bootable. Then click the down arrow by Select and choose DOWNLOAD. Then click DOWNLOAD
After downloading close Rufus






Wednesday, August 28, 2024

Amazon Rufus - Just Kill It

 uBlock Origin block Amazon Rufus
Go to "options" "my filters"
Add these 2 lines
www.amazon.com##.rufus-panel-header-container
www.amazon.com##.rufus-container-peek-view


Before

After






Downloading With Curl

Open CMD in directory you want the file curl -O -L "https://github.com/microsoft/microsoft-ui-xaml/releases/download/v2.8.6/Microsoft.U...