You are here

Make a deployable protableapps folder with just the launcher.

2 posts / 0 new
Last post
Pay
Offline
Last seen: 3 years 1 month ago
Joined: 2021-03-04 02:00
Make a deployable protableapps folder with just the launcher.

Hi All.

I was in need of a deployable Protableapps folder with just the launcher (that's about 30 MB) and at first run downloads al the needed apps.
Is something like that already an option? Can i use a command line to download / update a bunch of apps at once?

Pro:
This way i don't have to walk around with a huge folder that i want to update at first run anyway.

Cons:
Useless until the download is complete. This will take time and data.

Pay
Offline
Last seen: 3 years 1 month ago
Joined: 2021-03-04 02:00
powershell test

$host.ui.rawui.WindowTitle = "Prep PortableApps for deployment"
$ProgressPreference = "Continue"
clear-host

if (Test-Path start.exe -PathType Leaf)
{"PortableApps start.exe file exist."}
else
{"ERROR: PortableApps file not found. Start script from root of PortableApps drive/folder."
sleep 5
exit
}
if (((get-childitem start.exe).VersionInfo | Select-Object -Property FileDescription) -match "PortableApps.com")
{"PortableApps File Description correct."}
else
{"ERROR: PortableApps file not found. Start script from root of PortableApps drive/folder."
sleep 5
exit
}
if (Test-Path .\deploy -PathType Any)
{"ERROR: Deploy forlder already exists."
sleep 5
exit
}

write-host "This will create a dployment folder of your PortableApps."
write-host "Make sure to close all Portableapps and the launcher before continueing."
Pause
write-host "Creating empty folders."
new-item -name "deploy\PortableApps" -ItemType Directory -Force
new-item -name "deploy\Documents\Music" -ItemType Directory -Force
new-item -name "deploy\Documents\Pictures" -ItemType Directory -Force
new-item -name "deploy\Documents\Videos" -ItemType Directory -Force

write-host "Copy PortableApps."
copy-item PortableApps\* -Destination .\deploy\PortableApps -Recurse -force
write-host "Removing PortableApps files."
get-ChildItem -path .\deploy -Filter * -Exclude appinfo.ini -Recurse -File | Remove-item -Force -Recurse
write-host "Reset PortableApps version."
$targets = Get-ChildItem -path .\deploy -Filter appinfo.ini -Recurse | Resolve-Path
#Get-Content $targets | Select-String "PackageVersion=" | ForEach-Object {$_ -replace $_ ,"PackageVersion=1.0.0.0"}
Set-Content $targets "[Version]" -force
add-Content $targets "PackageVersion=1.0.0.0" -force

write-host "Copy PortableApps launcher."
get-ChildItem -path PortableApps -Filter PortableApps.co* | copy-item -Destination .\deploy\PortableApps -Recurse -force
copy-item .\Start.exe -Destination .\deploy -force
copy-item .\Autorun.inf -Destination .\deploy -force

sleep 5

Log in or register to post comments