AutomoxAutomox

I need to copy Ookla Speedtest.exe CLI to System32 for multiple systems for ease of use.

cleveratcomputers
March 31, 2022 at 5:40 pm UTC
#Ookla Speedtest CLI#copy-item

I need to copy Ookla Speedtest.exe CLI to System32 for multiple systems, I setup the below Worklet script but it doesnt seem to work. Am I missing something to do with permissions when copying over files to the system32 folder which always requires Admin priveleges as we all know. Not sure how to get around this if it is the case. I have the speedtest.exe also uploaded to the Policy too. Any ideas will be much appreciated.

 

Copy-Item speedtest.exe -Destination "c:\windows\system32\"

This discussion is archived and closed to replies. Continue it in the Automox Community Slack.

Discuss on Slack

Replies (2)

Ronald_FreedMarch 31, 2022
#1

Hey cleveratcomputer,

I would create a temp folder and put the installer there.  Not sure if you can save files to system32 folder.  Try something like this:
 

$path = "C:\temp\"

if(!(Test-Path -path $path))  
{  
    New-Item -ItemType directory -Path $path -Verbose
    Write-Output "The folder path has been created successfully at $path" 
}
else 
{ 
    Write-Output "The folder $path already exists"
}

function DownloadSpeedtest(){
    ## Download Speedtest
    Write-Host "Downloading SpeedTest"
    $url = "https://install.speedtest.net/app/windows/latest/speedtestbyookla_x64.msi"
    $output = "c:\Temp\Speedtest.msi"

jack.smithMarch 31, 2022
#2

Because Automox is running in the context of a 32-bit x86 Process, Windows is re-directing the file copy to %windir%\SysWOW64

 

This will say it better than me https://docs.microsoft.com/en-us/windows/win32/winprog64/file-system-redirector