Skip to content

getVolumes() fails with status 4110 #193

@btosimongillings

Description

@btosimongillings

I have a shiny app that uses shinyFiles. It works fine most of the time but I have a user running this on Windows 10 Pro (v 22H2) who is encounting an error which we have tracked down to the getVolumes() command, specifically the part that calls WMIC.exe. Here is a reproducible example, lifting the relevant commands from getVolumes():

wmic <- paste0(Sys.getenv("SystemRoot"), "\\System32\\Wbem\\WMIC.exe")
file.exists(wmic) #returns TRUE
volumes <- system(paste(wmic, "logicaldisk get Caption"), intern = TRUE, ignore.stderr = TRUE)

Usually this runs fine but running this on the PC in question returns:
“Warning in system(paste(wmic, "logicaldisk get Caption"), intern = TRUE, :
running command 'C:\WINDOWS\System32\Wbem\WMIC.exe logicaldisk get Caption' had status 4110
Warning in system(paste(wmic, "/FAILFAST:1000 logicaldisk get VolumeName"), :
running command 'C:\WINDOWS\System32\Wbem\WMIC.exe /FAILFAST:1000 logicaldisk get VolumeName' had status 4110
Error in names(volumes) <- volNames :
'names' attribute [1] must be the same length as the vector [0]”

We have confirmed that Wbem is listed in the system path, and that WMIC.exe is present in that folder. Can you advise if we are doing something wrong and how to remedy?

thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions