Common work

[1] data compression file encryption

VBA ★ generates a random password generated bat and format commands to the clipboard, the paste notepad can be saved as .bat.

Sub rndpwd()
    Randomize (Format(Now(), "yyyymmddhhmmss"))
    comb = Split("0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z", ",")
    For i = 1 To 11
        For j = 0 To 5
            s = s & comb(Rnd() * 61)
        Next j
        k = Format(i, "00")
        If i < 11 Then
            cs = "RAR.exe a -hp" & s & " -x*610403* 61" & k & "Q1.RAR *61" & k & "* 0*"
        Else
            cs = "RAR.exe a -hp" & s & " 610403Q1.RAR *610403* 0*"
        End If
        Cells(i, 1) = cs
        cs = "": s = ""
    Next i
    UsedRange.Copy
End Sub

BAT ★ need to Rar.exe and bat files in the same directory, or use RAR.exe absolute path. Encryption, removed. Generated above the following format:

@echo off
    RAR.exe a -hpIPLmsm 6101Q2data.RAR 0* *6101*
    RAR.exe a -hpTfrT8s 6102Q2data.RAR 0* *6102*
    RAR.exe a -hpXzMbg0 6103Q2data.RAR 0* *6103*
    RAR.exe a -hpii2p4T 6105Q2data.RAR 0* *6105*
    RAR.exe a -hpn2dx3r 6106Q2data.RAR 0* *6106*
    RAR.exe a -hp18shFX 6107Q2data.RAR 0* *6107*
    RAR.exe a -hpops35X 6108Q2data.RAR 0* *6108*
    RAR.exe a -hpNjsIxG 6109Q2data.RAR 0* *6109*
    RAR.exe a -hpXwvOq8 6110Q2data.RAR 0* *6110*
    RAR.exe a -hpZ89l9P -x*610403* 6104Q2data.RAR 0* *6104*
    RAR.exe a -hpVtOB7P 610403Q2data.RAR 0* *610403*
pause

[2] laptop wireless LAN card to external networks, respectively, within the network, using the bat fast opening / closing the card.

Using both wireless and wired network card, you can delete the original default route with the route command, were added to the network of static and default routing implementation. However, in actual use, the feeling of internal and external network response speed is very slow.

route delete 0.0.0.0
route add 192.168.0.0 mask 255.255.255.0 192.168.0.254 -p
route add 0.0.0.0 mask 0.0.0.0 10.0.0.254 -p

 

@echo  OFF 
: Loop 
    echo 1. Open network
     echo 2. Open the network
     echo 3. Close the BAT 

    SET / P in = select (-by- 1/2/3) :
     CLS 
    IF "% in%" == ". 1" ( 
        WLAN the disconnect the netsh 
        the netsh interface SET interface Ethernet Enabled
     ) the else  IF "% in%" == "2" ( 
        the netsh WLAN Connect name = CHENZC 
        the netsh interface SET interface Ethernet Disabled
     ) the else  IF "% in%" == ". 3"
        (
        exit
    )else(
         Echo "Please enter 1-3!" 
    ) GOTO Loop

[3] Export questionnaire, each unique value retention value standard, and in descending order.

Sub Qsort()
    Application.ScreenUpdating = False
    s = UsedRange.Rows.Count
    For i = 1 To UsedRange.Columns.Count
        Range(Cells(1, i), Cells(s, i)).RemoveDuplicates 1, xlYes
    Next
    For i = 1 To UsedRange.Columns.Count
        Range(Cells(1, i), Cells(s, i)).Sort Cells(1, i), xlDescending
    Next
End Sub

【4】

【5】 

Guess you like

Origin www.cnblogs.com/chenxiehan/p/12588583.html