running Windows command:msinfo32.exe

Deploying to Windows? Utilizing VB Script execution? This is the place to ask Windows-specific questions.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
kotikoti
Posts: 72
Joined: Tue Apr 15, 2008 7:35 pm

running Windows command:msinfo32.exe

Post by kotikoti » Wed Apr 16, 2008 2:23 pm

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

Klaus
Posts: 13829
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Post by Klaus » Wed Apr 16, 2008 3:19 pm

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

kotikoti
Posts: 72
Joined: Tue Apr 15, 2008 7:35 pm

Post by kotikoti » Wed Apr 16, 2008 3:33 pm

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.

Klaus
Posts: 13829
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Post by Klaus » Wed Apr 16, 2008 3:52 pm

Hi Koti,

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


Best

Klaus

Janschenkel
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 977
Joined: Sat Apr 08, 2006 7:47 am
Location: Aalst, Belgium
Contact:

Post by Janschenkel » Wed Apr 16, 2008 8:18 pm

Take a look at the 'shortFilePath' function - it helps convert paths to the old 8.3 DOS-compatible format.

Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com

kotikoti
Posts: 72
Joined: Tue Apr 15, 2008 7:35 pm

Post by kotikoti » Thu Apr 17, 2008 3:52 pm

Thanks Jan, will read on it...
Build 160
Version 2.9.0
Platform: Windows

Post Reply

Return to “Windows”