강좌 / 팁

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

2020.03.25 23:57

레마클로 조회:1191 추천: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 - - -
4481 소프트웨어| 한글(HWP) 바탕문서와 한글 스타일 사용으로 칼퇴하기^^ [4] 승승아빠 596 14 04-27
4480 윈 도 우| Windows 업데이트를 사용하여 데이터를 잃지 않고 Windows ... [6] VᴇɴᴜꜱGɪ 1310 6 04-23
4479 소프트웨어| pureBasic Glass 윈도우 및 버튼 021 [6] 입니다 1081 14 04-20
4478 윈 도 우| WindowsXPE147-1빌더/나만의 PE를 만들자 시즌2 ?? 1탄 (... [59] 지연서연아 2061 69 04-16
4477 서버 / IT| 하드 디스크 사용시간 초기화 하기 [6] gooddew 1923 9 04-15
4476 소프트웨어| 응답파일(unattend.xml) 교체 및 수정 - ChangeUnattend [14] 무월 1236 39 04-13
4475 소프트웨어| AOMEI Backupper 백업실패 및 글씨 안보임 문제해결법 [5] 『ⓖⓤⓝ』 774 12 04-12
4474 윈 도 우| 윈도우 계정/자동로그인 버그 해결 방법 사가르마타 792 0 04-12
4473 윈 도 우| 원격 데스크톱..., 자격증명이 작동하지 않습니다... [1] 사가르마타 319 1 04-12
4472 윈 도 우| SSD 에서 파일 삭제를 주의해야 되는 이유 [3] gooddew 2286 12 04-10
4471 윈 도 우| 특정 폴더목록 자동열기 배치파일 [2] 메리아 717 13 04-09
4470 윈 도 우| 하드 디스크 아이콘 바꾸기 [11] 타천사둘리 1330 8 04-08
4469 소프트웨어| pureBasic 자동완성을 위한 프로젝트 만들기 [6] 입니다 1014 14 03-28
4468 윈 도 우| [uupdump] 윈도우 업데이트 및 드라이버(IRST&NVMe) 통... [17] 무월 2211 34 03-27
4467 소프트웨어| WimLib Api 백업.복원 미완성. 샘플 7가지. [10] 입니다 922 12 03-27
4466 소프트웨어| SDK(Software development kit) 에 대한 이해 [5] 입니다 591 7 03-27
4465 소프트웨어| pureBasic 구조체, Union 구조체 [4] 입니다 621 9 03-25
4464 소프트웨어| pureBasic 외부 함수 호출 [1] 입니다 359 9 03-25
4463 소프트웨어| pureBasic 포인트 기본 이해 [3] 입니다 367 10 03-25
4462 소프트웨어| purebasic Macro 기본 [3] 입니다 423 10 03-25
XE1.11.6 Layout1.4.8