A Windows 98 & ME forum. Win98banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Win98banter forum » Windows ME » General
Site Map Home Authors List Search Today's Posts Mark Forums Read Web Partners

Computer Name



 
 
Thread Tools Display Modes
  #21  
Old February 24th 05, 02:13 AM
David H. Lipman
external usenet poster
 
Posts: n/a
Default

Yepper -- Typo city, I meant Oy vey ;-)

--
Dave




"heirloom" wrote in message
...
| I'm in no way Yiddish, but, shouldn't that have been "oy vey?" Either way,
| it's the shiznit! In the words of the famous Paul Harvey, "....and now you
| know the rest of the skinny."
| Heirloom, old and something ain't quite right.
|
| BTW, I will be holding Mr. Jack Martinelli, MS-MVP, hostage, starting Friday
| morning. If anyone would like to contribute to his release fund...post back
| here. g Gonna keep him on a diet of cheap Texas wine and chili......talk
| about a pressurized cabin on his flight home!


  #22  
Old February 24th 05, 04:34 AM
heirloom
external usenet poster
 
Posts: n/a
Default

What??......no offerings for the release of Mr. Martinelli????
Heirloom, old and may have to make more chili


"David H. Lipman" wrote in message
...
Yepper -- Typo city, I meant Oy vey ;-)

--
Dave




"heirloom" wrote in message
...
| I'm in no way Yiddish, but, shouldn't that have been "oy vey?" Either

way,
| it's the shiznit! In the words of the famous Paul Harvey, "....and now

you
| know the rest of the skinny."
| Heirloom, old and something ain't quite

right.
|
| BTW, I will be holding Mr. Jack Martinelli, MS-MVP, hostage, starting

Friday
| morning. If anyone would like to contribute to his release fund...post

back
| here. g Gonna keep him on a diet of cheap Texas wine and

chili......talk
| about a pressurized cabin on his flight home!




  #23  
Old February 24th 05, 04:35 AM
heirloom
external usenet poster
 
Posts: n/a
Default

I'm impressed.
Heirloom, old and easily amused


"Shane" wrote in message
...
REGEDIT /E regtest.tmp
"HKEY_LOCAL_MACHINE\System\CurrentControlSet\Contr ol\ComputerName"


This wrapped and should be one line.


Shane




  #24  
Old February 24th 05, 05:26 AM
Shane
external usenet poster
 
Posts: n/a
Default

Here's a slightly more economical version. Remembering that

regedit /e regtest.tmp
"HKEY_LOCAL_MACHINE\System\CurrentControlSet\Contr ol\ComputerName"

should be on one line, run the batch as is and you'll get the *crapped out*
message. Replace *2nd_comp_name_here* with your own computer name and you'll
see it works. Whatever the batch is supposed to do on the correct machine,
you just replace *find /i "=" regtest.tmp* with the appropriate command.
It'll work whether 98/ME or NT/XP.

Actually I'm fairly sure the regedit /e would also work on NT/XP so there's
no need for a seperate section (wrong machine right now to test it. You can
certainly merge reg files using regedit /s in either kernel).

Of course, it's no good if you want to get an unknown computer name from the
registry and put it into a variable, but afaics one is supposed to know the
possible computer names in advance.

-----------------------------------

@echo off
cls
if "%OS%"=="WINDOWS_NT" goto nt_section
regedit /e regtest.tmp
"HKEY_LOCAL_MACHINE\System\CurrentControlSet\Contr ol\ComputerName"
find /i "1st_comp_name_here" regtest.tmp
if errorlevel==1 goto next1
goto action
:next1
find /i "2nd_comp_name_here" regtest.tmp
if errorlevel==1 goto last
goto action
:nt_section
If not "%ComputerName%"=="1st_comp_name_here" goto next2
goto action
:next2
If not "%ComputerName%"=="2nd_comp_name_here" goto last
goto action
:last
cls
echo.
echo Hmm, crapped out, I see!
pausenul
goto end
:action
cls
find /i "=" regtest.tmp
pausenul
:end
del *.tmp
cls
exit
cls

------------------------

Shane


  #25  
Old February 24th 05, 06:57 AM
Noel Paton
external usenet poster
 
Posts: n/a
Default

If you're feeding him chilli then he doesn't need a release fund - just a
back-blast protector!

--
Noel Paton (MS-MVP 2002-2005, Windows)

Nil Carborundum Illegitemi
http://www.btinternet.com/~winnoel/millsrpch.htm
http://tinyurl.com/6oztj

Please read http://dts-l.org/goodpost.htm on how to post messages to NG's

"heirloom" wrote in message
...
What??......no offerings for the release of Mr. Martinelli????
Heirloom, old and may have to make more chili


"David H. Lipman" wrote in message
...
Yepper -- Typo city, I meant Oy vey ;-)

--
Dave




"heirloom" wrote in message
...
| I'm in no way Yiddish, but, shouldn't that have been "oy vey?" Either

way,
| it's the shiznit! In the words of the famous Paul Harvey, "....and now

you
| know the rest of the skinny."
| Heirloom, old and something ain't quite

right.
|
| BTW, I will be holding Mr. Jack Martinelli, MS-MVP, hostage, starting

Friday
| morning. If anyone would like to contribute to his release fund...post

back
| here. g Gonna keep him on a diet of cheap Texas wine and

chili......talk
| about a pressurized cabin on his flight home!






  #26  
Old February 24th 05, 09:39 AM
Joan Archer
external usenet poster
 
Posts: n/a
Default

lol And he could probably propel himself home without the need for an
aeroplane g
Joan

Noel Paton wrote:
If you're feeding him chilli then he doesn't need a release fund - just a
back-blast protector!

  #27  
Old February 28th 05, 02:39 AM
Shane
external usenet poster
 
Posts: n/a
Default

Tried this batch on my XP Home and it didn't work as is. Apparently %OS% is
case sensitive, so it works with "Windows_NT" but not all uppercase. And I
don't have a %ComputerName% variable, I have %UserDomain%.
Appropriate changes and it works, but then the 9x method also works, so the
nt_section section is redundant.


Shane

"Shane" wrote in message
...
Here's a slightly more economical version. Remembering that

regedit /e regtest.tmp
"HKEY_LOCAL_MACHINE\System\CurrentControlSet\Contr ol\ComputerName"

should be on one line, run the batch as is and you'll get the *crapped

out*
message. Replace *2nd_comp_name_here* with your own computer name and

you'll
see it works. Whatever the batch is supposed to do on the correct machine,
you just replace *find /i "=" regtest.tmp* with the appropriate command.
It'll work whether 98/ME or NT/XP.

Actually I'm fairly sure the regedit /e would also work on NT/XP so

there's
no need for a seperate section (wrong machine right now to test it. You

can
certainly merge reg files using regedit /s in either kernel).

Of course, it's no good if you want to get an unknown computer name from

the
registry and put it into a variable, but afaics one is supposed to know

the
possible computer names in advance.

-----------------------------------

@echo off
cls
if "%OS%"=="WINDOWS_NT" goto nt_section
regedit /e regtest.tmp
"HKEY_LOCAL_MACHINE\System\CurrentControlSet\Contr ol\ComputerName"
find /i "1st_comp_name_here" regtest.tmp
if errorlevel==1 goto next1
goto action
:next1
find /i "2nd_comp_name_here" regtest.tmp
if errorlevel==1 goto last
goto action
:nt_section
If not "%ComputerName%"=="1st_comp_name_here" goto next2
goto action
:next2
If not "%ComputerName%"=="2nd_comp_name_here" goto last
goto action
:last
cls
echo.
echo Hmm, crapped out, I see!
pausenul
goto end
:action
cls
find /i "=" regtest.tmp
pausenul
:end
del *.tmp
cls
exit
cls

------------------------

Shane




 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't Restart to DOS after USB card reader installed akuma General 1 February 2nd 05 12:42 AM
Pure Dos & Computer Hang jane General 17 January 19th 05 11:28 PM
Stupid Computer / Stupid User Stupid Computer / Stupid Users General 4 July 31st 04 01:39 AM
Computer keeps turning off joefromstpete General 5 July 11th 04 09:27 PM
deleted explorer.exe Anida Software & Applications 20 June 16th 04 06:21 AM


All times are GMT +1. The time now is 08:16 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Win98banter.
The comments are property of their posters.