Computing.Net > Forums > Disk Operating System > Win 98 computer name as a varable

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Win 98 computer name as a varable

Reply to Message Icon

Name: jamiegreen
Date: November 27, 2003 at 05:40:21 Pacific
OS: Win 98
CPU/Ram: Various
Comment:

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%.cfg

thanks for any help.
Jamie



Sponsored Link
Ads by Google

Response Number 1
Name: SkipCox
Date: November 27, 2003 at 12:01:11 Pacific
Reply:

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


0
Reply to Message Icon

Related Posts

See More







Post Locked

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


Go to Disk Operating System Forum Home


Sponsored links

Ads by Google


Results for: Win 98 computer name as a varable

include a file name as a field in a file? www.computing.net/answers/dos/include-a-file-name-as-a-field-in-a-file-/1076.html

Using the Computer Name in a Batch Program www.computing.net/answers/dos/using-the-computer-name-in-a-batch-program/5560.html

win 98 dos networking www.computing.net/answers/dos/win-98-dos-networking/11275.html