강좌 / 팁

윈 도 우 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 - - -
4321 모 바 일| 스마트폰의 Mobile PowerDirector강좌 목록 murimgasa 1076 1 12-01
4320 소프트웨어| UNetbootin (Universal Netboot Installer) 범용 Netboot ... [3] VenusGirl 1079 6 06-11
4319 윈 도 우| 윈10 화면보호기 설정하는 2가지 방법 ( 배치파일로 설정... 코요88 1082 3 02-07
4318 윈 도 우| Windows 11의 Microsoft 스토어에서 앱 다운로드 중지를 해... VᴇɴᴜꜱGɪ 1082 4 06-13
4317 소프트웨어| ESD 다중 이미지 단일 WIM 이미지 추출 방법! [12] 무월 1087 30 08-09
4316 소프트웨어| Adobe Premiere에서 스마트폰용 동영상 제작하는 방법 강좌 murimgasa 1090 0 08-23
4315 소프트웨어| pureBasic Glass 윈도우 및 버튼 021 [6] 입니다 1091 14 04-20
4314 소프트웨어| [Tip] 윈도우용 PuTTY 설정 백업 [3] asklee 1092 2 03-28
4313 소프트웨어| [포토샵] 텍스트 지우기 [4] 무월 1094 15 04-03
4312 윈 도 우| Microsoft는 많은 수의 Sysinternals 도구를 업데이트하고 ... [2] VₑₙᵤₛG 1096 4 10-14
4311 윈 도 우| 윈도우7에서홈피 윈도우10업데이트안될때 사용법 [5] 앙앙잉잉 1097 1 11-14
4310 윈 도 우| cmd 관리자 권한 실행과 특수문자 경로 문제 [9] 메리아 1100 12 02-14
4309 소프트웨어| VBScript 기능 확장하기 개요 - API, COM server [8] 지후빠 1102 9 03-24
4308 윈 도 우| Windows 11에서 Android를 웹캠으로 사용하는 방법 VᴇɴᴜꜱGɪ 1104 6 03-16
4307 소프트웨어| Resource Hacker™ 5.1.8 - 리소스 수정 설명 [5] VₑₙᵤₛG 1106 11 11-15
4306 소프트웨어| 오토핫키로 시작 메뉴 위치 변경하기 [9] 미유키로즈 1113 5 01-13
4305 소프트웨어| [포토샵] 배니싱 포인트 텍스트 왜곡 배치 [10] 무월 1115 13 04-12
4304 윈 도 우| PE 네트워크 설정하는 방법 2편입니다. [4] PC_Clinic 1118 11 02-12
4303 소프트웨어| S3. 번역기-Firefox+Google Chrome용 부가 기능: 한국어 지원 [2] VₑₙᵤₛG 1122 6 11-24
4302 윈 도 우| WinRE.wim에 툴 메뉴 등록하는 리커버리에 대한 파티션 설... [3] 복원솔루션 1126 7 07-03
XE1.11.6 Layout1.4.8