const ws = require('windows-shortcuts')
const wsCreate = (p, t) => (new Promise((res, rej) => {
ws.create(p, t, (error, message) => {
if (error) {
rej(error)
} else {
res(message)
}
})
}))
const run = async () => {
console.log('Start.')
try {
await wsCreate('C:\\Users\\user\\Desktop\\Git Bash.lnk', 'C:\\Program Files\\Git\\git-bash.exe')
} catch (e) {
console.log('err', e)
}
console.log('Complete.')
}
run()