Converting Batch file

Hi,

How would I go about converting the below batch file so each command runs natively within the PSADT script?

@echo off
REM Stop AppsAnywhere Service
net stop “AppsAnywhereService”
taskkill /f /im “AppsAnywhere.exe”
REM Uninstall AppsAnywhere Client
msiexec /x {19BB2ED9-56F5-4217-966F-3334F840C7C3} /qn
msiexec /x {A7390D63-EC32-43E6-9E6F-B3345923A4D6} /qn
msiexec /x {21A970DD-0097-4394-8C58-487A97D43E7F} /qn
MsiExec /x {F6D96D29-A5FF-4970-A68F-F22E53E17204} /qn
REM Stop Cloudpaging Player
net stop “Streaming Core Service”
msiexec /x {23F6FB7C-C1E2-491B-91A1-0441D5191BC7} /qn /norestart
REM Upgrade Cloudpaging Player (setting a 20GB cache size)
msiexec /qn /i “cloudpaging-player-setup-x64.msi” ET_cache_size=“20480” /norestart
REM msiexec /qn /i “cloudpaging-player-setup-x64.msi” REINSTALL=“ALL” REINSTALLMODE=“vamus” /norestart
del “C:\Users\Public\Desktop\Cloudpaging Player.lnk”
REM Reapply extended permissions (Required)
reg add “HKEY_LOCAL_MACHINE\SOFTWARE\Endeavors Technologies\StreamingCore\Settings\AppEvent” /v AllowLocalSystem /t REG_DWORD /d “1” /f
reg add “HKEY_LOCAL_MACHINE\SOFTWARE\Endeavors Technologies\StreamingCore\Settings\Driver” /v PhysicalLayerMode /t REG_DWORD /d “1” /f
REM Install AppsAnywhere Client
msiexec /i “apps-anywhere-installer-x64.msi” /q /norestart

Many thanks,
Graham

Maybe someone on here will do the work for you, otherwise check out the function reference doc: https://allnewandimproved.psappdeploytoolkit.com/functions/

Hey not sure why you would need to do that. Just put the batch file inside of the Files folder then use the Execute-Process to call it like so

## <Perform Installation tasks here>
     Execute-Process "Name_of_batchfile.bat"

If you are concerned about some of them starting before the other is complete, then you can add a waitfor command between each like so

waitfor SomethingThatIsNeverHappening /t 10 2>NUL

At the top of your batch file add this line to set the current directory
Set SourcePath=%~dp0
Then make sure the apps-anywhere-installer-x64.msi is in the Files folder
msiexec /i “%SourcePath%apps-anywhere-installer-x64.msi” /q /norestart
The 10 means 10 seconds so you can change that to more or less if you need to.