Powershell Activator

Discussion in 'Windows 7' started by Mr Jinje, Sep 5, 2009.

  1. Mr Jinje

    Mr Jinje MDL Expert

    Aug 19, 2009
    1,770
    1,101
    60
    #1 Mr Jinje, Sep 5, 2009
    Last edited by a moderator: May 23, 2017
  2. Hazar

    Hazar MDL Guru

    Jul 29, 2009
    2,507
    456
    90
    cool stuff Jinjie

    Pointless, but cool :cool:

    :p
     
  3. Mr Jinje

    Mr Jinje MDL Expert

    Aug 19, 2009
    1,770
    1,101
    60
    I doubt 1% of the readers even heard of powershell, or realize it's already installed on their machines.
     
  4. Hazar

    Hazar MDL Guru

    Jul 29, 2009
    2,507
    456
    90
    I use powershell sometimes, its really quite powerful and can do maths and logic etc.
     
  5. Mr Jinje

    Mr Jinje MDL Expert

    Aug 19, 2009
    1,770
    1,101
    60
    #5 Mr Jinje, Sep 5, 2009
    Last edited by a moderator: Apr 20, 2017
    (OP)
  6. Phazor

    Phazor MDL Expert

    Sep 1, 2009
    1,144
    518
    60
    #6 Phazor, Sep 5, 2009
    Last edited by a moderator: Apr 20, 2017
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. Mr Jinje

    Mr Jinje MDL Expert

    Aug 19, 2009
    1,770
    1,101
    60
    #7 Mr Jinje, Sep 5, 2009
    Last edited by a moderator: Apr 20, 2017
    (OP)
  8. Mr Jinje

    Mr Jinje MDL Expert

    Aug 19, 2009
    1,770
    1,101
    60
    Don't see why you couldn't. Powershell can runs about 99% of all batch commands so might be easy for you.
     
  9. Phazor

    Phazor MDL Expert

    Sep 1, 2009
    1,144
    518
    60
    I must say i like this method. I really do.

    Its even more straightforward than nononsenses script, (and way more than that of Untermensch), and the shorter the better because shorter code is much easier to adapt and debug. (Obviously.)

    Would you mind my using it in a private project of mine? Not that the other two methods werent efficient, on the contrary, after a little tweaking it functioned perfectly with both of them. (Although its way faster with nononsenses.) Its just that i would prefer to use the simplest code possible, and since this method only needs a couple of lines to carry out all the tasks it would be perfect for my purposes, especially since i dont need any visual output. (Its installer-based, so i already have a progressbar, etc.)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  10. Hazar

    Hazar MDL Guru

    Jul 29, 2009
    2,507
    456
    90
    I doubt it. They code very differently.
     
  11. Phazor

    Phazor MDL Expert

    Sep 1, 2009
    1,144
    518
    60
    #11 Phazor, Sep 5, 2009
    Last edited: Sep 5, 2009
    Thanks man, appreciated.

    In that case i have 3 Questions:

    Since the installer prompts for a reboot itself, what lines do i remove? Only the last one or the two last ones?

    Then i saw that the temporary drive letter is hardcoded to R. Could that be randomized so that it chooses some other letter in case R is already in use?

    And last but not least, could you provide a PS script for the uninstall too? It only needs to delete the GRUBLoader, run the bootsect, and then reset the key to trial and the cert to retail. That would be real great because i just realized that i cant compile a working package unless i have whats needed for the uninstall part too... :/
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  12. Mr Jinje

    Mr Jinje MDL Expert

    Aug 19, 2009
    1,770
    1,101
    60
    #12 Mr Jinje, Sep 5, 2009
    Last edited by a moderator: May 23, 2017
    (OP)
  13. Mr Jinje

    Mr Jinje MDL Expert

    Aug 19, 2009
    1,770
    1,101
    60
    #13 Mr Jinje, Sep 5, 2009
    Last edited by a moderator: May 23, 2017
    (OP)
  14. Phazor

    Phazor MDL Expert

    Sep 1, 2009
    1,144
    518
    60
    So what about the other method then, its dead now or would you make an uninstaller for it?

    I mean the bootmgr method is genious, no doubt about that, but IMO its not as long-term proof since MS can simply replace it with a clean copy when the user installs any updates...
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  15. Mr Jinje

    Mr Jinje MDL Expert

    Aug 19, 2009
    1,770
    1,101
    60
    #15 Mr Jinje, Sep 6, 2009
    Last edited: Sep 6, 2009
    (OP)
    GRLDR is DEAD

    Tell you what, you post the uninstall commands you want me to use, I'll see what I can do.


    Even if they update bootmgr in an update, since I don't change the bootsector, the new bootmgr will load without SLIC (oh no my computer says not genuine), and after that update happens, who is to say SLIC cannot be re-inserted into new version of bootmgr. Can't Fix What Isn't Broke Yet Just be glad for what you got.
     
  16. Phazor

    Phazor MDL Expert

    Sep 1, 2009
    1,144
    518
    60
    To quote myself:
    I would do it myself but i have zero experience with powershell...
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  17. snoopybox

    snoopybox MDL Novice

    May 20, 2009
    6
    0
    0
    #17 snoopybox, Sep 6, 2009
    Last edited: Sep 6, 2009
    It looks great!!
     
  18. Mr Jinje

    Mr Jinje MDL Expert

    Aug 19, 2009
    1,770
    1,101
    60
    #18 Mr Jinje, Sep 7, 2009
    Last edited: Sep 7, 2009
    (OP)
    You misread my intent, I meant for you to give me the actual batch commands and trial key you wanted me to use, so that I do not have to waste hours of my time searching for something that only you want. I'm fine if you want to turn this in for school credit (what other type of software projects are there ?). But for that to happen you gonna have to do some of the leg work.

    Besides. I'm sure that the 2-3 people actually interested in this have already plugged it into their VM, loaded it once, said "Cool", and promptly forgot they ever saw it. :cool:

    Nice script DarkFall
     
  19. Phazor

    Phazor MDL Expert

    Sep 1, 2009
    1,144
    518
    60
    Erm, obviously you must have misread my intent.

    I said 'private' simply because the emulator in my package is supposed to be unique to my project, so that in case i am ever going to use it (which is not certain at all because i have enough other means to explore) i know that i am the only one who uses this particular file. But of course that didnt mean that i hadnt sent you a copy for your efforts anyway; i know what gratefulness and decency means, so private or not the least youd have gotten in return for writing a custom powershell script specially for me is a package that included the normal grldr everyone uses, or, if you preferred that, a customized one specially for you.

    So no 'school credit' projects here, im 40 years old and out of school for quite a long time. But its O.K., really it is, luckily its not like my life depended on it so i will live with or without it. Its entirely up to you...
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  20. Mr Jinje

    Mr Jinje MDL Expert

    Aug 19, 2009
    1,770
    1,101
    60
    #20 Mr Jinje, Sep 7, 2009
    Last edited by a moderator: Apr 20, 2017
    (OP)
    Phazor test this uninstall. Don't forget add trial key in right place.

    Code:
    
    Get-WmiObject -class Win32_Volume | where-object {$_.SystemVolume -eq "True"} | where-object {$_.DriveLetter -Like ""}  | foreach-object -process {$_.AddMountPoint("R:")}
    
    Start-Sleep 1
    
    $SYS = Get-WmiObject -class Win32_Volume | where-object {$_.SystemVolume -eq "True"} | Select-Object DriveLetter
    
    $SYS = $SYS.DriveLetter
    
    Rename-Item -path $SYS\grldr -newname grldr.bak
    
    .\bootsect.exe /nt60 $SYS 
    
    $KEY = ""
    
    Get-WmiObject -class SoftwareLicensingService | where-object {$_.Version -eq "6.1.7600.16385"} | foreach-object -process {$_.InstallProductKey($KEY)}
    
    If ($SYS -eq "R:") {mountvol R: /D}