Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function Component()
- {
- // constructor
- if (installer.isInstaller())
- installer.setValue("AllUsers", true);
- }
- Component.prototype.isDefault = function()
- {
- // select the component by default
- return true;
- }
- Component.prototype.createOperations = function()
- {
- try {
- var reg = installer.environmentVariable("SystemRoot") + "\\System32\\reg.exe";
- var cmd = installer.environmentVariable("SystemRoot") + "\\System32\\cmd.exe";
- var jpeg1 = "HKCR\\jpegfile\\shell\\ImgScaleMenu /v MUIVerb /t REG_SZ /d \"ImgScale\"";
- var jpeg2 = "HKCR\\jpegfile\\shell\\ImgScaleMenu /v SubCommands /t REG_SZ /d \"imgscale.scale.50p;|;imgscale.scale.250;imgscale.scale.100;imgscale.scale.50\"";
- var jpeg_del = "HKCR\\jpegfile\\shell\\ImgScaleMenu /f"
- var png1 = "HKCR\pngfile\shell\ImgScaleMenu /v MUIVerb /t REG_SZ /d \"ImgScale\"";
- var png2 = "HKCR\\pngfile\\shell\\ImgScaleMenu /v SubCommands /t REG_SZ /d \"imgscale.scale.50p;|;imgscale.scale.250;imgscale.scale.100;imgscale.scale.50\"";
- var png_del = "HKCR\\pngfile\\shell\\ImgScaleMenu /f"
- component.addOperation("Execute", cmd, "/C", jpeg1, "UNDOEXECUTE", "cmd", "/C", jpeg_del);
- component.addOperation("Execute", cmd, "/C", jpeg2);
- component.addOperation("Execute", cmd, "/C", png1, "UNDOEXECUTE", "cmd", "/C", png_del);
- component.addOperation("Execute", cmd, "/C", png2);
- } catch (e) {
- print(e);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement