Command Prompt oddities


  1. Posts : 22
    Win7 Ultimate x64
       #1

    Command Prompt oddities


    So I've got this Autohotkey script that I use to replace explorer.exe. I'm trying to get a command line working (instead of the standard Win+R), however I'm running into some odd problems.

    I'm an admin user, and if I run cmd from Win+R, I don't have any problems. I can run every command I can think of that exists in the System32 folder. For example, I can run 'sndvol' and 'soundrecorder' without problems.

    Command Prompt oddities-1.jpgCommand Prompt oddities-3.jpg

    However, whenever I run a command from Autohotkey (which is running as admin), or even run a command from the command prompt that was initiated from Autohotkey, some things don't seem to be recognized. For example, I can run 'sndvol' no problem, but I can't run 'soundrecorder'.

    Command Prompt oddities-5.jpg


    I did notice something though, when I run Autohotkey as admin, the command prompt inherits that and it gets "Administrator:" at the beginning of the window title. However, this isn't making a difference, because running Autohotkey not as admin produces the same results.

    So basically, the question is, what can cause the command prompt to not recognize certain commands? Is it a privilege issue? Is it an issue with those commands? What can I try?

    Very odd problem... I would greatly appreciate help.
      My Computer


  2. Posts : 17,796
    Windows 10, Home Clean Install
       #2

    When CMD is run, certain commands will be followed, regardless of the soruce. Other commands, you must right click and run as administrator.
    Any command that affects the OS, must be run as administrator.
      My Computer


  3. Posts : 22
    Win7 Ultimate x64
    Thread Starter
       #3

    It is running as admin. The title of the command prompt says "Administrator:"

    I even turned off UAC and that didn't help. (Autohotkey is already running as admin)
      My Computer


  4. Posts : 17,796
    Windows 10, Home Clean Install
       #4

    Well lets find out
    Test it from this account
    Built-in Administrator Account - Enable or Disable[2]=User Accounts
      My Computer


  5. Posts : 22
    Win7 Ultimate x64
    Thread Starter
       #5

    Nope. Same results.
      My Computer


  6. Posts : 22
    Win7 Ultimate x64
    Thread Starter
       #6

    I guess nobody's ever run into this issue before... If anyone could at least reference me to somewhere where I can learn about command prompt permissions (or anything that might be related to this issue), I'd most appreciate it.
      My Computer


  7. Posts : 2,528
    Windows 10 Pro x64
       #7

    No, sounds like a path issue - run echo %path% in a regular cmd prompt, and then again in the autohotkey cmd prompt and compare the differences. I'll bet the autohotkey's path is different - you may need to pass the full path when calling .exes under a cmd prompt run as a different user (as "run as administrator" does).
      My Computer


 

  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 18:10.
Find Us