ToddMurray Posted November 13, 2007 Share Posted November 13, 2007 Here are some scripts I wrote for the handling of Adobe Acrobat products. The attached scripts are designed to disable the Acrobat Updater in Reader and Writer versions 5.x, 6.x, 7.x, and 8.x. In versions 5-7 it removes any user specific keys relating to the Updater, EULA, or Registration for installed products. It then accepts the EULA and disables the Updater and Registration at the machine level. For Acrobat 8 it does the same steps except that it posts a new AdobeUpdaterPrefs.dat into all User profiles and the Default Users profile.This is intended for use by people in a corporate environment who want to disable user prompts without disabling functionality.AcrobatDisableUpdater.v5-8.au3CODE#NoTrayIcon#RequireAdmin#cs ---------------------------------------------------------------------------- AutoIt Version: 3.2.8.1 Author: Todd Murray Script Function: Disables Adobe Updates in Acrobat Reader/Writer 5.x, 6.x, 7.x, and 8.x#ce ----------------------------------------------------------------------------; Declare RequirementsAutoItSetOption("MustDeclareVars", 1); Declare Includes#include <AllUsers.au3> ;Provides the FileCopyAllUsers and RegDeleteAllUsers Functions; Acrobat Writer Actions; Checks for the Acrobat Writer 8 executable. Removes Updater keys from all users and writes it to HKLMIf FileExists(@ProgramFilesDir & "\Adobe\Acrobat 8.0\Acrobat\Acrobat.exe") Then ; Delete Registration and EULA from Users RegDeleteAllUsers("\Software\Adobe\Adobe Acrobat\8.0\AdobeViewer", "EULA") RegDeleteAllUsers("\Software\Adobe\Adobe Acrobat\8.0\AdobeViewer", "Launched") FileDeleteAllUsers("\Local Settings\Application Data\Adobe\Updater5\AdobeUpdaterPrefs.dat", 15) ; Write Updater and EULA to HKLM FileCopyAllUsers("AdobeUpdaterPrefs.dat", "\Local Settings\Application Data\Adobe\Updater5\AdobeUpdaterPrefs.dat", 9, 3) RegWrite("HKLM\Software\Adobe\Adobe Acrobat\8.0\AdobeViewer", "EULA", "REG_DWORD", "1") RegWrite("HKLM\Software\Adobe\Adobe Acrobat\8.0\AdobeViewer", "Launched", "REG_DWORD", "1") RegWrite("HKLM\Software\Adobe\Adobe Acrobat\8.0\AdobeViewer", "Registered", "REG_DWORD", "2")EndIf; Checks for the Acrobat Writer 7 executable. Removes Updater keys from all users and writes it to HKLMIf FileExists(@ProgramFilesDir & "\Adobe\Acrobat 7.0\Acrobat\Acrobat.exe") Then ; Delete Updater and EULA from Users RegDeleteAllUsers("\Software\Adobe\Adobe Acrobat\7.0\Updater") RegDeleteAllUsers("\Software\Adobe\Adobe Acrobat\7.0\AdobeViewer", "EULA") ; Write Updater and EULA to HKLM RegWrite("HKLM\Software\Adobe\Adobe Acrobat\7.0\Updater", "bShowInstCompDialog", "REG_DWORD", "0") RegWrite("HKLM\Software\Adobe\Adobe Acrobat\7.0\Updater", "bShowNotifDialog", "REG_DWORD", "0") RegWrite("HKLM\Software\Adobe\Adobe Acrobat\7.0\Updater", "iUpdateFrequency", "REG_DWORD", "0") RegWrite("HKLM\Software\Adobe\Adobe Acrobat\7.0\AdobeViewer", "EULA", "REG_DWORD", "1") RegWrite("HKLM\Software\Adobe\Adobe Acrobat\7.0\AdobeViewer", "Registered", "REG_DWORD", "2")EndIf; Checks for the Acrobat Writer 6 executable. Removes Updater keys from all users and writes it to HKLMIf FileExists(@ProgramFilesDir & "\Adobe\Acrobat 6.0\Acrobat\Acrobat.exe") Then ; Delete Updater and EULA from Users RegDeleteAllUsers("\Software\Adobe\Adobe Acrobat\6.0\Updater") RegDeleteAllUsers("\Software\Adobe\Adobe Acrobat\6.0\AdobeViewer", "EULA") ; Write Updater and EULA to HKLM RegWrite("HKLM\Software\Adobe\Adobe Acrobat\6.0\Updater", "bShowAutoUpdateConfDialog", "REG_DWORD", "0") RegWrite("HKLM\Software\Adobe\Adobe Acrobat\6.0\Updater", "bShowNotifDialog", "REG_DWORD", "0") RegWrite("HKLM\Software\Adobe\Adobe Acrobat\6.0\Updater", "iUpdateFrequency", "REG_DWORD", "0") RegWrite("HKLM\Software\Adobe\Adobe Acrobat\6.0\Registration", "PRODREG", "REG_DWORD", "1701340777") RegWrite("HKLM\Software\Adobe\Adobe Acrobat\6.0\AdobeViewer", "EULA", "REG_DWORD", "1")EndIf; Checks for the Acrobat Writer 5 executable. Removes Updater keys from all users and writes it to HKLMIf FileExists(@ProgramFilesDir & "\Adobe\Acrobat 5.0\Acrobat\Acrobat.exe") Then ; Delete Updater and EULA from Users RegDeleteAllUsers("\Software\Adobe\Adobe Acrobat\5.0\AdobeViewer", "ShowUpdateDialog") RegDeleteAllUsers("\Software\Adobe\Adobe Acrobat\5.0\AdobeViewer", "DisplayAboutDialog") RegDeleteAllUsers("\Software\Adobe\Adobe Acrobat\5.0\AdobeViewer", "EULA") ; Write Updater and EULA to HKLM RegWriteAllUsers("\Software\Adobe\Adobe Acrobat\5.0\AdobeViewer", "UpdateFrequency", "REG_DWORD", "3") RegWrite("HKLM\Software\Adobe\Adobe Acrobat\5.0\AdobeViewer", "ShowUpdateDialog", "REG_DWORD", "0") RegWrite("HKLM\Software\Adobe\Adobe Acrobat\5.0\AdobeViewer", "UpdateFrequency", "REG_DWORD", "3") RegWrite("HKLM\Software\Adobe\Adobe Acrobat\5.0\AdobeViewer", "DisplayAboutDialog", "REG_DWORD", "0") RegWrite("HKLM\Software\Adobe\Adobe Acrobat\5.0\AdobeViewer", "EULA", "REG_DWORD", "1")EndIf; Acrobat Reader Actions; Checks for the Acrobat Reader 8 executable. Removes Updater keys from all users and writes it to HKLMIf FileExists(@ProgramFilesDir & "\Adobe\Reader 8.0\Reader\AcroRd32.exe") Then ; Delete Registration and EULA from Users RegDeleteAllUsers("\Software\Adobe\Acrobat Reader\8.0\AdobeViewer", "EULA") RegDeleteAllUsers("\Software\Adobe\Acrobat Reader\8.0\AdobeViewer", "Launched") RegDeleteAllUsers("\Software\Adobe\Acrobat Reader\8.0\Downtown", "bDontShowAtLaunch") FileDeleteAllUsers("\Local Settings\Application Data\Adobe\Updater5\AdobeUpdaterPrefs.dat", 15) ; Write Updater and EULA to HKLM FileCopyAllUsers("AdobeUpdaterPrefs.dat", "\Local Settings\Application Data\Adobe\Updater5\AdobeUpdaterPrefs.dat", 9, 3) RegWrite("HKLM\Software\Adobe\Acrobat Reader\8.0\AdobeViewer", "EULA", "REG_DWORD", "1") RegWrite("HKLM\Software\Adobe\Acrobat Reader\8.0\AdobeViewer", "Launched", "REG_DWORD", "1") RegWrite("HKLM\Software\Adobe\Acrobat Reader\8.0\Downtown", "bDontShowAtLaunch", "REG_DWORD", "1")EndIf; Checks for the Acrobat Reader 7 executable. Removes Updater keys from all users and writes it to HKLMIf FileExists(@ProgramFilesDir & "\Adobe\Acrobat 7.0\Reader\AcroRd32.exe") Then ; Delete Updater and EULA from Users RegDeleteAllUsers("\Software\Adobe\Acrobat Reader\7.0\Updater") RegDeleteAllUsers("\Software\Adobe\Acrobat Reader\7.0\AdobeViewer", "EULA") ; Write Updater and EULA to HKLM RegWrite("HKLM\Software\Adobe\Acrobat Reader\7.0\Updater", "bShowInstCompDialog", "REG_DWORD", "0") RegWrite("HKLM\Software\Adobe\Acrobat Reader\7.0\Updater", "bShowNotifDialog", "REG_DWORD", "0") RegWrite("HKLM\Software\Adobe\Acrobat Reader\7.0\Updater", "iUpdateFrequency", "REG_DWORD", "0") RegWrite("HKLM\Software\Adobe\Acrobat Reader\7.0\AdobeViewer", "EULA", "REG_DWORD", "1") EndIf; Checks for the Acrobat Reader 6 executable. Removes Updater keys from all users and writes it to HKLMIf FileExists(@ProgramFilesDir & "\Adobe\Acrobat 6.0\Reader\AcroRd32.exe") Then ; Delete Updater and EULA from Users RegDeleteAllUsers("\Software\Adobe\Acrobat Reader\6.0\Updater") RegDeleteAllUsers("\Software\Adobe\Acrobat Reader\6.0\AdobeViewer", "EULA") ; Write Updater and EULA to HKLM RegWrite("HKLM\Software\Adobe\Acrobat Reader\6.0\Updater", "bShowAutoUpdateConfDialog", "REG_DWORD", "0") RegWrite("HKLM\Software\Adobe\Acrobat Reader\6.0\Updater", "bShowNotifDialog", "REG_DWORD", "0") RegWrite("HKLM\Software\Adobe\Acrobat Reader\6.0\Updater", "iUpdateFrequency", "REG_DWORD", "0") RegWrite("HKLM\Software\Adobe\Acrobat Reader\6.0\AdobeViewer", "EULA", "REG_DWORD", "1")EndIf; Checks for the Acrobat Reader 5 executable. Removes Updater keys from all users and writes it to HKLMIf FileExists(@ProgramFilesDir & "\Adobe\Acrobat 5.0\Reader\AcroRd32.exe") Then ; Delete Updater and EULA from Users ;5.0 RegDeleteAllUsers("\SOFTWARE\Adobe\Acrobat Reader\5.0\AdobeViewer", "ShowUpdateDialog") RegDeleteAllUsers("\SOFTWARE\Adobe\Acrobat Reader\5.0\AdobeViewer", "DisplayAboutDialog") RegDeleteAllUsers("\SOFTWARE\Adobe\Acrobat Reader\5.0\AdobeViewer", "EULA") ;5.1 RegDeleteAllUsers("\SOFTWARE\Adobe\Acrobat Reader\5.1\AdobeViewer", "ShowUpdateDialog") RegDeleteAllUsers("\SOFTWARE\Adobe\Acrobat Reader\5.1\AdobeViewer", "DisplayAboutDialog") RegDeleteAllUsers("\SOFTWARE\Adobe\Acrobat Reader\5.1\AdobeViewer", "EULA") ; Write Updater and EULA to HKLM ;5.0 RegWriteAllUsers("\Software\Adobe\Acrobat Reader\5.0\AdobeViewer", "UpdateFrequency", "REG_DWORD", "3") RegWrite("HKLM\Software\Adobe\Acrobat Reader\5.0\AdobeViewer", "ShowUpdateDialog", "REG_DWORD", "0") RegWrite("HKLM\Software\Adobe\Acrobat Reader\5.0\AdobeViewer", "UpdateFrequency", "REG_DWORD", "3") RegWrite("HKLM\Software\Adobe\Acrobat Reader\5.0\AdobeViewer", "DisplayAboutDialog", "REG_DWORD", "0") RegWrite("HKLM\Software\Adobe\Acrobat Reader\5.0\AdobeViewer", "EULA", "REG_DWORD", "1") ;5.1 RegWriteAllUsers("\Software\Adobe\Acrobat Reader\5.1\AdobeViewer", "UpdateFrequency", "REG_DWORD", "3") RegWrite("HKLM\Software\Adobe\Acrobat Reader\5.1\AdobeViewer", "ShowUpdateDialog", "REG_DWORD", "0") RegWrite("HKLM\Software\Adobe\Acrobat Reader\5.1\AdobeViewer", "UpdateFrequency", "REG_DWORD", "3") RegWrite("HKLM\Software\Adobe\Acrobat Reader\5.1\AdobeViewer", "DisplayAboutDialog", "REG_DWORD", "0") RegWrite("HKLM\Software\Adobe\Acrobat Reader\5.1\AdobeViewer", "EULA", "REG_DWORD", "1")EndIfAllUsers.au3CODE#include-once#cs ---------------------------------------------------------------------------- AutoIt Version: 3.2.8.1 Author: Todd Murray Credit: Based on code written by Sean Hart and Larry from the AutoIT Forums http://www.autoitscript.com/forum/index.ph...egWriteAllUsers Script Function: UDFs to write or delete files and registry keys from all user profiles on the system. Uses RegLoadHive functions provided by Larry #ce ----------------------------------------------------------------------------; === FileCopyAllUsers ===; Writes files to every user profile on the system (Do not include path to profile); Requires RegLoadHive and RegUnLoadHive functions.;; Inputs: $source - see FileCopy function for details; $dest - see FileCopy function for details.; $flag - see FileCopy function for details.; $attrib - Numberal value indicating what profiles to apply the change to.; 1 - user; 2 - default; 4 - all users; 8 - system;; Enter the numeric value for which profiles you want to affect. To handle; multiple types add the value's together. 1-15 are appropriate input with; 15 meaning all profiles.;; Returns: nothingFunc FileCopyAllUsers($source, $dest, $flag, $attrib) Dim $error, $ExpandEnvStrings, $AllUsersProfile, $DefaultUserProfile, $ProfilesDirectory, $curdir, $search, $profile, $SystemDirectoryAttribute ; init variables $error = 0 $ExpandEnvStrings = Opt("ExpandEnvStrings",1) $AllUsersProfile = RegRead("HKLM\Software\Microsoft\Windows NT\CurrentVersion\ProfileList", "AllUsersProfile") $DefaultUserProfile = RegRead("HKLM\Software\Microsoft\Windows NT\CurrentVersion\ProfileList", "DefaultUserProfile") $ProfilesDirectory = RegRead("HKLM\Software\Microsoft\Windows NT\CurrentVersion\ProfileList", "ProfilesDirectory") $source = @ScriptDir & "\" & $source ; change directory to profile directory $curdir = @WorkingDir FileChangeDir($ProfilesDirectory) ; Go through all directories $search = FileFindFirstFile("*.*") $profile = FileFindNextFile($search) While @error = 0 ; Checks to ensure the target is a directory If StringRegExp(FileGetAttrib($profile), "D", 0) <> 0 Then $SystemDirectoryAttribute = StringRegExp(FileGetAttrib($profile), "SHD", 0) Switch $attrib Case 1; User Profiles If $profile <> $AllUsersProfile And $profile <> $DefaultUserProfile And $SystemDirectoryAttribute = False Then FileCopy($source, $ProfilesDirectory & "\" & $profile & $dest, $flag) EndIf Case 2; Default User Profile If $profile = $DefaultUserProfile Then FileCopy($source, $ProfilesDirectory & "\" & $profile & $dest, $flag) EndIf Case 3; User Profiles + Default User Profile If $profile <> $AllUsersProfile And $SystemDirectoryAttribute = False Then FileCopy($source, $ProfilesDirectory & "\" & $profile & $dest, $flag) EndIf Case 4; All Users Profile If $profile = $AllUsersProfile Then FileCopy($source, $ProfilesDirectory & "\" & $profile & $dest, $flag) EndIf Case 5; User Profiles + All Users Profile If $profile = $DefaultUserProfile And $SystemDirectoryAttribute = False Then FileCopy($source, $ProfilesDirectory & "\" & $profile & $dest, $flag) EndIf Case 6; Default User Profile + All Users Profile If $profile = $DefaultUserProfile Or $profile = $AllUsersProfile Then FileCopy($source, $ProfilesDirectory & "\" & $profile & $dest, $flag) EndIf Case 7; User Profiles + Default User Profile + All Users Profile If $SystemDirectoryAttribute = False Then FileCopy($source, $ProfilesDirectory & "\" & $profile & $dest, $flag) EndIf Case 8; System Profiles If $SystemDirectoryAttribute = True Then FileCopy($source, $ProfilesDirectory & "\" & $profile & $dest, $flag) EndIf Case 9; User Profiles + System Profiles If $profile <> $AllUsersProfile And $profile <> $DefaultUserProfile Then FileCopy($source, $ProfilesDirectory & "\" & $profile & $dest, $flag) EndIf Case 10; Default User Profile + System Profiles If $profile = $DefaultUserProfile Or $SystemDirectoryAttribute = True Then FileCopy($source, $ProfilesDirectory & "\" & $profile & $dest, $flag) EndIf Case 11; User Profiles + Default User Profile + System Profiles If $profile <> $AllUsersProfile Then FileCopy($source, $ProfilesDirectory & "\" & $profile & $dest, $flag) EndIf Case 12; All Users Profile + System Profiles If $profile = $AllUsersProfile Or $SystemDirectoryAttribute = True Then FileCopy($source, $ProfilesDirectory & "\" & $profile & $dest, $flag) EndIf Case 13; User Profiles + All Users Profile + System Profiles If $profile <> $DefaultUserProfile Then FileCopy($source, $ProfilesDirectory & "\" & $profile & $dest, $flag) EndIf Case 14; Default User Profile + All Users Profile + System Profiles If $profile = $AllUsersProfile Or $profile = $DefaultUserProfile Or $SystemDirectoryAttribute = True Then FileCopy($source, $ProfilesDirectory & "\" & $profile & $dest, $flag) EndIf Case 15; User Profiles + Default User Profile + All Users Profile + System Profiles FileCopy($source, $ProfilesDirectory & "\" & $profile & $dest, $flag) EndSwitch EndIf $profile = FileFindNextFile($search) WEnd ; Put settings back and change back to previous directory Opt("ExpandEnvStrings",$ExpandEnvStrings) FileChangeDir($curdir)EndFunc; === END FileCopyAllUsers ===; === FileDeleteAllUsers ===; Deletes file from every user profile on the system.; Requires RegLoadHive and RegUnLoadHive functions.;; Inputs: $path - see FileDelete function for details (Do not include path to profile); $attrib - Numberal value indicating what profiles to apply the change to.; 1 - user; 2 - default; 4 - all users; 8 - system;; Enter the numeric value for which profiles you want to affect. To handle; multiple types add the value's together. 1-15 are appropriate input with; 15 meaning all profiles.;; Returns: nothingFunc FileDeleteAllUsers($path, $attrib) Dim $error, $ExpandEnvStrings, $AllUsersProfile, $DefaultUserProfile, $ProfilesDirectory, $curdir, $search, $profile, $SystemDirectoryAttribute ; init variables $error = 0 $ExpandEnvStrings = Opt("ExpandEnvStrings",1) $AllUsersProfile = RegRead("HKLM\Software\Microsoft\Windows NT\CurrentVersion\ProfileList", "AllUsersProfile") $DefaultUserProfile = RegRead("HKLM\Software\Microsoft\Windows NT\CurrentVersion\ProfileList", "DefaultUserProfile") $ProfilesDirectory = RegRead("HKLM\Software\Microsoft\Windows NT\CurrentVersion\ProfileList", "ProfilesDirectory") ; change directory to profile directory $curdir = @WorkingDir FileChangeDir($ProfilesDirectory) ; Go through all directories $search = FileFindFirstFile("*.*") $profile = FileFindNextFile($search) While @error = 0 ; Checks to ensure the target is a directory If StringRegExp(FileGetAttrib($profile), "D", 0) <> 0 Then $SystemDirectoryAttribute = StringRegExp(FileGetAttrib($profile), "SHD", 0) Switch $attrib Case 1; User Profiles If $profile <> $AllUsersProfile And $profile <> $DefaultUserProfile And $SystemDirectoryAttribute = False Then FileDelete($ProfilesDirectory & "\" & $profile & $path) EndIf Case 2; Default User Profile If $profile = $DefaultUserProfile Then FileDelete($ProfilesDirectory & "\" & $profile & $path) EndIf Case 3; User Profiles + Default User Profile If $profile <> $AllUsersProfile And $SystemDirectoryAttribute = False Then FileDelete($ProfilesDirectory & "\" & $profile & $path) EndIf Case 4; All Users Profile If $profile = $AllUsersProfile Then FileDelete($ProfilesDirectory & "\" & $profile & $path) EndIf Case 5; User Profiles + All Users Profile If $profile = $DefaultUserProfile And $SystemDirectoryAttribute = False Then FileDelete($ProfilesDirectory & "\" & $profile & $path) EndIf Case 6; Default User Profile + All Users Profile If $profile = $DefaultUserProfile Or $profile = $AllUsersProfile Then FileDelete($ProfilesDirectory & "\" & $profile & $path) EndIf Case 7; User Profiles + Default User Profile + All Users Profile If $SystemDirectoryAttribute = False Then FileDelete($ProfilesDirectory & "\" & $profile & $path) EndIf Case 8; System Profiles If $SystemDirectoryAttribute = True Then FileDelete($ProfilesDirectory & "\" & $profile & $path) EndIf Case 9; User Profiles + System Profiles If $profile <> $AllUsersProfile And $profile <> $DefaultUserProfile Then FileDelete($ProfilesDirectory & "\" & $profile & $path) EndIf Case 10; Default User Profile + System Profiles If $profile = $DefaultUserProfile Or $SystemDirectoryAttribute = True Then FileDelete($ProfilesDirectory & "\" & $profile & $path) EndIf Case 11; User Profiles + Default User Profile + System Profiles If $profile <> $AllUsersProfile Then FileDelete($ProfilesDirectory & "\" & $profile & $path) EndIf Case 12; All Users Profile + System Profiles If $profile = $AllUsersProfile Or $SystemDirectoryAttribute = True Then FileDelete($ProfilesDirectory & "\" & $profile & $path) EndIf Case 13; User Profiles + All Users Profile + System Profiles If $profile <> $DefaultUserProfile Then FileDelete($ProfilesDirectory & "\" & $profile & $path) EndIf Case 14; Default User Profile + All Users Profile + System Profiles If $profile = $AllUsersProfile Or $profile = $DefaultUserProfile Or $SystemDirectoryAttribute = True Then FileDelete($ProfilesDirectory & "\" & $profile & $path) EndIf Case 15; User Profiles + Default User Profile + All Users Profile + System Profiles FileDelete($ProfilesDirectory & "\" & $profile & $path) EndSwitch EndIf $profile = FileFindNextFile($search) WEnd ; Put settings back and change back to previous directory Opt("ExpandEnvStrings",$ExpandEnvStrings) FileChangeDir($curdir)EndFunc; === END FileDeleteAllUsers ===; === RegWriteAllUsers ===; Writes "current user" registry data to every user profile on the system.; Requires RegLoadHive and RegUnLoadHive functions.;; Inputs: $key - see RegWrite function for details (no HKU\HKCU\HKLM required); $value - see RegWrite function for details; $type - see RegWrite function for details; $data - see RegWrite function for details;; Returns: nothingFunc RegWriteAllUsers($key, $value, $type, $data) Dim $i, $error, $ExpandEnvStrings, $ProfilesDirectory, $curdir, $search, $profile, $curkey ; init variables $i = 1 $error = 0 $ExpandEnvStrings = Opt("ExpandEnvStrings",1) $ProfilesDirectory = RegRead("HKLM\Software\Microsoft\Windows NT\CurrentVersion\ProfileList", "ProfilesDirectory") ; change directory to profile directory $curdir = @WorkingDir FileChangeDir($ProfilesDirectory) ; replace HKU / HKCU / HKLM in key if require Select Case StringLeft($key, 4) = "HKU\" $key = StringRight($key, StringLen($key) - 4) Case StringLeft($key, 5) = "HKCU\" $key = StringRight($key, StringLen($key) - 5) Case StringLeft($key, 5) = "HKLM\" $key = StringRight($key, StringLen($key) - 5) Case StringLeft($key, 11) = "HKEY_USERS\" $key = StringRight($key, StringLen($key) - 11) Case StringLeft($key, 18) = "HKEY_CURRENT_USER\" $key = StringRight($key, StringLen($key) - 18) Case StringLeft($key, 19) = "HKEY_LOCAL_MACHINE\" $key = StringRight($key, StringLen($key) - 19) EndSelect ; Go through all directories where ntuser.dat is accessible $search = FileFindFirstFile("*.*") $profile = FileFindNextFile($search) While @error = 0 ; Process directories If StringInStr(FileGetAttrib($ProfilesDirectory & "\" & $profile), "D") Then ; Check for ntuser.dat If FileExists($ProfilesDirectory & "\" & $profile & "\ntuser.dat") Then ; Try and load hive If RegLoadHive("TempUser", $ProfilesDirectory & "\" & $profile & "\ntuser.dat") Then ; Apply new registry data RegWrite("HKEY_USERS\TempUser\" & $key, $value, $type, $data) ; Unload hive RegUnloadHive("TempUser") EndIf EndIf EndIf $profile = FileFindNextFile($search) WEnd ; Start by going through all currently logged on user keys (exclude system accounts and classes) $curkey = RegEnumKey("HKEY_USERS", $i) While @error = 0 If (StringLen($curkey) > 8) And (Not StringInStr($curkey, "_Classes")) Then RegWrite("HKEY_USERS\" & $curkey & "\" & $key, $value, $type, $data) EndIf $i = $i + 1 $curkey = RegEnumKey("HKEY_USERS", $i) WEnd ; Put settings back and change back to previous directory Opt("ExpandEnvStrings",$ExpandEnvStrings) FileChangeDir($curdir) EndFunc; === END RegWriteAllUsers ===; === RegDeleteAllUsers ===; Deletes "current user" registry data from every user profile on the system.; Requires RegLoadHive and RegUnLoadHive functions.;; Inputs: $key - see RegDelete function for details (no HKU\HKCU\HKLM required); $value - (optional) see RegDelete function for details;; Returns: nothingFunc RegDeleteAllUsers($key, $value = "ÿ") Dim $i, $error, $ExpandEnvStrings, $ProfilesDirectory, $curdir, $search, $profile, $curkey ; init variables $i = 1 $error = 0 $ExpandEnvStrings = Opt("ExpandEnvStrings",1) $ProfilesDirectory = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList", "ProfilesDirectory") ; change directory to profile directory $curdir = @WorkingDir FileChangeDir($ProfilesDirectory) ; replace HKU / HKCU / HKLM in key if require Select Case StringLeft($key, 4) = "HKU\" $key = StringRight($key, StringLen($key) - 4) Case StringLeft($key, 5) = "HKCU\" $key = StringRight($key, StringLen($key) - 5) Case StringLeft($key, 5) = "HKLM\" $key = StringRight($key, StringLen($key) - 5) Case StringLeft($key, 11) = "HKEY_USERS\" $key = StringRight($key, StringLen($key) - 11) Case StringLeft($key, 18) = "HKEY_CURRENT_USER\" $key = StringRight($key, StringLen($key) - 18) Case StringLeft($key, 19) = "HKEY_LOCAL_MACHINE\" $key = StringRight($key, StringLen($key) - 19) EndSelect ; Go through all directories where ntuser.dat is accessible $search = FileFindFirstFile("*.*") $profile = FileFindNextFile($search) While @error = 0 ; Process directories If StringInStr(FileGetAttrib($ProfilesDirectory & "\" & $profile), "D") Then ; Check for ntuser.dat If FileExists($ProfilesDirectory & "\" & $profile & "\ntuser.dat") Then ; Try and load hive If RegLoadHive("TempUser", $ProfilesDirectory & "\" & $profile & "\ntuser.dat") Then ; Delete registry data If $value = "ÿ" Then RegDelete("HKEY_USERS\TempUser\" & $key) Else RegDelete("HKEY_USERS\TempUser\" & $key, $value) EndIf ; Unload hive RegUnloadHive("TempUser") EndIf EndIf EndIf $profile = FileFindNextFile($search) WEnd ; Start by going through all currently logged on user keys (exclude system accounts and classes) $curkey = RegEnumKey("HKEY_USERS", $i) While @error = 0 If (StringLen($curkey) > 8) And (Not StringInStr($curkey, "_Classes")) Then ; Delete registry data If $value = "ÿ" Then RegDelete("HKEY_USERS\" & $curkey & "\" & $key) Else RegDelete("HKEY_USERS\" & $curkey & "\" & $key, $value) EndIf EndIf $i = $i + 1 $curkey = RegEnumKey("HKEY_USERS", $i) WEnd EndFunc; === END RegDeleteAllUsers ===; === RegLoadHive ===; Loads a ntuser.dat file as a registry hive; Requires SetPrivilege function.;; Inputs: $hiveName - name for the hive; $NTUSER_datFile - full path to ntuser.dat file to load; $RLH_key - (optional) root for hive (defaults to HKU);; Returns: 1 - Successful; 0 - Error (sets @error)Func RegLoadHive($hiveName, $NTUSER_datFile, $RLH_key = "HKU") If Not (@OSTYPE=="WIN32_NT") Then SetError(-1) Return 0 EndIf Const $HKEY_LOCAL_MACHINE = 0x80000002 Const $HKEY_USERS = 0x80000003 Const $SE_RESTORE_NAME = "SeRestorePrivilege" Const $SE_BACKUP_NAME = "SeBackupPrivilege" Local $RLH_ret Local $aPriv[2] If $RLH_key = "HKLM" Then $RLH_key = $HKEY_LOCAL_MACHINE ElseIf $RLH_key = "HKU" Then $RLH_key = $HKEY_USERS Else SetError(-2) Return 0 EndIf $aPriv[0] = $SE_RESTORE_NAME $aPriv[1] = $SE_BACKUP_NAME SetPrivilege($aPriv,1) $RLH_ret = DllCall("Advapi32.dll","int","RegLoadKey","int",$RLH_key,"str",$hiveName,"str",$NTUSER_datFile) SetError($RLH_ret[0]) Return Not $RLH_ret[0]EndFunc; === END RegLoadHive ===; === RegUnloadHive ===; Unloads a registry hive; Requires SetPrivilege function.;; Inputs: $hiveName - name for the hive; $RLH_key - (optional) root for hive (defaults to HKU);; Returns: 1 - Successful; 0 - Error (sets @error)Func RegUnloadHive($hiveName, $RUH_key = "HKU") If Not (@OSTYPE=="WIN32_NT") Then SetError(-1) Return 0 EndIf Const $HKEY_LOCAL_MACHINE = 0x80000002 Const $HKEY_USERS = 0x80000003 Local $RUH_ret If $RUH_key = "HKLM" Then $RUH_key = $HKEY_LOCAL_MACHINE ElseIf $RUH_key = "HKU" Then $RUH_key = $HKEY_USERS Else SetError(-2) Return 0 EndIf $RUH_ret = DllCall("Advapi32.dll","int","RegUnLoadKey","int",$RUH_key,"Str",$hiveName) Return Not $RUH_ret[0]EndFunc; === RegUnloadHive ===; === SetPrivilege ===; Special function for use with registry hive functionsFunc SetPrivilege( $privilege, $bEnable ) Const $TOKEN_ADJUST_PRIVILEGES = 0x0020 Const $TOKEN_QUERY = 0x0008 Const $SE_PRIVILEGE_ENABLED = 0x0002 Local $hToken, $LUID, $TOKEN_PRIVILEGES, $NEWTOKEN_PRIVILEGES, $SP_auxret, $SP_ret, $hCurrProcess, $nTokens, $nTokenIndex, $priv, $ret, $f $nTokens = 1 $LUID = DLLStructCreate("dword;int") If IsArray($privilege) Then $nTokens = UBound($privilege) $TOKEN_PRIVILEGES = DLLStructCreate("dword;dword[" & (3 * $nTokens) & "]") $NEWTOKEN_PRIVILEGES = DLLStructCreate("dword;dword[" & (3 * $nTokens) & "]") $hCurrProcess = DLLCall("kernel32.dll","hwnd","GetCurrentProcess") $SP_auxret = DLLCall("advapi32.dll","int","OpenProcessToken","hwnd",$hCurrProcess[0], _ "int",BitOR($TOKEN_ADJUST_PRIVILEGES,$TOKEN_QUERY),"int_ptr",0) If $SP_auxret[0] Then $hToken = $SP_auxret[3] DLLStructSetData($TOKEN_PRIVILEGES,1,1) $nTokenIndex = 1 While $nTokenIndex <= $nTokens If IsArray($privilege) Then $priv = $privilege[$nTokenIndex-1] Else $priv = $privilege EndIf $ret = DLLCall("advapi32.dll","int","LookupPrivilegeValue","str","","str",$priv, _ "ptr",DLLStructGetPtr($LUID)) If $ret[0] Then If $bEnable Then DLLStructSetData($TOKEN_PRIVILEGES,2,$SE_PRIVILEGE_ENABLED,(3 * $nTokenIndex)) Else DLLStructSetData($TOKEN_PRIVILEGES,2,0,(3 * $nTokenIndex)) EndIf DLLStructSetData($TOKEN_PRIVILEGES,2,DllStructGetData($LUID,1),(3 * ($nTokenIndex-1)) + 1) DLLStructSetData($TOKEN_PRIVILEGES,2,DllStructGetData($LUID,2),(3 * ($nTokenIndex-1)) + 2) DLLStructSetData($LUID,1,0) DLLStructSetData($LUID,2,0) EndIf $nTokenIndex += 1 WEnd $ret = DLLCall("advapi32.dll","int","AdjustTokenPrivileges","hwnd",$hToken,"int",0, _ "ptr",DllStructGetPtr($TOKEN_PRIVILEGES),"int",DllStructGetSize($NEWTOKEN_PRIVILEGES), _ "ptr",DllStructGetPtr($NEWTOKEN_PRIVILEGES),"int_ptr",0) $f = DLLCall("kernel32.dll","int","GetLastError") EndIf $NEWTOKEN_PRIVILEGES = 0 $TOKEN_PRIVILEGES = 0 $LUID = 0 If $SP_auxret[0] = 0 Then Return 0 $SP_auxret = DLLCall("kernel32.dll","int","CloseHandle","hwnd",$hToken) If Not $ret[0] And Not $SP_auxret[0] Then Return 0 return $ret[0]EndFunc; === END SetPrivilege ===AdobeUpdaterPrefs.datCODE<?xml version="1.0" encoding="UTF-8" ?><AdobeUpdater><IsFirstRun>0</IsFirstRun><AutoCheck>0</AutoCheck><AutoCheckType>0</AutoCheckType><AutoCheckFreq>0</AutoCheckFreq></AdobeUpdater>AcrobatDisableUpdater.v5_8.zip Link to comment Share on other sites More sharing options...
ToddMurray Posted November 14, 2007 Author Share Posted November 14, 2007 I added some code to fix registration on Acrobat Writer 5 and 6. I also made it so it would set .pdf to associate to the latest version of Reader installed. CODE #NoTrayIcon #RequireAdmin #cs ---------------------------------------------------------------------------- AutoIt Version: 3.2.8.1 Author: Todd Murray Script Function: Disables Adobe Updates in Acrobat Reader/Writer 5.x, 6.x, 7.x, and 8.x #ce ---------------------------------------------------------------------------- ; Declare Requirements AutoItSetOption("MustDeclareVars", 1) ; Declare Includes #include <AllUsers.au3> ;Provides the FileCopyAllUsers and RegDeleteAllUsers Functions ; Declare Variables Dim $writer ; Acrobat Writer Actions ; Checks for the Acrobat Writer 5 executable. Removes Updater keys from all users and writes it to HKLM If FileExists(@ProgramFilesDir & "\Adobe\Acrobat 5.0\Acrobat\Acrobat.exe") Then ; Delete Updater and EULA from Users RegDeleteAllUsers("\Software\Adobe\Adobe Acrobat\5.0\AdobeViewer", "ShowUpdateDialog") RegDeleteAllUsers("\Software\Adobe\Adobe Acrobat\5.0\AdobeViewer", "DisplayAboutDialog") RegDeleteAllUsers("\Software\Adobe\Adobe Acrobat\5.0\AdobeViewer", "EULA") ; Write Updater and EULA to HKLM RegWriteAllUsers("\Software\Adobe\Adobe Acrobat\5.0\AdobeViewer", "UpdateFrequency", "REG_DWORD", "3") RegWriteAllUsers("\Software\Adobe\Acrobat5\5.0\Registration", "NOTELAT", "REG_SZ", "0") RegWriteAllUsers("\Software\Adobe\Acrobat5\5.0\Registration", "NOTENEV", "REG_SZ", "1") RegWriteAllUsers("\Software\Adobe\Acrobat5\5.0\Registration", "NOTENOW", "REG_SZ", "0") RegWrite("HKLM\Software\Adobe\Adobe Acrobat\5.0\AdobeViewer", "ShowUpdateDialog", "REG_DWORD", "0") RegWrite("HKLM\Software\Adobe\Adobe Acrobat\5.0\AdobeViewer", "UpdateFrequency", "REG_DWORD", "3") RegWrite("HKLM\Software\Adobe\Adobe Acrobat\5.0\AdobeViewer", "DisplayAboutDialog", "REG_DWORD", "0") RegWrite("HKLM\Software\Adobe\Adobe Acrobat\5.0\AdobeViewer", "EULA", "REG_DWORD", "1") ; Sets the $writer variable to true $writer = True EndIf ; Checks for the Acrobat Writer 6 executable. Removes Updater keys from all users and writes it to HKLM If FileExists(@ProgramFilesDir & "\Adobe\Acrobat 6.0\Acrobat\Acrobat.exe") Then ; Delete Updater and EULA from Users RegDeleteAllUsers("\Software\Adobe\Adobe Acrobat\6.0\Updater") RegDeleteAllUsers("\Software\Adobe\Adobe Acrobat\6.0\AdobeViewer", "EULA") ; Write Updater and EULA to HKLM RegWrite("HKLM\Software\Adobe\Adobe Acrobat\6.0\Updater", "bShowAutoUpdateConfDialog", "REG_DWORD", "0") RegWrite("HKLM\Software\Adobe\Adobe Acrobat\6.0\Updater", "bShowNotifDialog", "REG_DWORD", "0") RegWrite("HKLM\Software\Adobe\Adobe Acrobat\6.0\Updater", "iUpdateFrequency", "REG_DWORD", "0") RegWrite("HKLM\Software\Adobe\Adobe Acrobat\6.0\Registration", "PRODREG", "REG_DWORD", "1701340777") RegWrite("HKLM\Software\Adobe\Adobe Acrobat\6.0\AdobeViewer", "EULA", "REG_DWORD", "1") ; Sets the $writer variable to true $writer = True EndIf ; Checks for the Acrobat Writer 7 executable. Removes Updater keys from all users and writes it to HKLM If FileExists(@ProgramFilesDir & "\Adobe\Acrobat 7.0\Acrobat\Acrobat.exe") Then ; Delete Updater and EULA from Users RegDeleteAllUsers("\Software\Adobe\Adobe Acrobat\7.0\Updater") RegDeleteAllUsers("\Software\Adobe\Adobe Acrobat\7.0\AdobeViewer", "EULA") ; Write Updater and EULA to HKLM RegWrite("HKLM\Software\Adobe\Adobe Acrobat\7.0\Updater", "bShowInstCompDialog", "REG_DWORD", "0") RegWrite("HKLM\Software\Adobe\Adobe Acrobat\7.0\Updater", "bShowNotifDialog", "REG_DWORD", "0") RegWrite("HKLM\Software\Adobe\Adobe Acrobat\7.0\Updater", "iUpdateFrequency", "REG_DWORD", "0") RegWrite("HKLM\Software\Adobe\Adobe Acrobat\7.0\AdobeViewer", "EULA", "REG_DWORD", "1") RegWrite("HKLM\Software\Adobe\Adobe Acrobat\7.0\AdobeViewer", "Registered", "REG_DWORD", "2") ; Sets the $writer variable to true $writer = True EndIf ; Checks for the Acrobat Writer 8 executable. Removes Updater keys from all users and writes it to HKLM If FileExists(@ProgramFilesDir & "\Adobe\Acrobat 8.0\Acrobat\Acrobat.exe") Then ; Delete Registration and EULA from Users RegDeleteAllUsers("\Software\Adobe\Adobe Acrobat\8.0\AdobeViewer", "EULA") RegDeleteAllUsers("\Software\Adobe\Adobe Acrobat\8.0\AdobeViewer", "Launched") FileDeleteAllUsers("\Local Settings\Application Data\Adobe\Updater5\AdobeUpdaterPrefs.dat", 15) ; Write Updater and EULA to HKLM FileCopyAllUsers("AdobeUpdaterPrefs.dat", "\Local Settings\Application Data\Adobe\Updater5\AdobeUpdaterPrefs.dat", 9, 3) RegWrite("HKLM\Software\Adobe\Adobe Acrobat\8.0\AdobeViewer", "EULA", "REG_DWORD", "1") RegWrite("HKLM\Software\Adobe\Adobe Acrobat\8.0\AdobeViewer", "Launched", "REG_DWORD", "1") RegWrite("HKLM\Software\Adobe\Adobe Acrobat\8.0\AdobeViewer", "Registered", "REG_DWORD", "2") ; Sets the $writer variable to true $writer = True EndIf ; Acrobat Reader Actions ; Checks for the Acrobat Reader 5 executable. Removes Updater keys from all users and writes it to HKLM If FileExists(@ProgramFilesDir & "\Adobe\Acrobat 5.0\Reader\AcroRd32.exe") Then ; Delete Updater and EULA from Users ;5.0 RegDeleteAllUsers("\SOFTWARE\Adobe\Acrobat Reader\5.0\AdobeViewer", "ShowUpdateDialog") RegDeleteAllUsers("\SOFTWARE\Adobe\Acrobat Reader\5.0\AdobeViewer", "DisplayAboutDialog") RegDeleteAllUsers("\SOFTWARE\Adobe\Acrobat Reader\5.0\AdobeViewer", "EULA") ;5.1 RegDeleteAllUsers("\SOFTWARE\Adobe\Acrobat Reader\5.1\AdobeViewer", "ShowUpdateDialog") RegDeleteAllUsers("\SOFTWARE\Adobe\Acrobat Reader\5.1\AdobeViewer", "DisplayAboutDialog") RegDeleteAllUsers("\SOFTWARE\Adobe\Acrobat Reader\5.1\AdobeViewer", "EULA") ; Write Updater and EULA to HKLM ;5.0 RegWriteAllUsers("\Software\Adobe\Acrobat Reader\5.0\AdobeViewer", "UpdateFrequency", "REG_DWORD", "3") RegWrite("HKLM\Software\Adobe\Acrobat Reader\5.0\AdobeViewer", "ShowUpdateDialog", "REG_DWORD", "0") RegWrite("HKLM\Software\Adobe\Acrobat Reader\5.0\AdobeViewer", "UpdateFrequency", "REG_DWORD", "3") RegWrite("HKLM\Software\Adobe\Acrobat Reader\5.0\AdobeViewer", "DisplayAboutDialog", "REG_DWORD", "0") RegWrite("HKLM\Software\Adobe\Acrobat Reader\5.0\AdobeViewer", "EULA", "REG_DWORD", "1") ;5.1 RegWriteAllUsers("\Software\Adobe\Acrobat Reader\5.1\AdobeViewer", "UpdateFrequency", "REG_DWORD", "3") RegWrite("HKLM\Software\Adobe\Acrobat Reader\5.1\AdobeViewer", "ShowUpdateDialog", "REG_DWORD", "0") RegWrite("HKLM\Software\Adobe\Acrobat Reader\5.1\AdobeViewer", "UpdateFrequency", "REG_DWORD", "3") RegWrite("HKLM\Software\Adobe\Acrobat Reader\5.1\AdobeViewer", "DisplayAboutDialog", "REG_DWORD", "0") RegWrite("HKLM\Software\Adobe\Acrobat Reader\5.1\AdobeViewer", "EULA", "REG_DWORD", "1") ; Sets the default file association for pdf files to reader. If $writer = True Then RegWrite("HKCR\.pdf", "", "REG_SZ", "AcroExch.Document") RegWrite("HKCR\.pdf", "Content Type", "REG_SZ", "application/pdf") RegWrite("HKCR\AcroExch.Document", "", "REG_SZ", "Adobe Acrobat Document") RegWrite("HKCR\AcroExch.Document\shell", "", "REG_SZ", "Read") RegWrite("HKCR\AcroExch.Document\shell\Read", "", "REG_SZ", "Open with Adobe Reader 5") RegWrite("HKCR\AcroExch.Document\shell\Read\command", "", "REG_SZ", """" & @ProgramFilesDir & "\Adobe\Acrobat 5.0\Reader\AcroRd32.exe""" & " ""%1""") EndIf EndIf ; Checks for the Acrobat Reader 6 executable. Removes Updater keys from all users and writes it to HKLM If FileExists(@ProgramFilesDir & "\Adobe\Acrobat 6.0\Reader\AcroRd32.exe") Then ; Delete Updater and EULA from Users RegDeleteAllUsers("\Software\Adobe\Acrobat Reader\6.0\Updater") RegDeleteAllUsers("\Software\Adobe\Acrobat Reader\6.0\AdobeViewer", "EULA") ; Write Updater and EULA to HKLM RegWrite("HKLM\Software\Adobe\Acrobat Reader\6.0\Updater", "bShowAutoUpdateConfDialog", "REG_DWORD", "0") RegWrite("HKLM\Software\Adobe\Acrobat Reader\6.0\Updater", "bShowNotifDialog", "REG_DWORD", "0") RegWrite("HKLM\Software\Adobe\Acrobat Reader\6.0\Updater", "iUpdateFrequency", "REG_DWORD", "0") RegWrite("HKLM\Software\Adobe\Acrobat Reader\6.0\AdobeViewer", "EULA", "REG_DWORD", "1") If $writer = True Then RegWrite("HKCR\.pdf", "", "REG_SZ", "AcroExch.Document") RegWrite("HKCR\.pdf", "Content Type", "REG_SZ", "application/pdf") RegWrite("HKCR\AcroExch.Document", "", "REG_SZ", "Adobe Acrobat Document") RegWrite("HKCR\AcroExch.Document\shell", "", "REG_SZ", "Read") RegWrite("HKCR\AcroExch.Document\shell\Read", "", "REG_SZ", "Open with Adobe Reader 6") RegWrite("HKCR\AcroExch.Document\shell\Read\command", "", "REG_SZ", """" & @ProgramFilesDir & "\Adobe\Acrobat 6.0\Reader\AcroRd32.exe""" & " ""%1""") EndIf EndIf ; Checks for the Acrobat Reader 7 executable. Removes Updater keys from all users and writes it to HKLM If FileExists(@ProgramFilesDir & "\Adobe\Acrobat 7.0\Reader\AcroRd32.exe") Then ; Delete Updater and EULA from Users RegDeleteAllUsers("\Software\Adobe\Acrobat Reader\7.0\Updater") RegDeleteAllUsers("\Software\Adobe\Acrobat Reader\7.0\AdobeViewer", "EULA") ; Write Updater and EULA to HKLM RegWrite("HKLM\Software\Adobe\Acrobat Reader\7.0\Updater", "bShowInstCompDialog", "REG_DWORD", "0") RegWrite("HKLM\Software\Adobe\Acrobat Reader\7.0\Updater", "bShowNotifDialog", "REG_DWORD", "0") RegWrite("HKLM\Software\Adobe\Acrobat Reader\7.0\Updater", "iUpdateFrequency", "REG_DWORD", "0") RegWrite("HKLM\Software\Adobe\Acrobat Reader\7.0\AdobeViewer", "EULA", "REG_DWORD", "1") ; Sets the default file association for pdf files to reader. If $writer = True Then RegWrite("HKCR\.pdf", "", "REG_SZ", "AcroExch.Document") RegWrite("HKCR\.pdf", "Content Type", "REG_SZ", "application/pdf") RegWrite("HKCR\AcroExch.Document", "", "REG_SZ", "Adobe Acrobat Document") RegWrite("HKCR\AcroExch.Document\CurVer", "", "REG_SZ", "AcroExch.document.7") RegWrite("HKCR\AcroExch.document.7\shell", "", "REG_SZ", "Read") RegWrite("HKCR\AcroExch.document.7\shell\Read", "", "REG_SZ", "Open with Adobe Reader 7") RegWrite("HKCR\AcroExch.document.7\shell\Read\command", "", "REG_SZ", """" & @ProgramFilesDir & "\Adobe\Acrobat 7.0\Reader\AcroRd32.exe""" & " ""%1""") EndIf EndIf ; Checks for the Acrobat Reader 8 executable. Removes Updater keys from all users and writes it to HKLM If FileExists(@ProgramFilesDir & "\Adobe\Reader 8.0\Reader\AcroRd32.exe") Then ; Delete Registration and EULA from Users RegDeleteAllUsers("\Software\Adobe\Acrobat Reader\8.0\AdobeViewer", "EULA") RegDeleteAllUsers("\Software\Adobe\Acrobat Reader\8.0\AdobeViewer", "Launched") RegDeleteAllUsers("\Software\Adobe\Acrobat Reader\8.0\Downtown", "bDontShowAtLaunch") FileDeleteAllUsers("\Local Settings\Application Data\Adobe\Updater5\AdobeUpdaterPrefs.dat", 15) ; Write Updater and EULA to HKLM FileCopyAllUsers("AdobeUpdaterPrefs.dat", "\Local Settings\Application Data\Adobe\Updater5\AdobeUpdaterPrefs.dat", 9, 3) RegWrite("HKLM\Software\Adobe\Acrobat Reader\8.0\AdobeViewer", "EULA", "REG_DWORD", "1") RegWrite("HKLM\Software\Adobe\Acrobat Reader\8.0\AdobeViewer", "Launched", "REG_DWORD", "1") RegWrite("HKLM\Software\Adobe\Acrobat Reader\8.0\Downtown", "bDontShowAtLaunch", "REG_DWORD", "1") ; Sets the default file association for pdf files to reader. If $writer = True Then RegWrite("HKCR\.pdf", "", "REG_SZ", "AcroExch.Document") RegWrite("HKCR\.pdf", "Content Type", "REG_SZ", "application/pdf") RegWrite("HKCR\AcroExch.Document", "", "REG_SZ", "Adobe Acrobat Document") RegWrite("HKCR\AcroExch.Document\CurVer", "", "REG_SZ", "AcroExch.document.7") RegWrite("HKCR\AcroExch.document.7\shell", "", "REG_SZ", "Read") RegWrite("HKCR\AcroExch.document.7\shell\Read", "", "REG_SZ", "Open with Adobe Reader 8") RegWrite("HKCR\AcroExch.document.7\shell\Read\command", "", "REG_SZ", """" & @ProgramFilesDir & "\Adobe\Reader 8.0\Reader\AcroRd32.exe""" & " ""%1""") EndIf EndIf Link to comment Share on other sites More sharing options...
GrowBigTrees Posted May 21, 2009 Share Posted May 21, 2009 Hi, thanks for your FileCopyAllUsers UDF! I use it for updating Quicklaunch shortcuts in every users' profile. It needs some updating though for Vista and Windows7, where the AllUsersprofile is apparently in C:\Programdata instead of together with other users's profile ... Somebody has perhaps already done this update? Link to comment Share on other sites More sharing options...
Zeeshan Posted May 26, 2009 Share Posted May 26, 2009 Thanks for this share i also make a site then i use your coding i also save your coding. Link to comment Share on other sites More sharing options...
James Posted May 26, 2009 Share Posted May 26, 2009 I've reported this topic to be moved to examples Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
blaze888 Posted June 6, 2009 Share Posted June 6, 2009 just what i need thanks for sharing the scripts.. i dont want any spywares hanging around in my computer.assurance vie Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now