Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hi, can anyone help with this?
Need to set the computer name as a variable, ie:
set computername=(whateveritis).
This needs to run inside a batch file, that home users will need to run. Therefore cannot do it manually.Is thereanyway of extracting this info from the registry within the batch file, then setting it as a variable?
Got as far as extracting it to a text file, by using the following:
regedit /e c:\test.txt HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\ComputerName\ComputerName
But this does not really help.i need to be able to rename a file in the batch file, As shown below (this works great in win2K):
ren test.cfg %computername%.cfgthanks for any help.
Jamie

Jamie,
Check out RegInfo from Gérard Mélone. Background on this batch file at : http://computing.net/windows95/wwwboard/forum/147951.html
This batch file was written to delve into the windows registry and retrieve most system information. You should be able to find what you need as RegInfo.bat was originally written for 98 and W2k added as the batch matured.
Good luck,
Skip

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |