The volume of a certain rectangular solid is $ 8 \text{ cm}^3$, its total surface area is $ 32 \text{ cm}^3$, and its three dimensions are in geometric progression.  The sums of the lengths in cm of all the edges of this solid is

$ \textbf{(A)}\ 28 \qquad \textbf{(B)}\ 32 \qquad \textbf{(C)}\ 36 \qquad \textbf{(D)}\ 40 \qquad \textbf{(E)}\ 44$
1. Let the three dimensions of the rectangular solid be \( \frac{a}{r}, a, ar \), where \(a\) is a common ratio and \(r\) is the geometric progression ratio.
2. Given the volume of the rectangular solid is \(8 \text{ cm}^3\), we have:
   \[
   \left(\frac{a}{r}\right) \cdot a \cdot (ar) = 8
   \]
   Simplifying, we get:
   \[
   a^3 = 8 \implies a = 2
   \]
3. Given the total surface area is \(32 \text{ cm}^2\), we use the surface area formula for a rectangular solid:
   \[
   2 \left( \frac{a}{r} \cdot a + a \cdot ar + ar \cdot \frac{a}{r} \right) = 32
   \]
   Substituting \(a = 2\), we get:
   \[
   2 \left( \frac{2}{r} \cdot 2 + 2 \cdot 2r + 2r \cdot \frac{2}{r} \right) = 32
   \]
   Simplifying inside the parentheses:
   \[
   2 \left( \frac{4}{r} + 4r + 4 \right) = 32
   \]
   Dividing both sides by 2:
   \[
   \frac{4}{r} + 4r + 4 = 16
   \]
   Subtracting 4 from both sides:
   \[
   \frac{4}{r} + 4r = 12
   \]
4. To solve for \(r\), multiply both sides by \(r\):
   \[
   4 + 4r^2 = 12r
   \]
   Rearrange into a standard quadratic equation:
   \[
   4r^2 - 12r + 4 = 0
   \]
   Divide the entire equation by 4:
   \[
   r^2 - 3r + 1 = 0
   \]
   Solve the quadratic equation using the quadratic formula \(r = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}\):
   \[
   r = \frac{3 \pm \sqrt{9 - 4}}{2} = \frac{3 \pm \sqrt{5}}{2}
   \]
   Thus, the two possible values for \(r\) are:
   \[
   r = \frac{3 + \sqrt{5}}{2} \quad \text{or} \quad r = \frac{3 - \sqrt{5}}{2}
   \]
5. The sum of the lengths of all the edges of the solid is given by:
   \[
   4 \left( \frac{a}{r} + a + ar \right)
   \]
   Substituting \(a = 2\):
   \[
   4 \left( \frac{2}{r} + 2 + 2r \right)
   \]
   Using the fact that \(\frac{4}{r} + 4r = 12\):
   \[
   4 \left( \frac{2}{r} + 2 + 2r \right) = 4 \left( \frac{4}{r} + 4r \right) = 4 \times 4 = 16
   \]
   Therefore, the sum of the lengths of all the edges is:
   \[
   4 \times 8 = 32
   \]

The final answer is \(\boxed{32}\)