Advertisement
Guest User

qtifw_reg

a guest
Jan 6th, 2015
1,379
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function Component()
  2. {
  3.  
  4.     // constructor
  5.     if (installer.isInstaller())
  6.         installer.setValue("AllUsers", true);
  7.  
  8. }
  9.  
  10. Component.prototype.isDefault = function()
  11. {
  12.     // select the component by default
  13.     return true;
  14. }
  15.  
  16. Component.prototype.createOperations = function()
  17. {
  18.     try {
  19.        
  20.         var reg = installer.environmentVariable("SystemRoot") + "\\System32\\reg.exe";
  21.         var cmd = installer.environmentVariable("SystemRoot") + "\\System32\\cmd.exe";
  22.        
  23.         var jpeg1 = "HKCR\\jpegfile\\shell\\ImgScaleMenu /v MUIVerb /t REG_SZ /d \"ImgScale\"";
  24.         var jpeg2 = "HKCR\\jpegfile\\shell\\ImgScaleMenu /v SubCommands /t REG_SZ /d \"imgscale.scale.50p;|;imgscale.scale.250;imgscale.scale.100;imgscale.scale.50\"";
  25.         var jpeg_del = "HKCR\\jpegfile\\shell\\ImgScaleMenu /f"
  26.        
  27.         var png1 = "HKCR\pngfile\shell\ImgScaleMenu /v MUIVerb /t REG_SZ /d \"ImgScale\"";
  28.         var png2 = "HKCR\\pngfile\\shell\\ImgScaleMenu /v SubCommands /t REG_SZ /d \"imgscale.scale.50p;|;imgscale.scale.250;imgscale.scale.100;imgscale.scale.50\"";
  29.         var png_del = "HKCR\\pngfile\\shell\\ImgScaleMenu /f"
  30.        
  31.         component.addOperation("Execute", cmd, "/C", jpeg1, "UNDOEXECUTE", "cmd", "/C", jpeg_del);
  32.         component.addOperation("Execute", cmd, "/C", jpeg2);
  33.        
  34.         component.addOperation("Execute", cmd, "/C", png1, "UNDOEXECUTE", "cmd", "/C", png_del);
  35.         component.addOperation("Execute", cmd, "/C", png2);
  36.  
  37.     } catch (e) {
  38.         print(e);
  39.     }
  40.    
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement