Uhm... Whiskey Tango Foxtrot.
The open with menu is not a context menu, this is a file association thing. A context menu entry would look like "open in Visual Studio Code".
Your linkfolder entry is also not correct. Don't forget the ""-signs, at least.
Let's start with the last thing. For a shortcut, you need to set the parameters of the shortcut. Don't forget to declare $InstallDir64$.
Code: Alles auswählen
[LinkFolder_install]
set_basefolder common_programs
set_subfolder ""
set_link
name: "Visual Studio Code (open vbs file)"
target: "$InstallDir64$\Code.exe"
parameters: : "$InstallDir64$\script\min.vbs"
working_dir: "$InstallDir64$"
icon_file: "$InstallDir64$\Code.exe"
icon_index: 0
end_link
To associate files with visual studio code you need to do something different. To do it machine wide:
Code: Alles auswählen
[Registry_install]
openkey [HKEY_LOCAL_MACHINE\Software\Classes\.vbs]
set "" = "Visual Studio Code Editor"
openkey [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Visual Studio Code Editor]
set "" = "Visual Studio Code Editor"
openkey [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Visual Studio Code Editor\DefaultIcon]
set "" = '"$InstallDir64$\Code.exe"",1'
openkey [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Visual Studio Code Editor\shell]
set "" = "open"
openkey [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Visual Studio Code Editor\shell\open\command]
set "" = '"$InstallDir64$\Code.exe" "%1"'
But you should find a file that is already associated with visual studio code editor, then you only have to set it like this:
Code: Alles auswählen
[Registry_install]
openkey [HKEY_LOCAL_MACHINE\Software\Classes\.vbs]
set "" = "Name in hklm software classes that is already associated with Visual Studio Code Editor"
Adding a context menu, so that when you right click on a .vbs file, it shows "edit with visual studio code editor" you will have to add something like this. (I can't be bloody arsed to convert this)
Code: Alles auswählen
openkey [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\icofile\shell\Edit with GIMP]
set "" = "Edit with GIMP"
openkey [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\icofile\shell\Edit with GIMP\command]
set "" = '"$InstallDir64$\bin\gimp-2.10.exe" "%1"'
Or so was it for windows 7. Have to test if that has changed. But anyway, machine wide file associations should still work like this. Per user is a shitshow.