[AutoStart > Various] Remove excess logs
This commit is contained in:
parent
031d634ac9
commit
bc49d79d8b
2 changed files with 3 additions and 15 deletions
|
@ -22,13 +22,11 @@ Comment=Text and voice chat for gamers.
|
|||
X-GNOME-Autostart-enabled=true`;
|
||||
|
||||
exports.install = (callback) => {
|
||||
log('AutoStart', 'Install');
|
||||
|
||||
try {
|
||||
mkdirp.sync(dirname(desktopPath));
|
||||
return fs.writeFile(desktopPath, desktopContent, callback);
|
||||
} catch (e) {
|
||||
log('AutoStart', 'Install: error writing file', e);
|
||||
log('AutoStart', e);
|
||||
return callback(); // Callback anyway
|
||||
}
|
||||
};
|
||||
|
|
|
@ -7,22 +7,12 @@ const appName = basename(process.execPath, '.exe');
|
|||
const queuePrefix = [ 'HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Run', '/v', appName ];
|
||||
|
||||
exports.install = (callback) => {
|
||||
log('AutoStart', 'Install');
|
||||
|
||||
const execPath = join(dirname(process.execPath), '..', 'Update.exe') + ` --processStart ${basename(process.execPath)}` + (settings.get('START_MINIMIZED', false) ? ' --process-start-args --start-minimized' : ''); // Add Electron args if start minimized on
|
||||
registry.add([[ ...queuePrefix, '/d', execPath ]], callback); // Make reg
|
||||
};
|
||||
|
||||
exports.update = (callback) => {
|
||||
log('AutoStart', 'Update');
|
||||
exports.update = (callback) => exports.isInstalled(installed => installed ? exports.install(callback) : callback()); // Reinstall if installed, else just callback
|
||||
|
||||
exports.isInstalled(installed => installed ? exports.install(callback) : callback()); // Reinstall if installed, else just callback
|
||||
};
|
||||
|
||||
exports.uninstall = (callback) => {
|
||||
log('AutoStart', 'Uninstall');
|
||||
|
||||
registry.spawn([ 'delete', ...queuePrefix, '/f' ], (_error, _stdout) => callback()); // Delete reg
|
||||
};
|
||||
exports.uninstall = (callback) => registry.spawn([ 'delete', ...queuePrefix, '/f' ], (_error, _stdout) => callback()); // Delete reg
|
||||
|
||||
exports.isInstalled = (callback) => registry.spawn([ 'query', ...queuePrefix ], (_error, stdout) => callback(stdout.includes(appName))); // Check reg
|
Loading…
Reference in a new issue