내 Process.Start를() 구현에 작동하지 않는 것은 윈도우 2012 R2Process.Start를()는 윈도우 2012 R2
작동하지 않습니다 내 Windows 2012 서버에 Windows 서비스를 배포했습니다. Windows 서비스에서 Process.Start (fileName)를 사용하여 하나의 일괄 처리 (.bat) 파일을 호출하려고합니다.
실행중인 서비스에서 배치 파일을 호출 할 수 없습니다.
나는 NoInteractiveServices 같은 변화가 0으로 설정하고 모든 파일 차단을 해제 ..하지만 운 ..사람이 다른 솔루션이 없습니다 만든 ??
Private Function RunTask(ByVal sPath As String, ByVal sArgs As String, ByVal fLog As Boolean) As Boolean
Dim targetProcess As Process
Try
targetProcess = Process.Start(sPath, sArgs)
Catch ex As Exception
WriteToLog("Can not start process '" + sPath + "' - " + ex.Message)
Return False
End Try
If fLog = True Then
WriteToLog("Started process '" + sPath + "' with args '" + sArgs + "'")
End If
Return True
End Function
이 배치 파일을 호출 한 후 코드 아래 코드를 계속 2012 서버 ... Process.Start를 (박쥐 파일 이름) 창에
--> net stop "Exstream Monitor"
예 .. 변경했으나 작동하지 않았습니다 –
@harshalsuryavanshi 및 서비스 프로세스에 해당 디렉토리/파일에 대한 액세스 권한이 있습니까? – OmegaMan
예. 서비스 계정은 & c : \ windows \ temp 디렉토리에서 전체 액세스 권한을가집니다. –