• 歡迎訪問奇跡の海網站,本站不上傳任何資源,所有資源均來自于網絡,歡迎加入奇跡の海~!奇跡の海-WordPress QQ群
  • 本站下載資源為網絡上收集整理而來,并且以計算機技術研究交流為目的,版權歸原作者所有,僅供大家參考,學習,不存在任何商業目的與商業用途.
  • 本站系統鏡像均來自于官方原版,ed2k可視為P2P下載鏈接。所有操作系統默認均為試用版,如有正版密鑰可以有效激活,本站不提供任何激活和相關服務。

AutoIt3(au3)源碼-首次登陸時檢測是否存在D盤并移動我的文檔等到D盤

AutoIT3 奇跡の海 2年前 (2017-11-03) 552次瀏覽 已收錄 0個評論 掃描二維碼

簡介

部署時不可用

首次登陸時調用(首次進桌面也行),可智能識別是否存在D盤,存在則移動“文檔、圖片、音樂、視頻、收藏、下載、桌面”到D盤,不存在則自動退出程序。
AutoIt3(au3)源碼-首次登陸時檢測是否存在D盤并移動我的文檔等到D盤

源代碼

If FileExists("d:\") Then
	
        DirMove("C:\Users\Administrator\Desktop","D:\Users\Desktop",1)
        DirMove("C:\Users\Administrator\Documents","D:\Users\Documents",1)
        DirMove("C:\Users\Administrator\Downloads","D:\Users\Downloads",1)
        DirMove("C:\Users\Administrator\Favorites","D:\Users\Favorites",1)
        DirMove("C:\Users\Administrator\Music","D:\Users\Music",1)
        DirMove("C:\Users\Administrator\Pictures","D:\Users\Pictures",1)
        DirMove("C:\Users\Administrator\Videos","D:\Users\Videos",1)
        FileMove("C:\Users\desktop.ini","D:\Users\desktop.ini",1)
		
		DirRemove("C:\Users\Administrator\Desktop",1)
        DirRemove("C:\Users\Administrator\Documents",1)
        DirRemove("C:\Users\Administrator\Downloads",1)
        DirRemove("C:\Users\Administrator\Favorites",1)
        DirRemove("C:\Users\Administrator\Music",1)
        DirRemove("C:\Users\Administrator\Pictures",1)
        DirRemove("C:\Users\Administrator\Videos",1)
        FileDelete("C:\Users\desktop.ini")
		
		RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders","My Video","REG_SZ","D:\Users\Videos")
		RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders","My Pictures","REG_SZ","D:\Users\Pictures")
		RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders","Desktop","REG_SZ","D:\Users\Desktop")
		RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders","Favorites","REG_SZ","D:\Users\Favorites")
		RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders","My Music","REG_SZ","D:\Users\Music")
		RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders","{374DE290-123F-4565-9164-39C4925E467B}","REG_SZ","D:\Users\Downloads")
		RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders","Personal","REG_SZ","D:\Users\Documents")
		
		RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders","My Video","REG_EXPAND_SZ","D:\Users\Videos")
		RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders","My Pictures","REG_EXPAND_SZ","D:\Users\Pictures")
		RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders","Desktop","REG_EXPAND_SZ","D:\Users\Desktop")
		RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders","Favorites","REG_EXPAND_SZ","D:\Users\Favorites")
		RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders","My Music","REG_EXPAND_SZ","D:\Users\Music")
		RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders","{374DE290-123F-4565-9164-39C4925E467B}","REG_EXPAND_SZ","D:\Users\Downloads")
		RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders","Personal","REG_EXPAND_SZ","D:\Users\Documents")
		
		MsgBox(0, "", "移動成功,注銷或重啟后生效。")
Else
		Exit 
EndIf

版權聲明:本站所有文章和資源使用CC BY-NC-SA 4.0協議授權發布 , 轉載應當以相同方式注明文章來自“SeaOMC.COM->AutoIt3(au3)源碼-首次登陸時檢測是否存在D盤并移動我的文檔等到D盤!在下邊可以分享本文哦!
喜歡 (0)
[]
分享 (0)
奇跡の海
關于作者:
一個WordPress菜鳥!
發表我的評論
取消評論

表情 貼圖 加粗 刪除線 居中 斜體 簽到

Hi,您需要填寫昵稱和郵箱!

  • 昵稱 (必填)
  • 郵箱 (必填)
  • 網址
中国福利彩票36选7开奖结果