Page 1 of 1

running Windows command:msinfo32.exe

Posted: Wed Apr 16, 2008 2:23 pm
by kotikoti
Hi All,
New to RR and evaluating a requirement to use this environment.
Stuck at the first hurdle, but believe can help me to understand RR ways

Need to capture some system data from command msinfo32.exe, and have been trying to run the following

put shell("C:\Program Files\Common Files\Microsoft Shared\MSInfo\msinfo32.exe /categories +Components /report D:\myinfo1.txt")

which has failed, assuming as a result of the spaces in the path defined.

the commannd is also passed parameters as /categories +Components etc, not sure if this is to fail as well once the path issue has been ironed out.
How do I achieve this task?

Thanking you all...
Koti Koti

Posted: Wed Apr 16, 2008 3:19 pm
by Klaus
Hi Koti,

you could try to QUOTE all your paths with a possible space in it:

Code: Select all

...
put QUOTE & "C:\Program Files\Common Files\Microsoft Shared\MSInfo\msinfo32.exe" & QUOTE into tExe
put QUOTE & "D:\my info1.txt" & QUOTE into tOutput
put shell(tExe && "/categories +Components /report" && tOutput) 
...
Not tested but you get the picture :-)


Best

Klaus

Posted: Wed Apr 16, 2008 3:33 pm
by kotikoti
Hi Klaus,
getting a script error, resorted in the following line

put "C:\Progra~1\Common~1\Micros~1\MSInfo\Msinfo32.exe /categories +Components /report " & quote & tFilename & quote into tCommand


but not very tidy I think since need to keep 8 character for directory, and remember to check this for each path defined.

Posted: Wed Apr 16, 2008 3:52 pm
by Klaus
Hi Koti,

I recommended to put BOTH pathnames into quotes!
Please try that and then we will see :-)


Best

Klaus

Posted: Wed Apr 16, 2008 8:18 pm
by Janschenkel
Take a look at the 'shortFilePath' function - it helps convert paths to the old 8.3 DOS-compatible format.

Jan Schenkel.

Posted: Thu Apr 17, 2008 3:52 pm
by kotikoti
Thanks Jan, will read on it...