Closed rbutera closed 2 years ago
I’m not sure but I don’t think you installed this under Admin?
@rbreaves I ran powershell as Administrator
@rbreaves I have no experience with virtual basic, but I think the problem is with this line:
strFolder = fso.BuildPath( path, "\.kinto\kinto.ahk"" {kbtype}")
I think kbtype
ends up as undefined/null here.
I can see that the intention is that the python script sets an environment variable to kbtype
, but how does this line interpolate the variable? Is that what the {kbtype}
syntax does?
Just tried on a fresh windows 11 install and had the same issue
I strongly suspect you are having an issue with Strawberry Perl then - according to your log it installed, but there is also indication of 2 paths of files not being found... perhaps that is a line indicating that my installer then tried to run the Strawberry Perl app to configure Kinto but failed for some reason..
...
Warnings:
- strawberryperl - strawberryperl v5.32.1.1 already installed.
Use --force to reinstall, specify a version to install, or try upgrade.
Refreshing environment variables from registry for cmd.exe. Please wait...Finished..
Copying autohotkey combinations for Terminals & Editors...
1 file(s) copied.
The system cannot find the path specified.
The system cannot find the path specified.
...
~Aka I think your Powershell terminal, for whatever reason is not putting Strawberry Perl into your binary path for it to run. I do not know why - as this has never occurred on any of my Windows 10/11 installs. Worse case scenario that I would have figured would you having some other version of Perl installed and that creating an issue, but again~ seems like it just isn't finding perl at all is what I think is happening - which would explain why things like {kbtype}
are not being replaced - can only happen if Perl did not run successfully for you.
Follow up post, yup. Fix your perl. Not sure why it wouldn't work on your install normally though or why it would do it on a fresh install for you. I dog food this constantly - I'd fix it if it was reproducible for me - but I can tell you right now that it isn't, so I assume it is unique to your setup for some reason.
Please report back on what's up with your Perl and if I can integrate a fix I will, otherwise I am closing this ticket as I do not think there is anything I can do further to help.
setup.py
...
print("Copying autohotkey combinations for Terminals & Editors...")
os.system('copy /Y "' + path + '\\windows\\kinto.ahk" "' + homedir + '\\kinto-new.ahk"')
if default < 3:
os.system('C:\\Strawberry\\perl\\bin\\perl.exe -pi -e "s/(; )(.*)(; Default)(?!( - ST2CODE))(.*)/$2$3$5/gm" ' + homedir + '\\kinto-new.ahk')
if default == 1:
kbtype = "mac"
os.system('C:\\Strawberry\\perl\\bin\\perl.exe -pi -e "s/(; )(.*)(; MacModifiers)/$2$3/gm" ' + homedir + '\\kinto-new.ahk')
elif default == 2:
kbtype = "win"
os.system('C:\\Strawberry\\perl\\bin\\perl.exe -pi -e "s/(; )(.*)(; WinModifiers)/$2$3/gm" ' + homedir + '\\kinto-new.ahk')
...
Also line 73 of same file
...
os.system('C:\\Strawberry\\perl\\bin\\perl.exe -pi -e "s/{kbtype}/' + kbtype + '/gm" "%userprofile%\\.kinto\\kinto-start.vbs"')
...
If you can't run commands like these in Powershell then your perl install needs fixing. I am sure there are likely more replacements happening than just these 2, but they're pretty big ones lol.
C:\Strawberry\perl\bin\perl.exe -pi -e "s/{kbtype}/' + kbtype + '/gm" "%userprofile%\\.kinto\\kinto-start.vbs"
C:\Strawberry\perl\bin\perl.exe -pi -e "s/(; )(.*)(; MacModifiers)/$2$3/gm" "%userprofile%\.kinto\kinto.ahk"
@rbutera I think you can try choco install strawberryperl --force
. I had the same issue, but this was because I accidentaly deleted some Strawberry Pearl files, while clearing my old files. So it was a bit incomplete and didn't properly raise an error/ wasn't able to be uninstalled using the kinto uninstall scripts.
Describe the bug Cannot install on windows 10 - getting error with
kinto.ahk
scriptExpected behavior Installation succeeds
Install Type: Powershell Distro: Windows 10 Logs and status if relevant
Screenshots![AutoHotkey_Yvfp6Uz0hy](https://user-images.githubusercontent.com/6047293/172665522-aae0550b-6435-4536-871a-ff3aec5a99f8.png)
Additional context I've tried selecting both windows keyboard and apple keyboard ( I have both)
I didn't have chocolatey or autohotkey installed prior to running the powershell script
Logs