Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am using RunAs from a batch file to open a command prompt window using different credentials (basically the same as SHIFT+right-click and opening the command prompt as a diffierent user). Whenever I do this, it works fine but it always opens with the default colors, font, buffer, etc. I've tried issuing the RunAs command from a properly-formatted command window but it always opens a new window using Windows default fonts, colors, etc.

The command I am running is:

%windir%\System32\runas.exe /netonly /user:\ "%windir%\system32\cmd.exe"

Is is possible to globally alter the defaults used by Windows for any command prompt session?

(side note) - I also haven't been able to figure out how to launch anything but Win32 apps using RunAs (if it is possible). I've tried setting up a shortcut with the properties that I need (and using START to launch the shortcut LNK) and launching RunAs that way but I end up with the same results. And I can't open the shortcut directly with RunAs because it isn't a Win32 app.

Thanks much

share|improve this question
add comment

1 Answer 1

up vote 0 down vote accepted

With the CMD window open, are you setting its properties with "Properties"? If so, that only applies to the current window. Instead, you want (with the window open) to click on the cmd icon in the top left of the window, and choose Defaults, and set the color/size there. Then close that window & re-open cmd.exe, and the new settings should apply to all future sessions except those where you've customized the shortcut.

I also don't understand why you are using RUNAS /netonly. If you do that, it's not surprising that you can't launch anything much; that uses credentials for remote acces only.

share|improve this answer
    
I can't believe that I missed that. WOW!! –  STGdb Oct 16 '13 at 17:39
    
(sorry - ENTER cut me off - keep forgetting that about this site)... The "RunAs /netonly" gets me certain abilities while using elevated creds (especially when I try to use something like AD U&C on my local Win7 x64 box) w/Exchange Management. I've found that without using the /netonly option, some of the tools that I use won't function properly when launched via RunAs (including those launched from the command-line). I can't believe that I missed that - Default - WOW!! But you nailed it right on the head (works fine now). Thanks much Debra –  STGdb Oct 16 '13 at 17:50
    
Thanks for explaining your use of "/netonly"; I learned something out of that clarification. –  Debra Oct 16 '13 at 19:06
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.