강좌 / 팁

윈 도 우 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 - - -
4140 소프트웨어| Wake-on-Lan (Windows 10/11의 WOL) : 8단계에 걸친 완벽 ... [6] VᴇɴᴜꜱGɪ 2147 9 03-23
4139 윈 도 우| pe내장 크롬 설정파일 백업 복원하기.. [2] 센돔타오르 795 10 03-21
4138 윈 도 우| PE SSD에 설치하기. [3] 센돔타오르 2689 8 03-20
4137 모 바 일| 다음메일을 아웃룩에서 다음/카카오 통합 계정으로 접속하기 [1] asklee 2225 3 03-16
4136 윈 도 우| gooddew님 배치파일 강좌 [7] 슈머슈마 2524 19 03-16
4135 소프트웨어| rufus 3.18 사용법 (2가지) [24] suk 5933 55 03-14
4134 윈 도 우| HDD MBR - Bios 모드에 OS 버리고 PE 설치 [9] 메인보드 1832 13 03-13
4133 윈 도 우| HDD GPT-UEFI 모드에 OS 버리고 PE 설치 [8] 메인보드 2045 11 03-13
4132 윈 도 우| 노트북 터치패드(트랙패드) 비활성화 [3] 슈머슈마 930 5 03-12
4131 기 타| 한 폴더내의 wim 한번에 등록하기-vhdman [6] 카멜 1269 16 03-12
4130 하드웨어| GIGABYTE BIOS 복구하기 [3] 밤이슬216 1823 11 03-12
4129 소프트웨어| 폴드를 Y드라이브로 인식 시키기 [12] 그루터기 2046 23 03-11
4128 윈 도 우| 윈도우 부팅 오류 해결 [16] 메인보드 2206 22 03-11
4127 소프트웨어| 단일 실행 파일 간단히 수정하는 팁 [7] 그루터기 1430 14 03-10
4126 윈 도 우| 작업스케쥴러를 이용하여 UAC 우회하기 [11] 지후빠 888 10 03-09
4125 기 타| 커스텀 드라이브 아이콘 적용해 볼까? [3] 내꼬 559 5 03-09
4124 모 바 일| gos 문제해결 방법 [2] 해중이 1273 0 03-09
4123 윈 도 우| PE에서 윈도우 폰트 사용하기 [5] PC_Clinic 861 17 03-08
4122 윈 도 우| 배치파일 관리자 계정으로 실행하는 방법들 [15] 지후빠 1967 20 03-05
4121 기 타| 영화 볼때 이중 자막 보일때 해결 법 [1] 우주인 1351 3 03-05
XE1.11.6 Layout1.4.8