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. |
|
|
Thread Tools | Display Modes |
#21
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|
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 |