By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Problem with Start /elevated

TCC 14.03.59 x64 Windows 7 [Version 6.1.7601]
TCC Build 59 Windows 7 Build 7601 Service Pack 1

I can't get the "/elevated" switch to work with the Start command and I can't figure out what I'm doing wrong.

I normally use a limited user account, and have a shortcut to TCC on my desktop. TCC has been installed in the default location. If I right click the shortcut and select "Run as Administrator" I'm prompted for the id and password of an admin user, and once entered I have a TCC window in which %_elevated returns 1.

If, however, I start a TCC window from that shortcut, and then at the prompt enter

start /runas AdminUser password /elevated /pgm "C:\Program Files\JPSoft\TCMD14x64\tcc.exe"

then a TCC opens in the context of the admin user but I'm not prompted for any user credentials and %_elevated returns 0.

Am I wrong in expecting that using /elevated should have the same effect as "Run as Administrator"? If I'm not, can anyone suggest where I'm going wrong?

/RUNAS and /ELEVATED are mutually exclusive options. And /RUNAS cannot start an elevated process, regardless of the user name you provide; so if you want an elevated process use "START /ELEVATED programname"

Ah, I see. I assumed you had to provide the user name/password as well as the /elevated switch. I've got it to work with the syntax you describe, thanks Rex.


Similar threads