Click here to Skip to main content
15,887,027 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to view the images from folder one by one Pin
abdussalam1433-May-13 3:15
professionalabdussalam1433-May-13 3:15 
QuestionCan't run SC remotely to config service Pin
SledgeHammer012-May-13 13:43
SledgeHammer012-May-13 13:43 
AnswerRe: Can't run SC remotely to config service Pin
Dave Kreskowiak2-May-13 15:42
mveDave Kreskowiak2-May-13 15:42 
GeneralRe: Can't run SC remotely to config service Pin
SledgeHammer012-May-13 17:39
SledgeHammer012-May-13 17:39 
GeneralRe: Can't run SC remotely to config service Pin
Dave Kreskowiak3-May-13 1:21
mveDave Kreskowiak3-May-13 1:21 
GeneralRe: Can't run SC remotely to config service Pin
SledgeHammer013-May-13 4:08
SledgeHammer013-May-13 4:08 
GeneralRe: Can't run SC remotely to config service Pin
SledgeHammer013-May-13 7:21
SledgeHammer013-May-13 7:21 
GeneralRe: Can't run SC remotely to config service Pin
Dave Kreskowiak3-May-13 7:52
mveDave Kreskowiak3-May-13 7:52 
SledgeHammer01 wrote:
I think however the cmd tests are invalid tests because


Nope. You're running a command line app and the command prompt is telling you who it's running as. If the user isn't what you expected it to be, well, that's a problem in your code, not the test. This is telling you who the SC command is running as. If that account doesn't have the appropriate permissions to the target machine to start and stop services, it's going to fail.

SledgeHammer01 wrote:
but that command prompt window can't do a lot of things


Such as?? Oh, let me remind you that that statement has absolutely nothing to do with running a command line app, like SC!!


SledgeHammer01 wrote:
I even copy and pasted it into the run as'ed command window to make sure I
didn't miss some small thing and it worked.


That command ran as YOUR account. All it does is veryify the command is correct, NOT that it's going to work under the account your code is using (you mentioned impersonation) or the Start method you're calling is using (you said you used one of the overloads that takes a username and password).

SledgeHammer01 wrote:
If I run it via the cmd /k, the window stays around, but I get an access
denied.


This is because the command prompt you launched isn't running as the user you think it is. I already told you how to find out what the command you launch with Start is running as. It's simple really. "Access denied" means the account you launched the command with doesn't have permissions to do what you want.

GeneralRe: Can't run SC remotely to config service Pin
SledgeHammer013-May-13 8:04
SledgeHammer013-May-13 8:04 
GeneralRe: Can't run SC remotely to config service Pin
Dave Kreskowiak3-May-13 8:26
mveDave Kreskowiak3-May-13 8:26 
GeneralRe: Can't run SC remotely to config service Pin
SledgeHammer013-May-13 9:40
SledgeHammer013-May-13 9:40 
GeneralRe: Can't run SC remotely to config service Pin
SledgeHammer013-May-13 11:10
SledgeHammer013-May-13 11:10 
AnswerRe: Can't run SC remotely to config service Pin
Richard MacCutchan2-May-13 21:37
mveRichard MacCutchan2-May-13 21:37 
GeneralRe: Can't run SC remotely to config service Pin
SledgeHammer013-May-13 4:02
SledgeHammer013-May-13 4:02 
GeneralRe: Can't run SC remotely to config service Pin
Richard MacCutchan3-May-13 4:22
mveRichard MacCutchan3-May-13 4:22 
AnswerRe: Can't run SC remotely to config service Pin
Alan N2-May-13 22:50
Alan N2-May-13 22:50 
GeneralRe: Can't run SC remotely to config service Pin
SledgeHammer013-May-13 4:08
SledgeHammer013-May-13 4:08 
GeneralRe: Can't run SC remotely to config service Pin
Alan N22-May-13 4:33
Alan N22-May-13 4:33 
QuestionRestoring Initial UI State Pin
Matt U.2-May-13 2:53
Matt U.2-May-13 2:53 
AnswerRe: Restoring Initial UI State Pin
Alan Balkany2-May-13 5:19
Alan Balkany2-May-13 5:19 
GeneralRe: Restoring Initial UI State Pin
Matt U.2-May-13 5:39
Matt U.2-May-13 5:39 
GeneralRe: Restoring Initial UI State Pin
Jasmine25012-May-13 7:10
Jasmine25012-May-13 7:10 
GeneralRe: Restoring Initial UI State Pin
Matt U.2-May-13 7:15
Matt U.2-May-13 7:15 
GeneralRe: Restoring Initial UI State Pin
Dave Kreskowiak2-May-13 11:06
mveDave Kreskowiak2-May-13 11:06 
GeneralRe: Restoring Initial UI State Pin
Jasmine25012-May-13 12:36
Jasmine25012-May-13 12:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.