BlueMe Posted June 1, 2005 Author Share Posted June 1, 2005 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.. 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: As u See ..New Here..But I'm NEVER Gone Leave Link to comment Share on other sites More sharing options...
Martin Zugec Posted June 1, 2005 Share Posted June 1, 2005 2BlueMe: Maybe it should be request for administrator/moderator here... 2Brandon: You can try it Link to comment Share on other sites More sharing options...
rikgale Posted June 1, 2005 Share Posted June 1, 2005 Any chance of a little help?I have tried numerious ways to impliment this code that Soulin wrote'by Soulin'31.5.2005Option ExplicitDim objWMIService, arrayNIC, objNIC, strMAC, strAllowedHost, arrayAllowedHosts, strYouAreWelcomeDim strOperatingSystem, colOperatingSystemsConst wbemFlagReturnImmediately = &h10Const wbemFlagForwardOnly = &h20Const 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 arrayNICFor Each strAllowedHost in arrayAllowedHosts If LCase(objNIC.MACAddress) = LCase(strAllowedHost) Then strYouAreWelcome = 1Next NextIf 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()NextElse Wscript.Echo "Your installation will continue! Hope you will enjoy this Windows distribution!" End IfI 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.vbein 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 wrongTIA Rik Link to comment Share on other sites More sharing options...
Achdine Posted June 1, 2005 Share Posted June 1, 2005 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 More sharing options...
Martin Zugec Posted June 2, 2005 Share Posted June 2, 2005 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 More sharing options...
colinbate Posted June 2, 2005 Share Posted June 2, 2005 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 yoursRegardsColin Bate Link to comment Share on other sites More sharing options...
Martin Zugec Posted June 2, 2005 Share Posted June 2, 2005 It is not ment as professional protection, just protection against common users... Link to comment Share on other sites More sharing options...
rikgale Posted June 2, 2005 Share Posted June 2, 2005 Thanx Soulin I'll give it a try again when I get home. Link to comment Share on other sites More sharing options...
rikgale Posted June 3, 2005 Share Posted June 3, 2005 (edited) Sadly still didn't work. Gonna give up on this idea for a while and come back to it at a later date. Edited June 4, 2005 by rikgale Link to comment Share on other sites More sharing options...
HyperHacker Posted June 4, 2005 Share Posted June 4, 2005 Hehe. Nice trick with deleting ntldr. One thing nobody's mentioned though: Run 'shutdown -r -t 60'. Now run 'shutdown -a'. Your computer doesn't shut down! Link to comment Share on other sites More sharing options...
dougiefresh Posted June 5, 2005 Share Posted June 5, 2005 2dougiefresh: are you sure it is not available through WMI classes?<{POST_SNAPBACK}>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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now