강좌 / 팁

윈 도 우 Move over there 우메뉴등록_제거 + 그룹정책 백복

2020.03.25 23:57

레마클로 조회:1194 추천:11

지후아빠님 자료 https://windowsforum.kr/lecture/13049139  에 이어서 ...지후아빠님 강좌에서 많이 베꼈(?)습니다.

 

수정한 것으로 사용해보세요.

 

 

https://windowsforum.kr/lecture/13133811

 

 

 

 

1. 우메뉴등록파일 실행

mot0.png

 

2. 폴더 선택창에서 대상폴더를 선택하면

    C:\Windows\System32\MoveOverthere.vbs의 백업 대상폴더가 수정됩니다.

 

 

mot3.png

 

 

mot4.png

 

 

 

mot1.png

 

 

 

 

3. 테스트 

   백업을 원하는 파일 마우스 우클릭(또는 여러파일 폴더 드래그 앤 우클릭)

       ;  OverwriteExisting + move(copy가 아님)

          copy로 바꾸려면 f.DeleteFolder Arg,OverwriteExisting를 지우면 됩니다

  

mot2.png

 

4. 백업대상 폴더 변경하려면

   바탕화면 아무 곳 마우스우클릭, 재설정...

   

 

mot.png

 

5. 제거는 제거파일....실행

 

MoveOverthere.vbs (C:\Windows\System32\MoveOverthere.vbs)

 

Const MyDestinationFolder = "D:\#_자료백업#\"

Const OverwriteExisting = True

Dim gFile, gFolder, f, a, s, o

Dim Arg

 

Set o = CreateObject("WScript.Shell")

Set f = CreateObject("Scripting.FileSystemObject")

 

If WScript.Arguments.Count = 0 Then

   w = WScript.ScriptFullName

   Set a = f.OpenTextFile(w, 1)

   a.SkipLine : s = chr(13) & Chr(10) & a.ReadAll : a.Close

   strPath = SelectFolder(strPath)

      If strPath = vbNull Then

          o.popup "   취소 중 ... 3초 후 닫혀요 ....   ", 3, "취소 중"   

      Else

          strPath = chr(34) & strPath & "\" & chr(34) 

          Set a = f.CreateTextFile(w, True)

          a.Write "Const MyDestinationFolder = " & strPath & s : a.Close

      End If

End If

 

If WScript.Arguments.Count > 0 Then

   For Each Arg in Wscript.Arguments

     Arg =  Trim(Arg)

       If InStr(Arg,".") Then

         Set gFile = f.GetFile(Arg)

         gFile.Copy MyDestinationFolder & gFile.Name,OverwriteExisting

         f.DeleteFile Arg,OverwriteExisting

       Else

         Set gFolder = f.GetFolder(Arg)

         gFolder.Copy MyDestinationFolder, OverwriteExisting

         f.DeleteFolder Arg,OverwriteExisting

       End If

   Next

End If

 

Const MY_COMPUTER = &H11&

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

Function SelectFolder(strPath)

Dim objFolder, objShell

On Error Resume Next

SelectFolder = vbNull

Set objShell  = CreateObject("Shell.Application")

            Set objFolder = objShell.Namespace(MY_COMPUTER)

            Set objFolderItem = objFolder.Self

            strPath = objFolderItem.Path

Set objFolder = objShell.BrowseForFolder(0, "초기설정 >>> 파일을 이동할 대상 폴더 선택", 0, strPath)

If IsObject(objfolder) Then SelectFolder = objFolder.Self.Path

Set objFolder = Nothing

Set objshell  = Nothing

On Error Goto 0

End Function

 

MoveOverthere우메뉴등록.vbs

 

On Error Resume Next

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 '-------------------------------------------------------------

Set WshShell = CreateObject("WScript.Shell")

Set FSO = CreateObject("Scripting.FileSystemObject")

curDir = FSO.GetParentFolderName(WScript.ScriptFullName) 

strREfile = curDir & "\RExplore.exe"

strSystem64 = WshShell.ExpandEnvironmentStrings("%SystemRoot%") & "\System32\"

