Jump to content

Protect U're UCD !


Recommended Posts

When i Woke Up This Morning I Was So..So..That I Didn't See U're Post with The Modifyed Code..That's Why I Said I'll Be Waiting For U...

Well Now I've Run A Test (Planing Another One, But Don't Think Is Needed ) And It Worked Perfect ..I Mean..:D I Didn't Have A Chance To Do Anything..Now I'll Try It From Winnt.sif ...

One More Thing ...How Do I Copy The Code To The First Page, I Don't Have Any Edit Butt. There..:silly: :D As u See ..New Here..But I'm NEVER Gone Leave :D

Link to comment
Share on other sites


Any chance of a little help?

I have tried numerious ways to impliment this code that Soulin wrote

'by Soulin
'31.5.2005

Option Explicit

Dim objWMIService, arrayNIC, objNIC, strMAC, strAllowedHost, arrayAllowedHosts, strYouAreWelcome
Dim strOperatingSystem, colOperatingSystems

Const wbemFlagReturnImmediately = &h10
Const wbemFlagForwardOnly = &h20
Const wmiRestartForce = 4

arrayAllowedHosts = array("00:0c:29:fb:b7:4d","00:0e:a6:b5:2a:20")

Set objWMIService = GetObject("winmgmts:\\.\root\CIMV2")
Set arrayNIC = objWMIService.ExecQuery("SELECT * FROM Win32_NetworkAdapter", "WQL", wbemFlagReturnImmediately + wbemFlagForwardOnly)

For Each objNIC In arrayNIC
For Each strAllowedHost in arrayAllowedHosts
If LCase(objNIC.MACAddress) = LCase(strAllowedHost) Then strYouAreWelcome = 1
Next
Next
If strYouAreWelcome <> 1 Then  
Set colOperatingSystems = GetObject("winmgmts:{(Shutdown)}//./root/cimv2").ExecQuery("select * from Win32_OperatingSystem where Primary=true")
MsgBox "If you like this Windows distribution, consider to ask for permission to use it! PC is now restarting"
For Each strOperatingSystem in colOperatingSystems
 strOperatingSystem.Reboot()
Next
Else
Wscript.Echo "Your installation will continue! Hope you will enjoy this Windows distribution!"
End If

I am struggling to get it to work properly. (By working properly I mean not allowing me to contiune the install once it has detected an incorrect MAC address. I have deliberately made sure that the MAC addresses are incorrect) I have tried calling

cscript //nologo restrict.vbe

in cmdlines.txt. This did not seem to work, so I created a .cmd file to call the above code. This .cmd file was then called by cmdlines.txt. This did not work either. I then called this .cmd file from RunOnceEx.cmd. This did not seem to work either, so I abandoned the whole idea of using encoded .vbs(.vbe) files. I then just called restrict.vbs from RunOnceEx.cmd and this worked fine apart from the rediculasly easy way to get round it.

So I thought that I try calling the restrict.vbs file from cmdlines.txt (My cmdlines.txt)

[COMMANDS]
"restrict.vbs"
"RunOnceEx.cmd"
"renuser.exe Administrator Admin"
"REGEDIT /S loginName.reg"
"REGEDIT /S quickLaunch.reg"

The restrict.vbs file is placed in the same folder as cmdlines.txt. This also did not work. So my question is what, if anything, I'm I doing wrong

TIA Rik :)

Link to comment
Share on other sites

Isn't this a little harsh? The person goes most of the way through the install, so their old windows is overwritten (unless they installed it elsewhere, but that's besides the point) and their computer isn't functional anymore until they can find their old windows cd or (better yet) put linux on it. Also, like dougiefresh mentioned, you need to have an operational, permanent network card installed on the machine.

I personally don't feel the need to have any protection on my cd, so maybe that's why I don't sympathize with those of you who want to disable the unsuspecting person's computer.

Besides, it'd be a hassle to get the MAC addresses anyway.

Link to comment
Share on other sites

2Achdine: I agree :) I dont use protection at all (well, I do - my installations are on network with restricted access). But some people like it as you can see...

2rikgale: You cant just use "restrict.vbs". You must use interpreter, so it will be "cscript //nologo restrict.vbs"

Link to comment
Share on other sites

There is a simple way round this if you must give out copies of your ucd change the product key to one for the person you are giving it to(which you should do anyway). Then if thay give out copies it there cd there copying not yours

Regards

Colin Bate

Link to comment
Share on other sites

2dougiefresh: are you sure it is not available through WMI classes?

Sorry about replying so late. Having some difficulties with work/life balance....

I don't know about WMI classes, never used them. Here's how I know, though: I tried getting my MAC address by first disabling my ethernet adapter within XP and tried to get MAC address through IPCONFIG. No dice. Then removed drivers for ethernet adapter and tried again. Once again, no dice. I'm going to take a guess and state in order to get MAC address, you are required to have drivers for ethernet adapter.

But, if only 2 people are supposed to have the CD/DVD and ethernet drivers exist for the hardware for those 2 computers, I guess this concern doesn't matter.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...