Im trying to create msinfo32.nfo file but its not working

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
chocolade
Posts: 10
Joined: 23 Jul 2013 23:38

Im trying to create msinfo32.nfo file but its not working

#1 Post by chocolade » 25 Jul 2013 00:47

This is what i tried in the first time which worked fine:
I created in notepad a bat file containing this line:

Code: Select all

msinfo32.exe /nfo C:\TEMP\test.nfo


After some minutes i saw the file test.nfo in te C:\TEMP
This is working good.


Now i wanted to do what i did in my older bat file to make that the nfo file will be created in a specific directory.
So i tried to do what i did in my old bat.

Code: Select all

set today=%date:~7,2%-%date:~4,2%-%date:~-2%
msinfo32.exe /nfo %USERPROFILE%\AppData\Local\Diagnostic_Tool_Blue_Screen\Diagnostic Tool Blue Screen\SF_%today%\msinfo32.nfo


The variable today contain the name of the directory to create the file inside.
When im running the bat file i see in the cmd window this:

D:\C-Sharp\Diagnostic Tool Blue Screen\Diagnostic Tool Blue Screen\Diagnostic To
ol Blue Screen\bin\Debug>set today=25-07-13

D:\C-Sharp\Diagnostic Tool Blue Screen\Diagnostic Tool Blue Screen\Diagnostic To
ol Blue Screen\bin\Debug>msinfo32.exe /nfo C:\Users\bout0_000\AppData\Local\Diag
nostic_Tool_Blue_Screen\Diagnostic Tool Blue Screen\SF_25-07-13\msinfo32.nfo


All directories are correct. But when the bat file end and closed i can't see the nfo file in the SF_25-07-13 directory. It didnt create it.

What could be the problem ?



****

This is my old bat file content which is working:

Code: Select all

set today=%date:~7,2%-%date:~4,2%-%date:~-2%
%systemroot%\system32\dxdiag.exe /t %USERPROFILE%\AppData\Local\Diagnostic_Tool_Blue_Screen\Diagnostic Tool Blue Screen\SF_%today%\dxdiag.txt




Why the dxdiag code is working fine and the code with the msinfo32 is not working when using the %today% variable ?

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: Im trying to create msinfo32.nfo file but its not workin

#2 Post by foxidrive » 25 Jul 2013 03:09

Use start and quotes around the "x:\path\filename".

Code: Select all

start "" /wait msinfo32.exe /nfo "d:\abc\test.nfo"

chocolade
Posts: 10
Joined: 23 Jul 2013 23:38

Re: Im trying to create msinfo32.nfo file but its not workin

#3 Post by chocolade » 25 Jul 2013 03:18

Thanks working.

Post Reply