Giter Site home page Giter Site logo

Comments (8)

corpnewt avatar corpnewt commented on September 27, 2024

You can try uncommenting this line to show all available disks and see if that works. The final line would go from:

        # rem_disks = self.d.disks

to:

        rem_disks = self.d.disks

If wmic already reports them as type 2 though, they should be detected by the script, as it searches for types 0 and 2 via the following:

    def get_disks_of_type(self, disk_list, disk_type=(0,2)):
        disks = {}
        for disk in disk_list:
            if disk_list[disk].get("type",0) in disk_type:
                disks[disk] = disk_list[disk]
        return disks

But it is worth noting that there's 3 commands diskwin.py runs to map disk information:

wmic diskdrive get deviceid,model,index,size,partitions /format:csv
wmic path Win32_LogicalDiskToPartition get antecedent,dependent
wmic logicaldisk get deviceid,filesystem,volumename,size,drivetype /format:csv

It might be worth cross referencing that info to ensure everything is reporting correctly.

-CorpNewt

from gibmacos.

 avatar commented on September 27, 2024

Nope, nothing changes when uncommenting that line. I attach an screenshot with the 3 commands, but for me it seems everything okay.
2019 08 23-03 54

from gibmacos.

corpnewt avatar corpnewt commented on September 27, 2024

Can you get me the output of those three wmic commands exactly as I typed them? I'll see if I can figure out where things are dropping off.

-CorpNewt

from gibmacos.

 avatar commented on September 27, 2024

If i have don't remove the /format:csv at the end it gives me an error, i'll change my language settings to english and when it finishes i'll screencap the full command outputs

from gibmacos.

corpnewt avatar corpnewt commented on September 27, 2024

Oh - that likely explains it - as that is a part of the commands the diskwin.py module runs to gather info:

disks = self.r.run({"args":[self.wmic, "diskdrive", "get", "deviceid,model,index,size,partitions", "/format:csv"]})[0]

parts = self.r.run({"args":[self.wmic, "logicaldisk", "get", "deviceid,filesystem,volumename,size,drivetype", "/format:csv"]})[0]

If those commands fail - then no output would be returned, and the script would effectively not see any disks.

What error does it give you when you append /format:csv to the end of those commands?

-CorpNewt

from gibmacos.

 avatar commented on September 27, 2024

Well, for some reason, when the windows language is english it just works perfectly. I don't have any clue on how that's remotely possible, but yeah it was just windows doing windows things

from gibmacos.

corpnewt avatar corpnewt commented on September 27, 2024

Sounds about right - I'll keep that in mind in case someone else runs into the issue. For the time being, I'll close this issue.

-CorpNewt

from gibmacos.

ReVG08 avatar ReVG08 commented on September 27, 2024

I have received the same error, yet still my default system language is English
image

No disks are shown

from gibmacos.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.