awilliams17

Untitled

Sep 17th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.93 KB | None | 0 0
  1.         public string UnpackPakFile(string SteamPath, string OutputPath, string PakFilePath)
  2.         {
  3.             Dictionary<string, string> operationResults = new Dictionary<string, string>();
  4.             string assetUnpackerPath = TryGetAssetUnpackerPath(SteamPath);
  5.             string[] assetUnpackerArgs = new string[2] { $"\"{PakFilePath}\"", $"\"{OutputPath}\"" };
  6.  
  7.             _assetUnpackerProcess.StartInfo = new ProcessStartInfo
  8.             {
  9.                 FileName = assetUnpackerPath,
  10.                 UseShellExecute = false,
  11.                 Arguments = $"{assetUnpackerArgs[0]} {assetUnpackerArgs[1]}",
  12.                 RedirectStandardOutput = true,
  13.                 CreateNoWindow = true
  14.             };
  15.            
  16.             _assetUnpackerProcess.Start();
  17.             string output = _assetUnpackerProcess.StandardOutput.ReadToEnd();
  18.             _assetUnpackerProcess.WaitForExit();
  19.  
  20.             return output;
  21.         }
Advertisement
Add Comment
Please, Sign In to add comment