{"action":"created","issue":{"url":"https://api.github.com/repos/scriptcs/scriptcs/issues/1035","labels_url":"https://api.github.com/repos/scriptcs/scriptcs/issues/1035/labels{/name}","comments_url":"https://api.github.com/repos/scriptcs/scriptcs/issues/1035/comments","events_url":"https://api.github.com/repos/scriptcs/scriptcs/issues/1035/events","html_url":"https://github.com/scriptcs/scriptcs/issues/1035","id":73585595,"number":1035,"title":"Create OS script file association in chocolatey package","user":{"login":"vvolkgang","id":542036,"avatar_url":"https://avatars.githubusercontent.com/u/542036?v=3","gravatar_id":"","url":"https://api.github.com/users/vvolkgang","html_url":"https://github.com/vvolkgang","followers_url":"https://api.github.com/users/vvolkgang/followers","following_url":"https://api.github.com/users/vvolkgang/following{/other_user}","gists_url":"https://api.github.com/users/vvolkgang/gists{/gist_id}","starred_url":"https://api.github.com/users/vvolkgang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vvolkgang/subscriptions","organizations_url":"https://api.github.com/users/vvolkgang/orgs","repos_url":"https://api.github.com/users/vvolkgang/repos","events_url":"https://api.github.com/users/vvolkgang/events{/privacy}","received_events_url":"https://api.github.com/users/vvolkgang/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/scriptcs/scriptcs/labels/feature","name":"feature","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-05-06T10:35:43Z","updated_at":"2015-05-06T11:16:17Z","closed_at":null,"body":"Hi,\r\n\r\nThe cmdline workflow can be improved by associating .csx files to scriptcs.exe, enabling devs to run scripts with:\r\n\r\n`> FooScript.csx`\r\n\r\nInstead of:\r\n`> scriptcs FooScript.csx`\r\n\r\nIn Windows this can be done with the following cmd lines:\r\n```\r\n> Assoc .csx=scriptcsfile\r\n> Ftype scriptcsfile=\"C:\\ProgramData\\chocolatey\\bin\\scriptcs.exe\" \"%1\" %*\r\n```\r\n\r\nUninstalling scriptcs should then clear this association."},"comment":{"url":"https://api.github.com/repos/scriptcs/scriptcs/issues/comments/99420766","html_url":"https://github.com/scriptcs/scriptcs/issues/1035#issuecomment-99420766","issue_url":"https://api.github.com/repos/scriptcs/scriptcs/issues/1035","id":99420766,"user":{"login":"paulbouwer","id":318622,"avatar_url":"https://avatars.githubusercontent.com/u/318622?v=3","gravatar_id":"","url":"https://api.github.com/users/paulbouwer","html_url":"https://github.com/paulbouwer","followers_url":"https://api.github.com/users/paulbouwer/followers","following_url":"https://api.github.com/users/paulbouwer/following{/other_user}","gists_url":"https://api.github.com/users/paulbouwer/gists{/gist_id}","starred_url":"https://api.github.com/users/paulbouwer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulbouwer/subscriptions","organizations_url":"https://api.github.com/users/paulbouwer/orgs","repos_url":"https://api.github.com/users/paulbouwer/repos","events_url":"https://api.github.com/users/paulbouwer/events{/privacy}","received_events_url":"https://api.github.com/users/paulbouwer/received_events","type":"User","site_admin":false},"created_at":"2015-05-06T11:16:17Z","updated_at":"2015-05-06T11:16:17Z","body":"I really like this too! \r\n\r\nI think this is already covered in the `OSX` And `Linux` scenario with the shebang support added in #956 and #970.\r\n\r\nFor the `Windows` scenario it would be great if the `ftype` command did not use the full path or used a similar concept concept to `/usr/bin/env` ([shebang - Why is #!/usr/bin/env bash superior to #!/bin/bash?](http://stackoverflow.com/questions/21612980/why-is-usr-bin-env-bash-superior-to-bin-bash)). This would enable supporting multiple providers of the `scriptcs` binary - so currently either `chocolatey` or `svm`. Whichever `scriptcs` binary is found first in the path will be used. The 2 lines are a global setting and so need to play nice with all providers.\r\n\r\nShould the 2 `cmd` lines be included as part of the standard `scriptcs` repo/install to ensure consistent approach? The `binstub` for shebang support is included in the repo.\r\n\r\nThen various installers can execute the 'batch` file to make the association."}}