During installation,
Windows Script Host
Script: C:\Program Files (x86)\Inkscape\share\extensions\install_shortcuts.vbs
Line: 4
Char: 1
Error: Subscript out of range
Code: 800A0009
Source: Microsoft VBScript runtime error
Here is the file:
Const ForReading = 1
Const ForWriting = 2
inkscape_folder = WScript.Arguments.item(0)
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile(inkscape_folder + "\share\extensions\keys.xml", ForReading)
keys_to_add = objFile.ReadAll
objFile.Close
Set objFile = objFSO.OpenTextFile(inkscape_folder + "\share\keys\default.xml", ForReading)
existing_keys = objFile.ReadAll
objFile.Close
existing_keys = Replace(existing_keys, "</keys>", keys_to_add + "</keys>")
Set objFile = objFSO.OpenTextFile(inkscape_folder + "\share\keys\default.xml", ForWriting)
objFile.WriteLine existing_keys
objFile.Close
set script_file = objFSO.getfile(inkscape_folder + "\share\extensions\install_shortcuts.vbs")
script_file.Delete
I believe I worked it out? I edited the script for hard-coded paths. It needs to be run as an administrator or an error will occur (I ran a cmd prompt admin then cd'd there and used the script. See:
Const ForReading = 1
Const ForWriting = 2
inkscape_folder = "C:\Program Files\Inkscape"
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile("C:\Program Files (x86)\Inkscape\share\extensions\keys.xml", ForReading)
keys_to_add = objFile.ReadAll
objFile.Close
Set objFile = objFSO.OpenTextFile("C:\Program Files\Inkscape\share\keys\default.xml", ForReading)
existing_keys = objFile.ReadAll
objFile.Close
existing_keys = Replace(existing_keys, "</keys>", keys_to_add + "</keys>")
Set objFile = objFSO.OpenTextFile("C:\Program Files\Inkscape\share\keys\default.xml", ForWriting)
objFile.WriteLine existing_keys
objFile.Close
set script_file = objFSO.getfile("C:\Program Files (x86)\Inkscape\share\extensions\install_shortcuts.vbs")
script_file.Delete
Disclaimer: I am not a programmer. I know computers well and hacked these files together. It would appear to me the installation software needs to have a check for if Inkscape is installed as x86 or x64. It defaulted to 32-bit and on my system that was the cause of the error. If you have already installed or tried the above fix, use the code below as an Administrator to uninstall, then install again and manually alter the path from PFx86 to the 64-bit PF (remove " (x86)" from the install path).
For another two cents of mine, reading the initial page the author details how to use and not use the software (something about adding layers differently). I would recommend the installer finish with a readme.txt explaining the requirements if not placing it directly in the first or second step of the installer (e. g. WARNING: Using this software requires you to do X differently in InkScape). Hopefully my suggestions are appreciated. Thank you for an otherwise good solution to a problem.
Here is the uninstall:
Const ForReading = 1
Const ForWriting = 2
inkscape_folder = "C:\Program Files\Inkscape"
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile("C:\Program Files (x86)\Inkscape\share\extensions\keys.xml", ForReading)
keys_to_add = objFile.ReadAll
objFile.Close
Set objFile = objFSO.OpenTextFile("C:\Program Files\Inkscape\share\keys\default.xml", ForReading)
existing_keys = objFile.ReadAll
objFile.Close
existing_keys = Replace(existing_keys, keys_to_add, "")
Set objFile = objFSO.OpenTextFile("C:\Program Files\Inkscape\share\keys\default.xml", ForWriting)
objFile.WriteLine existing_keys
objFile.Close
set keys_file = objFSO.getfile("C:\Program Files (x86)\Inkscape\share\extensions\keys.xml")
keys_file.Delete
set script_file = objFSO.getfile("C:\Program Files (x86)\Inkscape\share\extensions\uninstall_shortcuts.vbs")
script_file.Delete