-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.js
More file actions
49 lines (47 loc) · 1.51 KB
/
Copy pathbuild.js
File metadata and controls
49 lines (47 loc) · 1.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
var Shell = new ActiveXObject('WSCRIPT.Shell'),
child;
// NOTE install downloaded WinZip Self-Extracting archive.
WScript.Echo('Installing MSKLC...');
child = Shell.Exec('"' + Shell.currentDirectory + '\\MSKLC.exe"');
WScript.Sleep(5000);
Shell.AppActivate(child.processID);
// NOTE Setup.
Shell.SendKeys('%{S}');
WScript.Sleep(5000);
Shell.AppActivate('Microsoft Keyboard Layout Creator 1.4');
// NOTE Next.
Shell.SendKeys('%{N}');
WScript.Sleep(2000);
// NOTE I Agree, Next.
Shell.SendKeys('%{A}');
Shell.SendKeys('%{N}');
WScript.Sleep(2000);
// NOTE Next.
Shell.SendKeys('%{N}');
WScript.Sleep(2000);
// NOTE Next.
Shell.SendKeys('%{N}');
WScript.Sleep(10000);
// NOTE Close.
Shell.SendKeys('%{C}');
// NOTE open MSKLC and build the layout.
WScript.Echo('Starting MSKLC...');
child = Shell.Exec('"%PROGRAMFILES(X86)%\\Microsoft Keyboard Layout Creator 1.4\\MSKLC.exe" "' + Shell.currentDirectory + '\\kbdbl.klc"');
WScript.Sleep(5000);
Shell.AppActivate(child.processID);
// NOTE Project → Build DLL and Setup package.
Shell.SendKeys('%{P}{B}');
WScript.Echo('Validating layout...');
WScript.Sleep(10000);
// NOTE suppress log prompt.
Shell.AppActivate('Keyboard Layout Creator');
Shell.SendKeys('%{N}');
WScript.Echo('Building installers...');
WScript.Sleep(10000);
// NOTE force overwrite or accept directory prompt.
Shell.AppActivate('Keyboard Layout Creator');
Shell.SendKeys('%{D}');
Shell.SendKeys('%{Y}');
WScript.Echo('Finishing...');
WScript.Sleep(10000);
child.Terminate();