Cmd command unrecognized in windows 8 command prompt

I'm trying to create a txt file via command line on windows 8 using the following command in the root directory (C:):
echo getmac for laptop > c:\data\laptop_mac.txt"
cmd /c "getmac >> c:\data\laptop_mac.txt"
The fist line works but the command prompt tells me following with the cmd command: 'cmd' is not recognized as an internal or external command, operable program or batch file.
As a result the file does get created but it doesn't get my mac address like it should. I should point out that the exact same commands works under windows 7 enterprise. I used the sfc/scannow command to check for corrupt files and it did find some files.
I would attach the log if I knew how to attach one. The file is very long and I don't want to post it directly in here because of that.
Also, I did run this in administrator and windows 8 is updated. Finally, I noticed that the cmd command works in the system32 folder but I really don't think I should create a txt file there.

The reason I have 3 quotation marks is because that's what my instructor wrote. What confuses the living heck out of me is the fact that the exact same command with the quotation marks works just fine in windows 7 enterprise. I'm having a hard time understand
why it doesn't work in windows 8.
We have seen discrepancies involving Enterprise versions before.  See if the cmd help could explain them:
cmd  /?
<extract  OS="W8.1 Pro">
If /C or /K is specified, then the remainder of the command line after
the switch is processed as a command line, where the following logic is
used to process quote (") characters:
    1.  If all of the following conditions are met, then quote characters
        on the command line are preserved:
        - no /S switch
        - exactly two quote characters
        - no special characters between the two quote characters,
          where special is one of: &<>()@^|
        - there are one or more whitespace characters between the
          two quote characters
        - the string between the two quote characters is the name
          of an executable file.
    2.  Otherwise, old behavior is to see if the first character is
        a quote character and if so, strip the leading character and
        remove the last quote character on the command line, preserving
        any text after the last quote character.
</extract>
I guess that might cover my escaped double-quote requirement?
Btw I tried:
cmd /c getmac >> pcmac.txt
and it failed.
What was the symptom exactly and where were you when you tried this (directory-wise)?  E.g. Now I'm wondering where that cmd.exe would be running (therefore writing).  If it is at the root or somewhere else protected you might be seeing a permissions
problem that way.  I would try running ProcMon to check on that possibility, as well as clarify exactly what that cmd.exe is doing.
Good luck
Robert
Robert Aldwinckle

Similar Messages

  • HELP FOR RUN PHOTOSHOP IN COMMAND PROMPT AND OPEN FILE

    HELLO
    i have problem for run photoshop in cmd(command prompt) and
    open a file immediate
    for example:
    D:\Program Files\Adobe\Photoshop CS>Photoshop.exe -open -f:\1.jpg
    but these not answer
    I need parameter open in photoshop
    please help me
    thanks

    I would right click on 1.jpg. Select Open with... Select Choose default program... Pick Photoshop and make sure you check "always use the selected program to open this kind of file."
    D:\1.jpg
    Would then open photoshop.

  • Windows 7 Command Prompt Message Errors (cmd.exe)

    Opening a command prompt in Windows 7 and running any command results in error messages such as the ones below (in this case a dir command):
    01/28/2010  09:06 AM    The system cannot find message text for message number 0x2373 in the message file for Application.
                                           Windows
          The system cannot find message text for message number 0x2378 in the message file for Application.
          The system cannot find message text for message number 0x2379 in the message file for Application.
    For other commands it references "System" rather than "Application" in the error message.  I've seen other posts online describing the same behavior linked to the copies of Win7 distributed at the Gartner Symposium in October as part of the general availability announcement (this is where I got my copy). 
    Any help or suggestions would be appreciated.

    Explorer has never really been able to accept drag-dropped files from multiple users very well, i.e., dragging a file from a window from a user-opened folder into an admin-opened folder.  It can be done though with a hack.  What I have been able
    to do in the past, as a workaround, is hot-login.  Hot-login is as opposed to warm-login in which is logging off Explorer and logging back in as a different user, or cold-login which is rebooting the system.  It is considered a hack by most Microsoft
    professionals though is useful.
    To hot-login, then, while logged in as a user use the Task Manager to stop the "explorer.exe" process.  This will close all Explorer windows and cause your taskbar and you desktop icons to disappear, but you will still have other applications running,
    such as your Cmd windows.  Note that due to the user's credentials on that machine, you may need to do this using PsKill (part of PsTools, now a Microsoft Product), using the admin Cmd window itself.  After doing that, immediately run explorer.exe
    from the admin Cmd window before Explorer has a chance to rerun itself (usually several seconds, though it might never come back by itself).
    Doing that should now load the taskbar and desktop back, and they may look different if you previously had them customized.  This is because Explorer is now running as admin, as if you had logged into Windows as the admin account.  But, part of
    the OS is also still running as the user, such as the server and workstation services, so you may, perhaps, be able to drag-drop files between users interchangeably, at that point.  In the least, running Explorer as admin has its enough advantages, in
    some roles (like server administration), to be useful in and of itself.
    This all may of course change after enough updates to Windows security.
    Oh -- to access the user-specific desktop icons which are now gone from the actual desktop, find its icons in the respective subfolder in the \Users\ folder on the system drive and use them from there.  It should in a \Desktop\ folder right in the respective
    user folder.  User-specific Quick Launch icons from the taskbar are probably in AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\, from the respective user folder. 
    Now again, this is a hack that I'd use as an Active Directory administrator.  It is only needed once per Windows session, usually in conjunction with an AD admin account I had, as logged in and running Cmd via RunAs.  Local administrator accounts
    function the same way with this process.  I don't expect Microsoft to officially endorse this process, so consider it from one power user to the next as the need arises.

  • Executing multiple command lines in command prompt (windows)

    Hi,
    I am currrently using the command prompt in the windows to try to send a command to the microcontroller that is connected through TCP connection.
    I am able to use the normal cmd.exe to send the command but am unable to send all the command successfully using labview. 
    The Vi. that I am using the the system exec.vi found in labview connectivity section. 
    Basically what I want to send is "telnet A1" in the cmd.exe to establish connection to the microcontroller, followed by "FOR A1 100 GO" which will be intepreted by the microcontroller to make the necessary motion. But currently, the problem is that I can only establish connection using the system exec.vi but am unable to send the second part of the message "FOR A1 100 GO". 
    My command line i tried typing is cme.exe /K telnet A1 & FOR A1 100 GO. it seems that labview is only able to execute the first command part. Is there any other alternatives? 
    Thanks everyone for your help. 
    Solved!
    Go to Solution.

    Hi,
    Thanks for the help, the picture shows 1 of the error which state Error 56, the error occurs occasionally whenever I have used the command prompt to send a message to the microcontroller.
    Alternatively, there are times when no errors occur but my microcontroller does not move as well. It does move if I were to send the command through the cmd prompt.
    And I have attached a picture of my program as well. I am currently using Labview 2010 32bit. Thanks.
    Jh
    Attachments:
    TCP Connection.jpg ‏170 KB
    Error56.png ‏222 KB
    Picomotor_App New v3.0.vi ‏38 KB

  • TDMS Defragment​-Through Windows Command Prompt

    Dear All,
    we need to Defragment the TDMS file  by TDMS Defragment.VI  via Windows Command Prompt.
    Work flow will be as below
    1.An Application wil be created to defragment using TDMS Defragment.VI
    2. When user stop Main Application (App 1) which records data for long time in tdms  ,the Main application (App 1)  will call defragmenting Application (App 2) via cmd and should get the file path and start defragmentation and it should pop a message defragmentation completed. and dont want Main Application  (App 1)  to do anything apart from triggering tdms defragmentation.
    Reason is We dont want the Main Application (App 1)  to wait for Long time till defragmentation and Since we need to use the Main Application (App 1)  for other testing.
    So we decided to do this defragmentationin in some other way  and display the completion message to user
    please provide suggestions 

    I'd also recommend doing this in one application.  If you truely want to do it from a command line you can.  LabVIEW built EXEs can support command line switches if you enable it in the build specificaitons.  If you do this you'll probably want to support multiple instances, and code it so that it will exit once the conversion is done.  But again you can get more information from the result of the defrag (like error) if you do it in the same application.
    Taki1999 wrote:
    EDIT: Asynchronously is difficult to spell
    Totally agree and some spell checks claim it isn't a word.  Same with programmatically.
    Unofficial Forum Rules and Guidelines - Hooovahh - LabVIEW Overlord
    If 10 out of 10 experts in any field say something is bad, you should probably take their opinion seriously.

  • Unable to telnet on command prompt for udp port 514, but able to on cmd for tcp port 514

    I am unable to telnet on command prompt for udp port 514. But when I use packet snifer or wireshark I am able to see traffic going to the targetted server from udp port 514. I thought it might be a firewall issue blocking the port from communicating. But
    I figured out that windows firewall is disabled. I am able to make similar connections on the cmd for tcp port 514.
    I did a netstat -an and see that udp:514 is enabled and listening on the server.
    What am I missing here?

    Telnet actually supports TCP only. You might want to try another tool as suggested here: http://serverfault.com/questions/263032/how-to-connect-to-a-udp-port-command-line
    This posting is provided AS IS with no warranties or guarantees , and confers no rights.
    Ahmed MALEK
    My Website Link
    My Linkedin Profile
    My MVP Profile

  • How to get no. of rows of Windows Command Prompt in java

    hi all,
    can anybody tell me that is there any java utility avalilable throght I can find the how many rows avalilbe on currently executing command prompt, and also how can i clear the content of command prompt (result of 'cls' command).
    Currently execting command prompt means from where I have run my java program.
    any reference is also welcome.
    thanks in advance.

    Clearing the screen is trivial, as long as you're OK with making your program specific to Windows only (i.e. you never hope to run it on any other OS ever):
    Runtime.getRuntime().exec("cmd /c cls");As to figuring out how many lines your command window's screen buffer has - good luck with that. I'm not familiar enough with the Win32 API to get this info, but you'll have to figure out what that is, and call it via JNI.

  • Manipulating Windows command prompt through Java

    I am wondering if there is any way to manipulate simple Windows command prompt commands like color, cd, dir, cls through a java application. Any help or informative redirection would be much appreciated.

    BinaryBurnout wrote:
    I am wondering if there is any way to manipulate simple Windows command prompt commands like color, cd, dir, cls through a java application. Any help or informative redirection would be much appreciated.Realize that the Windows command prompt is an application (cmd.exe), and those commands are specific to that application.

  • How to execute a scenario from Windows command prompt

    Hi,
    I have a package which is executing fine from Designer. But the same scenario if I am trying to execute from windows command prompt, then it is giving error.
    The package is getting a refresh variable, passing to interface which is creating a file from table, this file is then getting FTP'ed to another server.
    I am executing following command -
    startscen OB_TAB_TO_FILE_PKG 001 ODICTX "-v=2"
    The error is -
    A JDK is required to execute Web Services with OracleDI. You are currently using
    a JRE.
    OracleDI: Starting scenario OB_TAB_TO_FILE_PKG 001 in context ODICTX ...
    java.sql.SQLException: socket creation error
    at org.hsqldb.jdbc.jdbcUtil.sqlException(jdbcUtil.java:67)
    at org.hsqldb.jdbc.jdbcConnection.<init>(jdbcConnection.java:2451)
    at org.hsqldb.jdbcDriver.getConnection(jdbcDriver.java:188)
    at org.hsqldb.jdbcDriver.connect(jdbcDriver.java:166)
    at com.sunopsis.sql.SnpsConnection.u(SnpsConnection.java)
    at com.sunopsis.sql.SnpsConnection.c(SnpsConnection.java)
    at com.sunopsis.sql.i.run(i.java)
    DwgJv.main: Exit. Return code:-1
    Please let me know where I am going anything wrong.
    Thanks,
    Himanshu

    Hi,
    you need to make the necessary changes to the %odi%\bin\odiparams.bat config file, under the "Repository Connection Information" section so that startscen knows how to extract metadata from your repository.
    You apparently have left the default settings to the Hypersonic demo repository. Is that the technology your repository is hosted on?

  • HT201413 how do i test a port on my windows 7 computer? i followed the steps in this article, but the command prompt said that "telnet" is not a valid command.

    So I havent been able to connect to the iTunes store since June. It's getting a tad annoying. I followed all of the troubleshooting steps that i could find, and I am currently on the last one, which involves making sure that the ports that iTunes needs to function are open on my computer. I followed the article that was telling me how to do this, found my ip address, and was on the step where you actually check the port. I was told to use the command telnet, but when i did, the command prompt told me that " 'telnet' is not recognized as an internal or external command, operable program, or batch file." So, I seem to be stuck. If someone could enlighten me on how to actually check if a port is open, or how to fix error code 11222, please let me know.

    Windows 7 may need telnet installed, as mentioned in http://technet.microsoft.com/en-us/library/cc771275(v=ws.10).aspx
    I think 11222 is actually support.apple.com/kb/TS4123. Is that what you see?
    I'm guessing you have one of the programs listed there and updating it may resolve.
    Tricky bit is some software is bundled with other software - like RealPlayer Plus bundles Speedbit.
    I hope that helps.

  • When I open firefox (note: I got firefox version 28.0 and Karspersky security 2014) I get a black screen, looking like a command prompt window, in firefox.

    Hi,
    When I open firefox (note: I got firefox version 28.0 and Karspersky security 2014) I get a black screen covering the whole firefox window and it looks more lika a big command prompt window, in firefox. What is it?
    Regards
    Jean

    Huh, that's a new one...
    Can you try Firefox in [[Safe Mode | Safe Mode]] to see if the problem goes away. I'm thinking it's an extension.
    *Run ''firefox.exe -safe-mode'' in the search bar on the Start Menu. (Make sure Firefox is closed)
    Have you added any new extensions recently around the time this started happening? Your system details shows the following:
    *Adobe Acrobat - Create PDF 1.2 ([email protected])
    *Anti-Banner 14.0.0.4917 ([email protected])
    *Dangerous Websites Blocker 14.0.0.4917 ([email protected])
    *Kaspersky URL Advisor 14.0.0.4917 ([email protected])
    *Troubleshooter 1.1a ([email protected]) '''This is default so this isn't the problem.'''
    * Virtual Keyboard 14.0.0.4917 ([email protected])

  • Java code to minimize the command prompt window when we hit

    Hi All,
    I am using Command promt to convert frame maker files to pdf files... When I hit the batch file, Command prompt window is coming on to the center of the screen, customer doesnt want this one .
    Is there anyway to minimize the command prompt window like we can show up in the status bar and not on the screen .

    To get better help sooner, post a [_SSCCE_|http://mindprod.com/jgloss/sscce.html] that clearly demonstrates your problem.
    Use code tags to post codes -- [code]CODE[/code] will display asCODEOr click the CODE button and paste your code between the {code} tags that appear.
    db

  • Windows 7 Starter, System Image Failure and Error 0x80070715 results in Command Prompt

    Dear all
    Hi. My laptop CPU is 1.8 GHz, RAM 1 GB, Windows 7 Starter 32-Bit, hard drive: 30 GB for System, antivirus: Microsoft Security Essentials. Creating system image in Windows 7 does not progress in my laptop so I typed regsvr32
    /i swprv.dll in
    administrator command prompt, the result was error: 0x80070715.
     Stop/ Start VSC in Services menu, typing command SFC in adm. Command Prompt, and Clean Boot all were unsuccessful.
    Would you do me a favour about this issue, please?
    Kind regards

    I have the same issue.  
    I am following a Microsoft procedure to re-register DLLs to resolve a VSS error.   At this point, an error occurred. I did:
    > net stop vss
    > net stop swprv
    > regsvr32 ole32.dll
    > regsvr32 vss_ps.dll
    > vssvc /register
    > regsvr32 /I swprv.dll
    Error:
    The module "swprv.dll" was loaded but the call to DllRegisterServer failed with error code 0x80070715.
    For more information about this problem, search online use error code as a search term."
    Windows 7 pro 64-bit.

  • How to execute a Command Prompt command from J2SE code executing on Windows

    How to execute a Command Prompt command from J2SE code executing on Windows??
    Please help me

    [http://java.sun.com/docs/books/tutorial/getStarted/]
    ~

  • How to hide command prompt window when using system exec

    Hello, I'm using the system exec VI to do some file transfers for a LabVIEW application.  I'm worried that the black command prompt window with white scrolling text that pops up when system exec is called might frighten the non-tech savy users of this LabVIEW application.  Is there a way to hide the command prompt window?
    Solved!
    Go to Solution.

    Wire a TRUE to the Run Minimized input.
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

Maybe you are looking for

  • Can I sync 2 iPhones to one itunes account but have seperate yahoo contacts

    We have 2 iPhones and want to be able to share the same itunes account which doesn't seem to be a problem. However we can't seem to have separate yahoo contacts synced with the two separate phones. It wants to keep putting my wife's contacts on my ph

  • To get values as checked or unchecked from databse to apex checkbox

    Hi gurus apex 4 oracle 11g how to load data from database for check box if values =1 then checked and id value=0 then unchecked . can you please help me to solve this issue Sample table En0 empname pack1 pack2 pack3 pack4 1 a 1 0 0 1 2 b 0 1 0 0 3 c

  • Problems synching (heres a doozie)

    so i plug in my ipod, it synchs perfectly fine. i click the box to have it only synch checked music (after unchecking a few songs), itunes then tries to sync again only fail. end result i cant manually manage ANYTHING on my ipod. what am i doing wron

  • Handling showBusyCursor event...

    Hi everyone, it's me again... On my application I do the comunication with Java via RemoteObject and the method of the RemoteObject has the property showBusyCursor... I need that when the busyCursor is active the Application is unable... but i can't

  • Export PDF with TOC

    If I didn't miss something important, it is currently impossible to add a table of contents (TOC) to the exported PDF that will show up in the sidebar of the Preview application. IMO Pages would be a great tool for publishing manuals and other docume