OSArchCheck = WshShell.RegRead("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\PROCESSOR_ARCHITECTURE")

   If OSArchCheck = "x86" Then

      strSystem86 = strSystem64

   Else

      strSystem86 = WshShell.ExpandEnvironmentStrings("%SystemRoot%") & "\SysWOW64\"

   End If

'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

strDir = strSystem64 & "MoveOverthere.vbs"

sRegFile = curDir & "\MoveOverthere.reg"

 

'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

FSO.CopyFile curDir & "\MoveOverthere.vbs", strSystem64, true

WshShell.Run "regedit.exe /s " & Chr(34) & sRegFile & Chr(34), 0, True 

WshShell.Run Chr(34) & strREfile & Chr(34), 0, true

WshShell.popup "   5초 만 기다려요 ....   ", 5, "작업 중"      

WshShell.Run Chr(34) & strDir & Chr(34), 1, true

'현 폴더 자폭

'strCurDir = WshShell.CurrentDirectory

'WshShell.CurrentDirectory = ".."

'FSO.DeleteFolder(strCurDir)

End If

 

 

 

그룹정책 백업복원  GPO.7z

https://www.autoitscript.com/forum/files/file/461-gpo-tool/

 

GPO폴더명 유지해야 백업됩니다.

사용 후, 4개 파일 삭제 필요...

 

g.png

 

G2.png

 

 

번호 제목 글쓴이 조회 추천 등록일
[공지] 강좌 작성간 참고해주세요 gooddew - - -
4150 소프트웨어| Primo Ramdisk 사용하기 [14] 하늘보기 17741 23 05-27
4149 윈 도 우| Windows 8 정품인증 안하고 개인설정 하는 팁 [7] 핑크맛우유 17725 4 09-20
4148 하드웨어| USB부팅도 안되는 구형보드에서 plop를 통해 윈도설치. [3] 오펜하이머 17718 1 03-16
4147 서버 / IT| datafilehost.com 을 이용한 대용량 이미지 공유 [6] gooddew 17710 4 01-12
4146 윈 도 우| 윈도우 7 32비트 64비트 메모리 [9] DOS 17697 2 12-29
4145 윈 도 우| 방화벽으로 프로그램 아웃바운드 차단하기 [5] wopd 17650 7 12-01
4144 윈 도 우| Win8Mpe M 에서 Y드라이브의 용도는.... [6] tara 17641 4 02-27
4143 소프트웨어| 윈도우7 USER-PE 무선 랜카드 드라이버 설치방법 [2] 세리아 17631 3 06-22
4142 소프트웨어| 윈7에서 프로그램 인터넷 차단 방법 [9] 구들목 17601 3 05-02
4141 [팁]사용자 권한 얻는방법[윈도우7 7100] [3] 한준형 17587 0 05-08
4140 윈 도 우| 윈도 8 메트로 건너뛰고 바로 바탕화면으로 부팅하기 [10] 필로칼리아 17553 3 12-07
4139 하드웨어| Phoenix BIOS (slic2.0을slic2.1)수정하기(SamSung) [1] gooddew 17551 0 06-17
4138 윈 도 우| 윈도우8 스토어 앱 기본 설치 위치 변경하기 [14] chkid 17523 7 10-31
4137 윈 도 우| 작업 표시줄 좌측에 바탕화면 바로가기 아이콘 만들기 [4] DOS 17501 0 02-17
4136 기 타| 한글 첨부파일이 다운로드 안될때 gooddew 17491 1 09-10
4135 윈 도 우| 쉽고 빠르고 간단한 컴퓨터 최적화 팁! [27] 핑크맛우유 17481 4 11-16
4134 소프트웨어| 임시폴더의 이동과 OS의 청결, 그리고.. [20] GodFather 17465 4 11-05
4133 윈 도 우| 윈도우XP IE8 초간단 "다운그레이드 후 재설치"... [2] YhK군 17458 1 05-14
4132 윈 도 우| VHDman으로 교차부팅 이용하기 (WTG) [13] 하늘보기 17426 15 04-28
4131 Win7과 WinXP멀티부팅 하기 [19] sp2 17350 0 09-22
XE1.11.6 Layout1.4.8