강좌 / 팁

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

2020.03.25 23:57

레마클로 조회:1207 추천: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 - - -
1630 윈 도 우| 윈도우의 불필요 파일 삭제 [18] 크림슨 13812 11 09-25
1629 윈 도 우| Windows Embedded standard 7 sp1 제대로 설치하기 [8] FLP386 12828 11 02-25
1628 윈 도 우| 만능 복구 USB 제작(1편) [33] ITforce 18481 11 05-03
1627 윈 도 우| Gimagex를 이용하여 OS 통합하기 [17] gooddew 8183 11 02-23
1626 윈 도 우| Windows 10 Pro K 2015 LTSB KMS 호환성 [32] 서비스 14709 11 08-15
1625 윈 도 우| PE 드라이버 설치 (솔향PE 해상도 조정) [14] 솔향 3429 11 01-04
1624 윈 도 우| 러시아 mini10PE 장치관리자 한글표시 [10] sunshine 1825 11 12-15
1623 윈 도 우| Auto Wim Make (만능윔 제작 방법) 6부 [8] 메인보드 1882 11 03-20
1622 윈 도 우| Auto Wim Make (만능윔 제작 방법) 4부 [7] 메인보드 1869 11 03-20
1621 윈 도 우| RSImageX 이용해서 wim 설치 동영상(youtube) [11] gooddew 3546 11 10-21
1620 윈 도 우| PE 우측하단 워터마크에 시스템 정보 넣기 [6] 히이이잌 1629 11 02-06
1619 윈 도 우| RunOnceBoot VBScript Only [20] 지후빠 1292 11 02-20
» 윈 도 우| Move over there 우메뉴등록_제거 + 그룹정책 백복 [10] 레마클로 1207 11 03-25
1617 윈 도 우| Windows 11은 1년에 1번 하반기에 출시됩니다 [1] suk 5583 11 09-09
1616 윈 도 우| 명령어로 윈도우 모니터 '진짜로' 끄기 [13] 만수무강 3103 11 12-17
1615 윈 도 우| 윈도우&서버 무인설치 패키지 견본 [6] 오스 2433 11 07-04
1614 윈 도 우| 배치 파일 관리자로 자동 납치시키는 방법 [7] 복원솔루션 2052 11 07-16
1613 윈 도 우| WindowsXPE활용 원격지 윈도우 설치 방법! [9] 무월 1525 11 11-24
1612 윈 도 우| 정리하는 스크립트 V 0.2 [배포중단] [13] 졸린사자 1923 11 11-30
1611 윈 도 우| HDD GPT-UEFI 모드에 OS 버리고 PE 설치 [8] 메인보드 2073 11 03-13
XE1.11.6 Layout1.4.8