Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Command Prompt oddities

01 Sep 2010   #1
InvaderPar

Win7 Ultimate x64
 
 
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.

Name:  1.JPG
Views: 4
Size:  26.3 KBName:  3.JPG
Views: 11
Size:  27.4 KB

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'.

Name:  5.JPG
Views: 15
Size:  25.9 KB


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 System SpecsSystem Spec
.
01 Sep 2010   #2
richc46

Microsoft Community Contributor Award Recipient

Windows 10, Home Clean Install
 
 

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 System SpecsSystem Spec
01 Sep 2010   #3
InvaderPar

Win7 Ultimate x64
 
 

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 System SpecsSystem Spec
.

01 Sep 2010   #4
richc46

Microsoft Community Contributor Award Recipient

Windows 10, Home Clean Install
 
 

Well lets find out
Test it from this account
Built-in Administrator Account - Enable or Disable[2]=User Accounts
My System SpecsSystem Spec
01 Sep 2010   #5
InvaderPar

Win7 Ultimate x64
 
 

Nope. Same results.
My System SpecsSystem Spec
03 Sep 2010   #6
InvaderPar

Win7 Ultimate x64
 
 

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 System SpecsSystem Spec
03 Sep 2010   #7
cluberti

Windows 10 Pro x64
 
 

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 System SpecsSystem Spec
Reply

 Command Prompt oddities




Thread Tools




Similar help and support threads
Thread Forum
Command Prompt command <ipconfig> not working
when I open up my command prompt and type 'ipconfig' without the ' and press enter it returns the line: 'ipconfig' is nto recognized as an internal or external command, operable program, or batch file I am trying to find out the information I need in order to set up a static IP Address for port...
Network & Sharing
How to fix MBR through command prompt?
Question: What commands could I run in the command prompt during the system recovery? I try & run say "fixmbr" but it doesn't work. Say if I want to write a new master boot record how would I do that?
General Discussion
SSH command prompt
Is there any way I can use ssh or something similar to enter command line prompts from my Mac terminal, similar to SSH but windows commands? (From mac to a windows 7 desktop)
Performance & Maintenance
Run administrative command prompt from command prompt
Ok So I got myself into a unique bind here. I was trying to install some custom system files (for a theme) and I did it wrong and now I cant open explorer.exe . I dont want to goto a backup because this is a easy fix. (in my view). So I need to know how to run command prompt with administrative...
General Discussion
Command Prompt
Ok so every time I try to open the command prompt using an external source (batch file, small c++ program i made to say Hi to me through the command prompt) it instantly closes. Does anyone have any idea why this is happening and if so how can I fix it? Thanks, Wave
General Discussion
command prompt bug ?
Hi, I just tryed to use cmd as usual but it seems that I can't explore an other HDD than C: It bugs me I don't understand why i'm the only user on my computer and I am admin on it I at home so it should work but when I type "cd d:" I get that : ...
General Discussion


Our Sites

Site Links

About Us

Find 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 14:24.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App