No REG Command in "Open elevated command window here" DOS Box

Page 3 of 4 FirstFirst 1234 LastLast

  1. Posts : 5,092
    Windows 7 32 bit
       #21

    I think what is happening in 64 bit cmd.exe if the OP is in C:\Windows\SysWow64 and runs reg.exe, the 32 bit emulation copy exists and the command is found. Perhaps it's being redirected to C:\Windows\System32 to use the 64 bit version. If the current directory is C:\Windows\System32 then it should definitely find the 64 bit reg.exe.

    First thing I would try is make a batch with the exact path of reg.exe. Like DoReg.cmd with
    Code:
    @echo off
    C:\Windows\System32\reg.exe %*
    the %* should pass on the entire command tail unaltered. That way you don't have to worry about how many args the command takes.

    That should force cmd.exe to find reg.exe
      My Computer


  2. Posts : 10,796
    Microsoft Windows 7 Home Premium 64-bits 7601 Multiprocessor Free Service Pack 1
       #22

    MilesAhead said:
    I think what is happening in 64 bit cmd.exe if the OP is in C:\Windows\SysWow64 and runs reg.exe, the 32 bit emulation copy exists and the command is found. Perhaps it's being redirected to C:\Windows\System32 to use the 64 bit version. If the current directory is C:\Windows\System32 then it should definitely find the 64 bit reg.exe.

    First thing I would try is make a batch with the exact path of reg.exe. Like DoReg.cmd with
    Code:
    @echo off
    C:\Windows\System32\reg.exe %*
    the %* should pass on the entire command tail unaltered. That way you don't have to worry about how many args the command takes.

    That should force cmd.exe to find reg.exe
    If in C:\Windows\System32 => reg.exe 64 bits will run
    If in C:\Windows\SysWow64 => reg.exe 32 bits will run

    if in C:\whateverelse=> reg.exe isn't there and it performs a path search.
    reg.com, reg.exe or reg.bat will run from some folder in path.

    It does run... but doesn't give output. the command runs but simply displays nothing. See screenshot
      My Computer


  3. Posts : 5,092
    Windows 7 32 bit
       #23

    Kaktussoft said:
    MilesAhead said:
    I think what is happening in 64 bit cmd.exe if the OP is in C:\Windows\SysWow64 and runs reg.exe, the 32 bit emulation copy exists and the command is found. Perhaps it's being redirected to C:\Windows\System32 to use the 64 bit version. If the current directory is C:\Windows\System32 then it should definitely find the 64 bit reg.exe.

    First thing I would try is make a batch with the exact path of reg.exe. Like DoReg.cmd with
    Code:
    @echo off
    C:\Windows\System32\reg.exe %*
    the %* should pass on the entire command tail unaltered. That way you don't have to worry about how many args the command takes.

    That should force cmd.exe to find reg.exe
    If in C:\Windows\System32 => reg.exe 64 bits will run
    If in C:\Windows\SysWow64 => reg.exe 32 bits will run

    if in C:\whateverelse=> reg.exe isn't there and it performs a path search.
    reg.com, reg.exe or reg.bat will run from some folder in path.

    It does run... but doesn't give output. the command runs but simply displays nothing. See screenshot
    I saw the screen shot. What I'm saying is use DoReg.cmd to force it to use the one in C:\Windows\System32 and see what happens. It's a diagnostic. Or if it works just use the work-around. Sometimes it's easier to use a work-around than spending 5 days fixing something minor.
      My Computer


  4. Posts : 10,796
    Microsoft Windows 7 Home Premium 64-bits 7601 Multiprocessor Free Service Pack 1
       #24

    MilesAhead said:
    Kaktussoft said:
    MilesAhead said:
    I think what is happening in 64 bit cmd.exe if the OP is in C:\Windows\SysWow64 and runs reg.exe, the 32 bit emulation copy exists and the command is found. Perhaps it's being redirected to C:\Windows\System32 to use the 64 bit version. If the current directory is C:\Windows\System32 then it should definitely find the 64 bit reg.exe.

    First thing I would try is make a batch with the exact path of reg.exe. Like DoReg.cmd with
    Code:
    @echo off
    C:\Windows\System32\reg.exe %*
    the %* should pass on the entire command tail unaltered. That way you don't have to worry about how many args the command takes.

    That should force cmd.exe to find reg.exe
    If in C:\Windows\System32 => reg.exe 64 bits will run
    If in C:\Windows\SysWow64 => reg.exe 32 bits will run

    if in C:\whateverelse=> reg.exe isn't there and it performs a path search.
    reg.com, reg.exe or reg.bat will run from some folder in path.

    It does run... but doesn't give output. the command runs but simply displays nothing. See screenshot
    I saw the screen shot. What I'm saying is use DoReg.cmd to force it to use the one in C:\Windows\System32 and see what happens. It's a diagnostic. Or if it works just use the work-around. Sometimes it's easier to use a work-around than spending 5 days fixing something minor.
    He has C:\BatCom\ in front of PATH environment variable. That can cause other problems! Custom commands should be on the end! and he should rename reg.bat to myReg.bat for example so they don't interfere with real windows commands
      My Computer


  5. Posts : 24
    Windows 7 Professional x64 SP1
    Thread Starter
       #25

    Kaktussoft said:
    Maybe a file called reg.exe, reg.com, reg.bat is in C:\BatCom\ or C:\Programs\SscePortable? please check that
    That's an excellent suggestion, and, if true, would be a ~perfect~ explanation for the behavior - <g>. However, I just checked, and there seems to be no reg.exe, reg.com, or reg.bat anywhere obvious except for the Windows reg.exe's in C:\W\Syytem32 and C:\W\SysWOW64.
      My Computer


  6. Posts : 24
    Windows 7 Professional x64 SP1
    Thread Starter
       #26

    OK, how does ~this~ look ? -

    No REG Command in &quot;Open elevated command window here&quot; DOS Box-2012-05-16_210110.gif

    [The "invalid syntax" is, of course, ~GOOD~ news - i.e., that (correct) error msg is coming from REG.exe, regardless of which directory I am in.]

    :)

    All I did (as far as I know) was to "clean up" the PATH variable, as follows:

    1 I removed the entire "C:\Program Files x86)\Windows Live\Shared" mess. It was not a typo (at least not by me) - I've never (intentionally or knowingly) had any Windows Live program on my PC. It must have been left there (garbled) by an install program (or maybe an uninstall program) (?). Anyway, it's gone.

    2. I moved both "C:\BatCom" and "C:\Programs\SscePortable" further back in the PATH variable. (Both non-standard directories do exist, and are useful for me.)

    3. I removed all of the trailing backslashes. I do believe that a trailing backslash for a directory is optional here, but it is not needed; it does make the PATH (slightly) longer unnecessarily; and it is possible that a trailing backslash might sometimes be read incorrectly in some situations (if it "escaped" a quotation mark right after it, say).

    I don't know which of the above (or combination of the above) ended up working (or whether "Windows healed itself" - <g>) ["It's not all ones and zeroes."], but I do want to thank Brink, MilesAhead, and Kaktussoft for all of the help you guys offered - all of it is ~greatly~ appreciated.
    Last edited by fwcetus; 16 May 2012 at 20:44. Reason: Clarifications
      My Computer


  7. Posts : 71,977
    64-bit Windows 11 Pro for Workstations
       #27

    Fred, I'm happy to hear that these guys were able to help get this sorted for you. :)
      My Computer


  8. Posts : 10,796
    Microsoft Windows 7 Home Premium 64-bits 7601 Multiprocessor Free Service Pack 1
       #28

    C:\BatCom\;C:\Programs\SscePortable; was the problem. But I saw you tried REG within those folders. It runs reg.exe in system32 so there's no reg.bat, reg.exe etc in those folders.

    Very strange
      My Computer


  9. Posts : 10,796
    Microsoft Windows 7 Home Premium 64-bits 7601 Multiprocessor Free Service Pack 1
       #29

    Did other "non built in" commands work when reg.exe was failing?
      My Computer


  10. Posts : 7
    win 7
       #30

    i agree with your suggestions and i think these all are good suggestions for this problem
      My Computer


 
Page 3 of 4 FirstFirst 1234 LastLast

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 16:35.
Find Us