beatcracker / VSCELicense

PowerShell module to get and set Visual Studio Community Edition license expiration date in registry
Microsoft Public License
306 stars 94 forks source link

VS 2022 support #14

Open Farb opened 3 years ago

Farb commented 3 years ago

Visual Studio 2022 preview version has been released ,please support 2022.BTW ,2022 is a amazing

Sent from PPHub

beatcracker commented 3 years ago

Hi there! Usually I don't spend time on adding preview versions (https://github.com/beatcracker/VSCELicense/issues/1#issuecomment-462747072). But if it's really amazing I might give it a try ;). No promises though.

navrozashvili commented 3 years ago

enterprise 2022 pre release registry key is Licenses\10D17DBA-761D-4CD8-A627-984E75A58700\09360 . It can be found using Sysinternals. Even tho adding days works even by just replacing 2019 key in https://github.com/l3afblow3r/VSEELicense it wont add more than 15 days. better than nothing.

https://github.com/navrozashvili/VSEELicense

beatcracker commented 3 years ago

I've pushed vs2022 branch which supports VS CE 2022 Preview. But as @navrozashvili mentioned, VS will only give you 15 days when you reset date in registry. I guess it's a preview limitation.

As soon as VS 2022 is finally released, I'll remove this branch and merge final 2022 support to the master.

Farb commented 3 years ago

I've pushed vs2022 branch which supports VS CE 2022 Preview. But as @navrozashvili mentioned, VS will only give you 15 days when you reset date in registry. I guess it's a preview limitation.

As soon as VS 2022 is finally released, I'll remove this branch and merge final 2022 support to the master.

Does it work for you? Why doesn't it work for meπŸ˜ͺ

navrozashvili commented 3 years ago

I've pushed vs2022 branch which supports VS CE 2022 Preview. But as @navrozashvili mentioned, VS will only give you 15 days when you reset date in registry. I guess it's a preview limitation. As soon as VS 2022 is finally released, I'll remove this branch and merge final 2022 support to the master.

Does it work for you? Why doesn't it work for meπŸ˜ͺ

New key: Licenses\10D17DBA-761D-4CD8-A627-984E75A58700\09460 but it wont add more than 7 days

Farb commented 3 years ago

@beatcracker Where is the new key?There's not the new key you gave in my registry . AE8494A3-8134-4C44-BFA8-3699604DBE03

Farb commented 3 years ago

@beatcracker @navrozashvili I have upgraded the vs2022 to 17.0.0 Preview 3.1,and I found the new key is 09478,then I modified the .psm1 file for the new key.Finally ,I ran my AddDays.ps1 scripts and printed Success string and vs2022 expire date is right .But it still shows "Your trial has expired " page .What reason?

F79D6ED4-AF24-4B5A-87BE-30E937BCA7BC 9FE825E7-3EBF-43AC-93D0-589D469759DF FA6201AA-793E-4C33-A605-9C4B0E4DFAAC

navrozashvili commented 3 years ago

@beatcracker @navrozashvili I have upgraded the vs2022 to 17.0.0 Preview 3.1,and I found the new key is 09478,then I modified the .psm1 file for the new key.Finally ,I ran my AddDays.ps1 scripts and printed Success string and vs2022 expire date is right .But it still shows "Your trial has expired " page .What reason?

F79D6ED4-AF24-4B5A-87BE-30E937BCA7BC 9FE825E7-3EBF-43AC-93D0-589D469759DF FA6201AA-793E-4C33-A605-9C4B0E4DFAAC

Once it expires I believe some registry key is set in a private hive and changing that license key has no effect.

Farb commented 3 years ago

@navrozashvili so,there's no way to solve it,right?πŸ˜‚

navrozashvili commented 3 years ago

@navrozashvili so,there's no way to solve it,right?πŸ˜‚

1) reinstall vs 2) mess with their hive(I really suggest against it, I ended up overwriting my HKCU and bricking my windows user last time I did itπŸ˜‚)

Farb commented 3 years ago

@navrozashvili Maybe I should give up .Because I have reinstalled it for several times .It didn't work. πŸ˜”

Farb commented 3 years ago

@navrozashvili Finally ,I solved the problem by offline registration πŸ€“The link is https://blog.csdn.net/songfuliang2011/article/details/102486451 . 8D9A399A-A5C2-4C4F-A531-580A05CBD066

undergroundwires commented 3 years ago

The new registry key seems to be B16F0CF0-8AD1-4A5B-87BC-CB0DBE9C48FC and subkey is 09560. I have preview 4.1. I could set the expiration date when I changed the keys but still get "Your trial has expired"

@Farb the link is dead, would you like to share how you solved it on your hand?

Farb commented 3 years ago

The new registry key seems to be B16F0CF0-8AD1-4A5B-87BC-CB0DBE9C48FC and subkey is 09560. I have preview 4.1. I could set the expiration date when I changed the keys but still get "Your trial has expired"

@Farb the link is dead, would you like to share how you solved it on your hand?

The link is available. But the article language is Chinese, maybe you should translate the page. The essential is copying license metadata from a computer that you can login to another computer that you cannot login.

ednt commented 2 years ago

I just installed the official VSCE 2022 and I found the key 1299B4B9-DFCC-476D-98F0-F65A2B46C96D If I try 09678 I get 255,255,255,255,255 as date value, which is wrong.

beatcracker commented 2 years ago

Yep folks, gotta have a look at this as soon as I get a free minute.

beatcracker commented 2 years ago

Well, it looks like VS 2022 doesn't have any limits at all. I've installed it and moved clock to the year 2022 and back - no issues. And the license text says Product key applied instead of 30 days trial (evaluation period) :partying_face:

image

lorisleitner commented 2 years ago

The new key is 1299B4B9-DFCC-476D-98F0-F65A2B46C96D\09660

Works for my VS22 Enterprise

nasusonetrick commented 2 years ago

is it possible to increase Expiration of years instead of just days ?

beatcracker commented 2 years ago

@nasusonetrick I don't thinks so: looks like the limit is built-in into the VS expiration date checking code. It ignores anything larger then 31 days.