function Component() { } Component.prototype.createOperations = function() { try { // call the base create operations function component.createOperations(); if (installer.value("os") == "win") { try { var userProfile = installer.environmentVariable("USERPROFILE"); installer.setValue("UserProfile", userProfile); component.addOperation("CreateShortcut", "@TargetDir@\\PA_Calculator.exe", "@UserProfile@\\Desktop\\PA Calculator.lnk"); } catch (e) { // Do nothing if key doesn't exist } } } catch (e) { print(e); } }