This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
const fs = require('node:fs');
|
||||
const os = require('node:os');
|
||||
const path = require('node:path');
|
||||
const { spawnSync } = require('node:child_process');
|
||||
|
||||
const label = process.argv[2] || 'unknown';
|
||||
const guid = '08429788-303d-53b6-a4f9-894401712c7e';
|
||||
const keys = [
|
||||
`HKCU\\Software\\${guid}`,
|
||||
`HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\${guid}`,
|
||||
`HKLM\\Software\\${guid}`,
|
||||
`HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\${guid}`
|
||||
];
|
||||
const links = [
|
||||
path.join(process.env.APPDATA || '', 'Microsoft', 'Windows', 'Start Menu', 'Programs', 'Twitch VOD Manager.lnk'),
|
||||
path.join(os.homedir(), 'Desktop', 'Twitch VOD Manager.lnk')
|
||||
];
|
||||
|
||||
console.log(`=== SURFACE ${label} ===`);
|
||||
for (const key of keys) {
|
||||
const result = spawnSync('reg.exe', ['query', key], { encoding: 'utf8', windowsHide: true });
|
||||
console.log(`${key} -> ${result.status === 0 ? 'EXISTS' : 'absent'}`);
|
||||
if (result.status === 0) console.log(result.stdout.trim().split(/\r?\n/).slice(0, 8).join('\n'));
|
||||
}
|
||||
for (const link of links) {
|
||||
console.log(`${link} -> ${fs.existsSync(link) ? 'EXISTS' : 'absent'}`);
|
||||
}
|
||||
process.exit(0);
|
||||
Reference in New Issue
Block a user