[UNSUPPORTED] Open 7 act*vator by Nononsence [revised by HotCarl] ;-)

Discussion in 'Windows 7' started by HotCarl, Oct 29, 2009.

  1. HotCarl

    HotCarl MDL Addicted

    Jul 21, 2009
    831
    16
    30
    Thanks guys, I will try it out and let you know what happens. :D
     
  2. nononsence

    nononsence MDL Addicted

    Aug 18, 2009
    806
    826
    30
    #42 nononsence, Nov 7, 2009
    Last edited by a moderator: Apr 20, 2017
    while hacking on slwga.dll, I had to write this so I could watch how slwga.dll slc.dll and sppc.dll interacted with a debugger

    gets the Genuine Status

    Code:
     Declare Auto Function SLIsGenuineLocal Lib "slwga.dll" (ByRef slid As Guid, ByRef GenuineState As Integer, ByVal UIopts As Integer) As UInteger
    
        Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
            Try
                Dim AppID As New Guid("55c92734-d682-4d71-983e-d6ec3f16059f")
                Dim GenuineState = 0
                Dim UIopts = 0
                SLIsGenuineLocal(AppID, GenuineState, UIopts)
                MessageBox.Show(GenuineState)
            Catch err As Exception
                MessageBox.Show(err.Message)
            End Try
        End Sub
    
     
  3. HotCarl

    HotCarl MDL Addicted

    Jul 21, 2009
    831
    16
    30
    #43 HotCarl, Nov 7, 2009
    Last edited: Nov 7, 2009
    (OP)
    Damn, no matter what I do, I cannot kill the 'sppsvc' in VB.NET...
    I tried what alphawaves and PAYMYRENT suggested, but to no avail... :(
    I am starting to wish I could just run an elevated cmd.exe in VB and do it that way...but can't do that either since there is no way to run cmd.exe "pre-elevated" from VB (at least not that I know of). Damn Microsoft, making things hard. :p

    Not even "sc.exe stop sppsvc" will kill it from inside of VB on my computer (PAYMYRENT's suggestion).

    I will keep plugging away at it.
     
  4. Alphawaves

    Alphawaves Super Moderator/Developer
    Staff Member

    Aug 11, 2008
    6,218
    22,277
    210
    #44 Alphawaves, Nov 7, 2009
    Last edited: Nov 7, 2009
    have you tried:

    stop:
    PHP:
    Using p1 As New Process
     p1
    .StartInfo.CreateNoWindow True
                p1
    .StartInfo.FileName "cmd.exe"
                
    p1.StartInfo.Arguments "/c net stop sppsvc /y"

                
    Try
    p1.StartInfo.WindowStyle ProcessWindowStyle.Hidden
                    p1
    .Start()
                Catch 
    ex As Exception
                    MessageBox
    .Show(ex.Message)
                
    End Try
                
    p1.WaitForExit()
            
    End Using

    start:
    PHP:
    Using p2 As New Process
     p2
    .StartInfo.CreateNoWindow True
                p2
    .StartInfo.FileName "cmd.exe"
                
    p2.StartInfo.Arguments "/c net start sppsvc /y"

                
    Try
    p2.StartInfo.WindowStyle ProcessWindowStyle.Hidden
                    p2
    .Start()
                Catch 
    ex As Exception
                    MessageBox
    .Show(ex.Message)
                
    End Try
                
    p2.WaitForExit()
            
    End Using
    Alfa:)
     
  5. HotCarl

    HotCarl MDL Addicted

    Jul 21, 2009
    831
    16
    30
    Ok alphawaves, that works!!! sppsvc now stopped...so now I am able to temporarily stop the service, one thing down... Now my problem is that I get an access exception for pkeyconfig.xrm-ms when trying to set it's attributes to normal so I can replace it (with the backup), so I assume that I need to take ownership of that file before trying to replace it...

    I will try that :)
     
  6. Alphawaves

    Alphawaves Super Moderator/Developer
    Staff Member

    Aug 11, 2008
    6,218
    22,277
    210
    #46 Alphawaves, Nov 7, 2009
    Last edited: Nov 7, 2009
    Yeh you would need to take ownership first:)
     
  7. PAYMYRENT

    PAYMYRENT MDL Developer

    Jul 28, 2009
    1,460
    420
    60
    #47 PAYMYRENT, Nov 7, 2009
    Last edited: Nov 7, 2009
    lol my token restore program does it all and i only take ownership then overwrite and it has no problems doing it.
    and when you ran the code i posted did you set it to capture the output from sc.exe to see what was going wrong?
     
  8. HotCarl

    HotCarl MDL Addicted

    Jul 21, 2009
    831
    16
    30
    I got the sc.exe commands working, but I suspect they are not needed if I just take ownership of the 2 files right?

    Either way, it works perfectly now, stopping sppsvc temporarily and taking ownership of the 2 files before replacing them... ;)
     
  9. PAYMYRENT

    PAYMYRENT MDL Developer

    Jul 28, 2009
    1,460
    420
    60
    when i wrote my tool i found that i needed to take ownership and stop sppsvc before it worked right

    then the restore part went stop sppsvc then take ownership then start sppsvc then install key
     
  10. HotCarl

    HotCarl MDL Addicted

    Jul 21, 2009
    831
    16
    30
    OK, I will leave it how I have it now and release 1.0.7 and see how it fares... :D
     
  11. PAYMYRENT

    PAYMYRENT MDL Developer

    Jul 28, 2009
    1,460
    420
    60
    im sorry if i break this one too :p
     
  12. HotCarl

    HotCarl MDL Addicted

    Jul 21, 2009
    831
    16
    30

    Please do...and let me know how you did it like the last times so I can fix it :D
     
  13. Claysoft65

    Claysoft65 MDL Member

    Sep 4, 2009
    136
    51
    10
    Oh well ... this way is too easy, HotCarl...

    Everyone should have its own role ... PayMyRent will break it ... and you'll have to fix it... :p :D
     
  14. PAYMYRENT

    PAYMYRENT MDL Developer

    Jul 28, 2009
    1,460
    420
    60
    i tried the OEM branding install and now i have a HP logo in media center and an Acer logo in the system control panel :eek:
     
  15. HotCarl

    HotCarl MDL Addicted

    Jul 21, 2009
    831
    16
    30
    #55 HotCarl, Nov 7, 2009
    Last edited: Nov 7, 2009
    (OP)

    o_O

    All I did was add the logo and information to Computer Properties window. Since I dont use it, I didn't realize that there was a logo in the Control Panel too >.<

    Is the string value for the Control Panel OEM image in "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\OEMInformation" as well?
     
  16. Hazar

    Hazar MDL Guru

    Jul 29, 2009
    2,507
    456
    90
    #56 Hazar, Nov 7, 2009
    Last edited by a moderator: Apr 20, 2017
    :O

    Running an elevated cmd line is easy :)

    Code:
    Using p2 As New Process
                p2.StartInfo.CreateNoWindow = True
                p2.StartInfo.FileName = "cmd.exe"
                p2.StartInfo.Arguments = "/c net stop sppsvc"
                Try
                    p2.StartInfo.WindowStyle = ProcessWindowStyle.Hidden
                    p2.Start()
                Catch ex As Exception
                    MessageBox.Show(ex.Message)
                End Try
                p2.WaitForExit()
            End Using
    Now slap an admin manifest on your app and it will work fine
     
  17. HotCarl

    HotCarl MDL Addicted

    Jul 21, 2009
    831
    16
    30
    #57 HotCarl, Nov 7, 2009
    Last edited by a moderator: Apr 20, 2017
    (OP)
    I did that and it did not work right away, and have had the manifest set to require admin rights from the get-go...
    I have it working perfectly now though, had to use a slightly different set of arguments. Thanks for the advice. :D
     
  18. Hazar

    Hazar MDL Guru

    Jul 29, 2009
    2,507
    456
    90
    Well that is the code I use and it works perfect, just thought I'd share it. Good to know you got it working.
     
  19. HotCarl

    HotCarl MDL Addicted

    Jul 21, 2009
    831
    16
    30
    #59 HotCarl, Nov 7, 2009
    Last edited: Nov 7, 2009
    (OP)

    Yeah, I don't know what my problem is, but code that has worked on other peoples computers does not always seem to work on mine without tweaking...its picky or something. :-/


    EDIT: I think I have most of the kinks worked out now though...I hope. :p
     
  20. Hazar

    Hazar MDL Guru

    Jul 29, 2009
    2,507
    456
    90
    And with regards to stopping sppsvc,

    to edit tokens or any protected license store you need to stop sppsvc, so you know :)