강좌 / 팁

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

2020.03.25 23:57

레마클로 조회:1195 추천: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 - - -
4301 윈 도 우| Windows 11에서 Android를 웹캠으로 사용하는 방법 VᴇɴᴜꜱGɪ 1156 6 03-16
4300 기 타| 나스 토런트 감시폴더에 Torrent 파일 자동 전송 (수정) [1] 슈머슈마 1162 9 08-11
4299 윈 도 우| (수정)PE에서 화면 DPI 설정에 대한 팁입니다. [11] 지후빠 1164 10 12-25
4298 윈 도 우| 지후빠님 UAC 회피기동 [1] 슈머슈마 1164 10 04-06
4297 모 바 일| 모바일 파워디렉터에서 음성 녹음 방법 강좌입니다. Mobi... murimgasa 1165 2 10-03
4296 모 바 일| 친구가 "한뼘통화"가 무엇이냐고 묻네요. 그래서... murimgasa 1167 0 08-13
4295 소프트웨어| 오토핫키 스크립트 내에 바이너리 포함시키기 [9] 지후빠 1167 7 01-07
4294 기 타| 한 드라이브에 윈도우(Atlas OS)까지 2개 설치하는 법(?) (... 누군가 1169 0 02-04
4293 소프트웨어| NirCmd v2.86 명령들 내꼬 1170 5 02-29
4292 소프트웨어| Total Commander에서 image converter 사용예제 [4] 지후빠 1171 6 03-11
4291 윈 도 우| PNG_ICO (이미지 아이콘 변환) [7] 슈머슈마 1171 6 11-12
4290 모 바 일| 카톡에서 사진 보내는 자세한 방법에 대한 설명을 요청하신... murimgasa 1174 1 08-13
4289 소프트웨어| 영상이름에 자막 매치시키기 오토핫키 [8] 비려막존 1176 8 04-27
4288 소프트웨어| 기상 정보-Forecastfox - Firefox+Google Chrome용 부가 기능 [3] VenusGirl 1176 9 12-31
4287 소프트웨어| Adobe Premiere CS6 강좌 유용한 팀Tip 몇가지 -복사단축키... [1] murimgasa 1177 1 08-25
4286 윈 도 우| NTP 서버&클라이언트 설정 하기 (윈도우 시간 동기화) [5] 무월 1177 7 06-03
4285 소프트웨어| Total commander 에서 검색된 파일들을 폴더 구조와 함께 ... [8] 줄리아니 1177 6 03-22
4284 윈 도 우| 가장간단한 ToggleTaskbar(수정) [7] 레마클로 1181 5 02-29
4283 윈 도 우| USB로 윈도우 완전 무인설치 만들기 프로젝트 - 2 [24] update 피린이 1185 8 05-27
4282 모 바 일| 카톡에서 다국어를 쉽게 입력하는 방법 [1] 무림거사 1188 3 03-01
XE1.11.6 Layout1.4.8