강좌 / 팁

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

2020.01.17 23:57

레마클로 조회:1716 추천: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 - - -
4378 윈 도 우| winpe에서 startis[all]back를 이용한 탐색기 색 변경 [14] sunshine 608 14 08-23
4377 윈 도 우| [2탄] install.wim 누적 업데이트 + 드라이버 통합 하기 (D... [9] 무월 1371 28 08-21
4376 윈 도 우| [1탄] install.wim 누적 업데이트 통합 하기 [26] 무월 1869 45 08-19
4375 모 바 일| AirPrint 설정 및 호환 프린터 목록 [1] asklee 745 3 08-18
4374 윈 도 우| Windows Defender 방화벽 인/아웃바운드 허용/차단 추가 [20] 무월 2073 35 08-17
4373 소프트웨어| 중국어 하드 코딩 한글화 강좌 [8] 줄리아니 1063 20 08-16
4372 소프트웨어| 중국어 프로그램 한글화 팁 [8] 줄리아니 1200 16 08-14
4371 소프트웨어| LaunchBar boot.wim 적용 방법 [12] 무월 1528 35 08-13
4370 소프트웨어| (추가3) 배치파일 추가기능 extd.exe 사용 팁 [7] 지후빠 945 24 08-13
4369 소프트웨어| 중국어 프로그램 한글화 팁 [11] 줄리아니 1383 20 08-10
4368 소프트웨어| ESD 다중 이미지 단일 WIM 이미지 추출 방법! [12] 무월 1085 30 08-09
4367 소프트웨어| 크롬 하단 다운로드창 활성화 [11] 무월 2784 46 08-03
4366 소프트웨어| wim boot 관련 배치 파일 몇 가지 팁 [19] 지후빠 1454 29 08-03
4365 기 타| 포토샵 많이 좋아졌네요!! [3] 집에서뒹굴 2743 5 08-02
4364 모 바 일| [Tip] 인천공항 스마트패스 - 얼굴 인식으로 출국장 통과 앱 [5] asklee 1760 9 07-28
4363 소프트웨어| 다음 팟플레이어 광고[팝업] 차단 [12] 무월 3113 48 07-26
4362 윈 도 우| winpe 시작 화면 Shutdown 메뉴 수정 [10] sunshine 854 18 07-25
4361 소프트웨어| winpe 시스템 계정에서 Edge 상위버전 적용 [8] sunshine 566 15 07-24
4360 소프트웨어| Total Commander 주요 단축키 설명 [3] VᴇɴᴜꜱGɪ 1003 11 07-23
4359 윈 도 우| 없이는 살 수 없는 Windows 바로 가기 키 11개 [5] VᴇɴᴜꜱGɪ 2956 31 07-18
XE1.11.6 Layout1.4.8