Problems with batch scripts happen for many minor reasons on a computer. The time spent in question/answers to find out these things can be reduced to only minutes rather than spanning days for several messages to go back and forth asking you what these things are.
This script bundles a number of these key points of information in a simple text format in Notepad for you to copy and paste into a message. The volunteers can often begin writing a script for you immediately and you can have your answer very quickly.1)
Visit this link to copy and paste the script from the initial post into a bat file:2)
run that script3)
and copy/paste its output into the next post in your thread:http://www.dostips.com/forum/viewtopic.php?f=3&t=7420&p=49133#p49133
Here is an example of the text from the script (it has code tags added automatically).
Windows version : Microsoft Windows [Version 10.0.10586]
Product name : Windows 10 Home, 64 bit
Performance indicators : Processor Cores: 4 Visible RAM: 3857100 kilobytes
Date/Time format : (dd/mm/yy) 09.09.2016 17:49:19,49
__APPDIR__ : C:\WINDOWS\system32\
ComSpec : C:\WINDOWS\system32\cmd.exe
PathExt : .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
Extensions : system: Enabled user: Enabled
Delayed expansion : system: Disabled user: Disabled
Locale name : de-DE Code Pages: OEM 850 ANSI 1252
DIR format : 27.08.2016 13:35 4.026.531.840 pagefile.sys
Permissions : Elevated Admin=No, Admin group=Yes
Missing from the tool collection: debug
Bugs and suggestions can be reported in this thread: http://www.dostips.com/forum/viewtopic.php?f=3&t=7347FAQ about what information this script provides and why:*) Does the script spy on my data?
No. The script is designed to give a range of non-personal information and not to harvest any kind of private or sensitive data. It is designed to help you receive a solution to your task quickly, by giving essential and useful details for people to help you with your script.*) Why do you need hundreds of lines of code to gather this information?
The changes in each Windows version and also user settings and permissions need to be checked and handled in different ways. The extra code you see is for all the extra ways of obtaining the same information in different computer setups.*) Could the script change or damage my computer?
No. The script is written to read information without changing any of it. It writes a plain text file showing the information that is gathered and makes it easy for you to copy it and paste it into a reply. The file is deleted automatically.*) Why do you want to know these details?
The changes in Windows settings means information is needed to write code that handles things like dates and times, and newest and oldest filenames and folders, and filesize sorting and other aspects. This provides the details in a quick and easy way for you.
Microsoft made a mistake in not providing ways to run scripts in any language or regional settings when using things like dates and times and DIR listings etc. These things change across different computers and cause the most frequently asked questions in batch file scripting. *) Enabling Extensions and Delayed Expansion
Some commands change the way batch file commands work so that detail is needed too.
The usage of exclamation marks '!' is changed when Delayed expansion is enabled and it alters how environment variables are written and used within program loops.*) Language
The language/locale name and the code page number can affect the way text characters are handled in languages other than English and it can also change batch scripts themselves. Special allowences need to be made in some cases for a script to work.*) Missing files and path elements
Some checks are made to show if batch file commands are missing or the way they are accessed has changed. If there are missing files or they can't be accessed in the usual way then it shows a significant problem, and you can be informed and also helped to fix the issue.
The environment variables %path%
have entries that cause batch scripts to fail if they are missing and so they are checked too.
Examples of external commands that are checked are findstr.exe, timeout.exe, sort.exe, mode.exe, ping.exe*) Windows version and release
Different versions of Windows and levels within each version can have different commands, so this information lets the volunteers write code for your version of Windows without any delay.*) DIR listing and pagefile.sys
If pagefile.sys is present it is used for the DIR format listing where the date/time/filesize format gives the volunteers these details to help them write code which uses them.
The figure of virtual RAM and reboot time are only two of the many small indicators that are assessed together to rule out certain problems if scripts fail or if computer performance is affected.*) Permissions information
Some commands require elevation to higher administrative permissions and we can tell here what pointers to provide when there is a problem with a script which is known to require higher access levels.*) Running the script is, of course, optional.
If you can provide accurate and good sets of details regarding your question/problem then you will still get people willing and interested to help you.