Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
write toast activator CLSID in shortcut
- Loading branch information
1 parent
becf1dc
commit 501ff71
Showing
13 changed files
with
113 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,19 @@ | ||
import path from 'path'; | ||
import { spawnPromise } from 'spawn-rx'; | ||
|
||
export const readAppUserModelId = async (lnkPath: string) => { | ||
const readShortcut = async (lnkPath: string) => { | ||
const lnkspector = path.join(__dirname, '../../src/utils/bin/Lnkspector.exe'); | ||
const aumid = await spawnPromise(lnkspector, ['-aumid', lnkPath]); | ||
return aumid.replace(/(\r\n|\n|\r)/gm, ''); | ||
const json = await spawnPromise(lnkspector, [lnkPath]); | ||
return JSON.parse(json); | ||
}; | ||
|
||
export const readAppUserModelId = async (lnkPath: string) => { | ||
const shortcut = await readShortcut(lnkPath); | ||
return shortcut.AppUserModelId; | ||
}; | ||
|
||
export const readToastActivatorCLSID = async (lnkPath: string) => { | ||
const shortcut = await readShortcut(lnkPath); | ||
return shortcut.ToastActivatorCLSID; | ||
// return toastActivatorClsid !== '00000000-0000-0000-000-000000000000' ? toastActivatorClsid : undefined; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export const sleep = (ms: number) => new Promise((res) => setTimeout(res, ms)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<ShortcutProperty Key="{{ShortcutPropertyKey}}" Value="{{ShortcutPropertyValue}}"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters