I am using process class to do some processing with the files and close the process.
it works fine but the problem is it is emptying all the session value which i am assiging before running the process.
Below is the Code:
Expand|Select|Wrap|Line Numbers
- Dim myProcess As Process = New Process()
- Dim sArguments As String = sProductID & " " & Chr(34) & sLicenseFile & Chr(34) & " " & Chr(34) & sApplicationPath & "metaconfig.txt" & Chr(34)
- Dim sFileName As String = Chr(34) & sApplicationPath & "license.exe" & Chr(34)
- myProcess.StartInfo.FileName = sFileName
- myProcess.StartInfo.Arguments = sArguments
- myProcess.StartInfo.WindowStyle = ProcessWindowStyle.Hidden
- myProcess.StartInfo.CreateNoWindow = True
- myProcess.Start()
- myProcess.WaitForExit(1000)
- If Not myProcess.HasExited Then
- myProcess.Kill()
- End If
- myProcess.Close()
- myProcess = Nothing
- System.Threading.Thread.Sleep(1000)
Thanks
-John