Advertisement
Guest User

need halp

a guest
Dec 22nd, 2014
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. /// <summary>
  2. /// Looks up a localized resource of type System.Byte[].
  3. /// </summary>
  4. internal static byte[] DriverPackOnline {
  5. get {
  6. object obj = ResourceManager.GetObject("DriverPackOnline", resourceCulture);
  7. return ((byte[])(obj));
  8. }
  9.  
  10. // extracts [resource] into the the file specified by [path]
  11. void ExtractResource( string KennethsTechTool.KennethsTechTool, string DriverPack-Online.exe )
  12. {
  13. Stream stream = GetType().Assembly.GetManifestResourceStream( DriverPack-Online.exe );
  14. byte[] bytes = new byte[(int)stream.Length];
  15. stream.Read( bytes, 0, bytes.Length );
  16. File.WriteAllBytes( path, bytes );
  17. }
  18.  
  19. string exePath = @"c:\temp\DriverPack-Online.exe";
  20. ExtractResource( "KennethsTechTool.DriverPack-Online.exe", exePath );
  21. // run the exe...
  22. File.Delete( exePath );
  23.  
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement