강좌 / 팁

윈 도 우 backup2VHD & 토글스위치(수정)

2020.01.17 23:57

레마클로 조회:1717 추천:13

 

backup2VHD 는 드래그 앤 드롭 시 W:\backup 폴더에 복사가 실행됩니다.

backup2VHD 폴더명 변경시 폴더명에 공백이 없게 해주세요.

아니면, 수정된 Backup-W-vhd.vbs로 교체하세요.(첨부파일)

드래그 앤 드롭 시 ->  여러파일, 폴더를 한번에 드래그 해도 됩니다.

실행파일은 Backup-W-vhd.vbs

 

BitLockDrive.exe 로 W:에 암호걸면 W:\Claunch.exe가 자동실행 안됩니다. Backup-W-vhd.vbs를 "많이" 손봐야합니다.

 

 

Backup-W-vhd.vbs (수정 -> curDir2 추가)

 

스크립트 시작

 

'--------------

 

If WScript.Arguments.length =0 Then

  Set objShell = CreateObject("Shell.Application")

  objShell.ShellExecute "wscript.exe", Chr(34) & _

  WScript.ScriptFullName & Chr(34) & " uac", "", "runas", 1

Else

 

'--------------

 

On Error Resume Next

Dim objFSO, outFile, curDir

Set objShell = WScript.CreateObject("WScript.Shell")

Set objFSO = CreateObject("Scripting.FileSystemObject") 

Set outFile = objFSO.CreateTextFile(".\vhdmt.txt", True)

Set outaFile = objFSO.CreateTextFile(".\vhdmta.txt", True)

Set outdFile = objFSO.CreateTextFile(".\vhdmtd.txt", True) 

curDir = objfso.GetParentFolderName(WScript.ScriptFullName)

curDir2 =  Chr(34) & curDir & Chr(34)

 

outFile.WriteLine "select vdisk file= """ & curDir & "\backup00.vhd"""

outFile.WriteLine "attach vdisk"

outFile.WriteLine "exit"

outFile.Close

 

outaFile.WriteLine "select vdisk file= """ & curDir & "\backup00.vhd"""

outaFile.WriteLine "select partition=1"

outaFile.WriteLine "assign letter=w"

outaFile.WriteLine "exit"

outaFile.Close

 

outdFile.WriteLine "select vdisk file= """ & curDir & "\backup00.vhd"""

outdFile.WriteLine "detach vdisk"

outdFile.WriteLine "exit"

outdFile.Close

 

objShell.Run "C:\Windows\System32\diskpart.exe /s " & curDir2 & "\vhdmt.txt""", 0, True

objShell.Run "C:\Windows\System32\diskpart.exe /s " & curDir2 & "\vhdmta.txt""", 0, True

 

objFSO.DeleteFile(".\vhdmt.txt")

objFSO.DeleteFile(".\vhdmta.txt")

 

'--------------

 

if objShell.RegRead("HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\AutoCheckSelect") = 0 then

objShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\AutoCheckSelect", "1", "REG_DWORD"

objShell.Run"W:\utils\RExplore.exe", 1

else

end if

 

'--------------

 

filepath =  Chr(34) & "W:\Claunch.exe" & Chr(34)

objShell.Run filepath, , True

 

'--------------

 

msgbox "★ 백업 완료하셨나요? ★" +vbCrLf+ "" +vbCrLf+ "--- 아래 <확인>을 누르면 ," +vbCrLf+ "" +vbCrLf+ " 언마운트를 진행합니다.", &h51000, "백업용 VHD"

 

'--------------

 

if objShell.RegRead("HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\AutoCheckSelect") = 1 then

objShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\AutoCheckSelect", "0", "REG_DWORD"

objShell.Run"W:\utils\RExplore.exe", 1

else

 

end if

 

objFSO.DeleteFolder("w:\$RECYCLE.BIN"), True

objShell.Run "C:\Windows\System32\diskpart.exe /s " & curDir2 & "\vhdmtd.txt""", 0, True

objFSO.DeleteFile(".\vhdmtd.txt")

 

'--------------

 

objShell.Popup "★ <백업용 VHD> 언마운트 완료 ★★" +vbCrLf+ "" +vbCrLf+ ".....수고하셨습니다.....", 2, "백업용 VHD", 4096

 

End If

 

스크립트 끝

 

MV2.png

 

참고로 이즈백히어,데어 = 일본프로그램입니다.

최신버전이고, 영어,일어 만 설정 가능.

사용법 - 이즈백세팅.exe 실행하여 설정 후 사용합니다.

          이즈백히어,데어.exe = 드래그앤드롭 방식.....

VHD 마운트 후 숨김해제 하면 utils 폴더 안에 있습니다.

 

 

숨김해제시 사용하세요.

tgl.png

 

tgl-Hidden.vbs

--------------

 

스크립트 시작

 

Const strComputer = "."

Dim WSHShell, OBJShell, curDir, objWMIService, colProcessList

Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

Set OBJShell = CreateObject("Shell.Application") 

Set WSHShell = CreateObject("WScript.Shell")

Set fso = CreateObject("Scripting.FileSystemObject")

curDir = fso.GetParentFolderName(WScript.ScriptFullName)

strREfile = curDir & "\RExplore.exe"

If WScript.Arguments.length =0 Then

  OBJShell.ShellExecute "wscript.exe", Chr(34) & _

  WScript.ScriptFullName & Chr(34) & " uac", "", "runas", 1

else

 

Set colProcessList = objWMIService.ExecQuery("SELECT * FROM Win32_Process WHERE Name = 'Toggle.exe'")

For Each objProcess in colProcessList

 objProcess.Terminate()

Next

 

if WSHShell.RegRead("HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Hidden") = 1 then

WSHShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Hidden", 2, "REG_DWORD"

 

else

WSHShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Hidden", 1, "REG_DWORD"

 

end if

 

WSHShell.Run Chr(34) & strREfile & Chr(34), 1

 

Set WSHShell = Nothing

Set OBJShell = Nothing

Set fso = Nothing

WScript.Quit(0)

end if

 

스크립트 끝

번호 제목 글쓴이 조회 추천 등록일
[공지] 강좌 작성간 참고해주세요 gooddew - - -
900 소프트웨어| 비즈니스용 MS Office365 신규 UI적용하기 [2] 마집사 2646 6 05-27
899 소프트웨어| Windows에서 VMware를 설정하는 방법 [20] VenusGirl 2644 15 08-11
898 윈 도 우| IE 강제 실행 스크립트 + 탭 여러개 열기 [6] 녹색조각 2642 14 02-14
897 기 타| 유튜브 동영상 사진 찍기 -Chrome 확장 프로그램 [1] DaBin 2642 2 04-29
896 기 타| RSImageX 기본 파일 구성 [19] suk 2641 33 02-14
895 하드웨어| 그래픽 카드 펌웨어 복구하기 [3] gooddew 2641 8 07-11
894 소프트웨어| km플레이어 광고제거 방법 2 [2] 사나이가는 2635 1 06-24
893 모 바 일| [팁] 스마트폰 스피커 물 빼기 [1] asklee 2634 2 09-19
892 윈 도 우| [배치파일]페트야 랜섬웨어 로컬 킬스위치 [14] 흑서서 2628 8 06-28
891 윈 도 우| Windows 11 작업 표시줄을 화면 맨 위로 이동하는 방법 [4] VₑₙᵤₛG 2626 3 07-07
890 윈 도 우| PE 수정 스크립트 V3.87 [12] 히이이잌 2625 27 12-20
889 소프트웨어| 초보자도 따라만하면 되는 ThinApp 을 이용한 포터블 만들... [8] 디폴트 2624 21 12-01
888 윈 도 우| Internet Explorer 11 강제 실행 [15] 무월 2623 22 06-10
887 윈 도 우| [실사] 윈도우10,11 PIN번호 분실 암호 재설정으로 우회 로... [9] 무월 2622 11 12-07
886 소프트웨어| VirtualBox에서 macOS 설치하기 [10] VenusGirl 2618 12 01-18
885 윈 도 우| Windows 10에서 Windows 11 업데이트(업그레이드)를 차단하... [5] heykevin 2611 22 12-09
884 기 타| 갑툭튀! 고음 방지 [2] 윈폴 2610 10 07-06
883 소프트웨어| [팁] 바로가기 아이콘 관리자 권한으로 실행 설정 [6] asklee 2609 4 05-06
882 윈 도 우| winver.exe 없이 윈도우 버전보기 [6] 네트워크빌 2606 12 12-13
881 소프트웨어| Classic Shell 설정값 불러오기 [7] 히이이잌 2602 6 09-23
XE1.11.6 Layout1.4.8