Jump to content

Importing Reg Key causes infinite loop.


Recommended Posts

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_UseUpx=n
#AutoIt3Wrapper_UseX64=n
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
 

#RequireAdmin

RunWait("regedit /s" & CHR(34) & @ScriptDir & "cleanmgr.reg" & CHR(34))
RunWait("cleanmgr sagerun:7")

--------------------------

That is the script. It should import a reg file and then run disk cleanup. All that happens is it runs the regedit line over and over and over again (400+ times before I was able to kill it.)

Any idea why this is happening? Shouldn't it import the keys and then launch cleanmgr?

Link to comment
Share on other sites

hello, welcome to AutoIt and to the forum!

your script is not called by any chance "regedit.au3", right?

b.t.w i think you miss a white space after the /s switch. like this (and do use the "Code" tag when posting a code to the forum - it's the A-shaped icon in the toolbar):

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_UseUpx=n
#AutoIt3Wrapper_UseX64=n
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
 
#RequireAdmin
 
RunWait("regedit /s " & CHR(34) & @ScriptDir & "\cleanmgr.reg" & CHR(34))
RunWait("cleanmgr sagerun:7")

Signature - my forum contributions:

Spoiler

UDF:

LFN - support for long file names (over 260 characters)

InputImpose - impose valid characters in an input control

TimeConvert - convert UTC to/from local time and/or reformat the string representation

AMF - accept multiple files from Windows Explorer context menu

DateDuration -  literal description of the difference between given dates

Apps:

Touch - set the "modified" timestamp of a file to current time

Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes

SPDiff - Single-Pane Text Diff

 

Link to comment
Share on other sites

 

hello, welcome to AutoIt and to the forum!

your script is not called by any chance "regedit.au3", right?

b.t.w i think you miss a white space after the /s switch. like this (and do use the "Code" tag when posting a code to the forum - it's the A-shaped icon in the toolbar):

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_UseUpx=n
#AutoIt3Wrapper_UseX64=n
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
 
#RequireAdmin
 
RunWait("regedit /s " & CHR(34) & @ScriptDir & "\cleanmgr.reg" & CHR(34))
RunWait("cleanmgr sagerun:7")

 

Thank you! I added the S after pasting in the text. That was the original line but I took it out to test to see if the line was actually working. It is not called regedit (I remember running into that with a bat file a long time ago haha. Good times. :))

Currently, this is what it looks like for testing. I will add the silent switch afterwards.

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_UseUpx=n
#AutoIt3Wrapper_UseX64=n
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#RequireAdmin

RunWait("regedit " & CHR(34) & @ScriptDir & "\cleanmgr.reg" & CHR(34))
RunWait("cleanmgr sagerun:7")

I get the prompt warnings for importing a reg file and when I hit ok it just does it over and over and over again.

Link to comment
Share on other sites

it must be something incredibly silly, but i can't put my finger on it. let's take the hard way: care to post the content of cleanmgr.reg ?

also, what OS / architecture / user account / other relevant details for reproducing ?

Signature - my forum contributions:

Spoiler

UDF:

LFN - support for long file names (over 260 characters)

InputImpose - impose valid characters in an input control

TimeConvert - convert UTC to/from local time and/or reformat the string representation

AMF - accept multiple files from Windows Explorer context menu

DateDuration -  literal description of the difference between given dates

Apps:

Touch - set the "modified" timestamp of a file to current time

Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes

SPDiff - Single-Pane Text Diff

 

Link to comment
Share on other sites

it must be something incredibly silly, but i can't put my finger on it. let's take the hard way: care to post the content of cleanmgr.reg ?

 

also, what OS / architecture / user account / other relevant details for reproducing ?

 

W7/x64/Primary which has install rights/ The changes are to a 64 bit OS but the script is in x86. Not sure if that would cause this problem (it hasn't in the past.)

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Active Setup Temp Folders]
@="{C0E13E61-0CC6-11d1-BBB6-0060978B2AE6}"
"Folder"="C:\\Windows\\msdownld.tmp|?:\\msdownld.tmp"
"Flags"=hex:7c,00,00,00
"LastAccess"=hex:02,00,00,00
"FileList"="*.tmp"
"Description"="These files should no longer be needed. They were originally created by a setup program that is no longer running."
"Priority"=hex:64,00,00,00
"Display"="Temporary Setup Files"
"StateFlags0007"=dword:00000002
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Content Indexer Cleaner]
@="{A9B48EAC-3ED8-11d2-8216-00C04FB687DA}"
"Flags"=dword:00000141
"Folder"="?:\\Catalog.wci"
"PropertyBag"="{24400D16-5754-11d2-8218-00C04FB687DA}"
"FileList"="*.*"
"Priority"=dword:0000012c
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Downloaded Program Files]
@="{8369AB20-56C9-11D0-94E8-00AA0059CE02}"
"AdvancedButtonText"="@C:\\Windows\\System32\\occache.dll,-1072"
"Description"="@C:\\Windows\\System32\\occache.dll,-1071"
"Priority"=hex:64,00,00,00
"Display"="@C:\\Windows\\System32\\occache.dll,-1070"
"StateFlags0007"=dword:00000002
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\GameNewsFiles]
@="{06EEE695-542D-46F6-AEAB-FA2F1B2102D3}"
"IconPath"="C:\\Windows\\System32\\gameux.dll,-203"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\GameStatisticsFiles]
@="{06EEE695-542D-46F6-AEAB-FA2F1B2102D3}"
"IconPath"="C:\\Windows\\System32\\gameux.dll,-203"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\GameUpdateFiles]
@="{06EEE695-542D-46F6-AEAB-FA2F1B2102D3}"
"IconPath"="C:\\Windows\\System32\\gameux.dll,-203"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Internet Cache Files]
@="{9B0EFD60-F7B0-11D0-BAEF-00C04FC308C9}"
"AdvancedButtonText"="&View Files"
"Description"="The Temporary Internet Files folder contains Web pages stored on your hard disk for quick viewing. Your personalized settings for Web pages will be left intact."
"Priority"=dword:00000064
"Display"="Temporary Internet Files"
"StateFlags0007"=dword:00000002
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Memory Dump Files]
@="{C0E13E61-0CC6-11d1-BBB6-0060978B2AE6}"
"Flags"=dword:00000020
"Folder"=hex(2):25,00,57,00,49,00,4e,00,44,00,49,00,52,00,25,00,00,00
"LastAccess"=dword:0000001e
"FileList"="*.dmp"
"Description"="Files created by Windows"
"Display"="Debug Dump Files"
"StateFlags0007"=dword:00000002
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Offline Pages Files]
@="{8E6E6079-0CB7-11d2-8F10-0000F87ABD16}"
"AdvancedButtonText"="&View Pages"
"Description"="Offline pages are Web pages that are stored on your computer so you can view them without being connected to the Internet.  If you delete these pages now, you can still view your favorites offline later by synchronizing them.  Your personalized settings for Web pages will be left intact."
"Priority"=dword:00000064
"Display"="Offline Web Pages"
"StateFlags0007"=dword:00000002
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Old ChkDsk Files]
@="{C0E13E61-0CC6-11d1-BBB6-0060978B2AE6}"
"IconPath"=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,\
  74,00,25,00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,44,\
  00,41,00,54,00,41,00,43,00,4c,00,45,00,4e,00,2e,00,44,00,4c,00,4c,00,2c,00,\
  33,00,00,00
"Flags"=dword:00000120
"Folder"="?:\\FOUND.000|?:\\FOUND.001|?:\\FOUND.002|?:\\FOUND.003|?:\\FOUND.004|?:\\FOUND.005|?:\\FOUND.006|?:\\FOUND.007|?:\\FOUND.008|?:\\FOUND.009"
"PropertyBag"="{60F6E464-4DEF-11d2-B2D9-00C04F8EEC8C}"
"FileList"="*.CHK"
"StateFlags0007"=dword:00000002
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Previous Installations]
@="{84e04a55-2d42-4909-86e3-62fd11483e8b}"
"IconPath"=hex(2):25,00,73,00,79,00,73,00,74,00,65,00,6d,00,72,00,6f,00,6f,00,\
  74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,73,\
  00,65,00,74,00,75,00,70,00,63,00,6c,00,6e,00,2e,00,64,00,6c,00,6c,00,2c,00,\
  30,00,00,00
"Description"=hex(2):40,00,25,00,73,00,79,00,73,00,74,00,65,00,6d,00,72,00,6f,\
  00,6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,\
  5c,00,73,00,65,00,74,00,75,00,70,00,63,00,6c,00,6e,00,2e,00,64,00,6c,00,6c,\
  00,2c,00,2d,00,31,00,30,00,30,00,33,00,00,00
"Display"=hex(2):40,00,25,00,73,00,79,00,73,00,74,00,65,00,6d,00,72,00,6f,00,\
  6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,\
  00,73,00,65,00,74,00,75,00,70,00,63,00,6c,00,6e,00,2e,00,64,00,6c,00,6c,00,\
  2c,00,2d,00,31,00,30,00,30,00,32,00,00,00
"SetupPrevInst"=dword:00000001
"StateFlags0007"=dword:00000002
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Recycle Bin]
@="{5ef4af3a-f726-11d0-b8a2-00c04fc309a4}"
"StateFlags0007"=dword:00000002
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Service Pack Cleanup]
@="{E3A9BD50-51AE-410f-9706-0BA0D68B9A94}"
"IconPath"=hex(2):25,00,73,00,79,00,73,00,74,00,65,00,6d,00,72,00,6f,00,6f,00,\
  74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,73,\
  00,63,00,61,00,76,00,65,00,6e,00,67,00,65,00,75,00,69,00,2e,00,64,00,6c,00,\
  6c,00,2c,00,30,00,00,00
"Description"=hex(2):40,00,25,00,73,00,79,00,73,00,74,00,65,00,6d,00,72,00,6f,\
  00,6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,\
  5c,00,73,00,63,00,61,00,76,00,65,00,6e,00,67,00,65,00,75,00,69,00,2e,00,64,\
  00,6c,00,6c,00,2c,00,2d,00,31,00,30,00,30,00,31,00,00,00
"Display"=hex(2):40,00,25,00,73,00,79,00,73,00,74,00,65,00,6d,00,72,00,6f,00,\
  6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,\
  00,73,00,63,00,61,00,76,00,65,00,6e,00,67,00,65,00,75,00,69,00,2e,00,64,00,\
  6c,00,6c,00,2c,00,2d,00,31,00,30,00,30,00,30,00,00,00
"StateFlags0007"=dword:00000002
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Setup Log Files]
@="{C0E13E61-0CC6-11d1-BBB6-0060978B2AE6}"
"Flags"=dword:00000020
"Folder"=hex(2):25,00,57,00,49,00,4e,00,44,00,49,00,52,00,25,00,00,00
"LastAccess"=dword:0000001e
"FileList"="setup*.log|setup*.old|setuplog.txt|winnt32.log"
"Description"=hex(2):40,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,\
  00,6f,00,74,00,25,00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,\
  5c,00,44,00,41,00,54,00,41,00,43,00,4c,00,45,00,4e,00,2e,00,44,00,4c,00,4c,\
  00,2c,00,2d,00,31,00,30,00,31,00,31,00,00,00
"Display"=hex(2):40,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,\
  6f,00,74,00,25,00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,\
  00,44,00,41,00,54,00,41,00,43,00,4c,00,45,00,4e,00,2e,00,44,00,4c,00,4c,00,\
  2c,00,2d,00,31,00,30,00,31,00,30,00,00,00
"StateFlags0007"=dword:00000000
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\System error memory dump files]
@="{C0E13E61-0CC6-11d1-BBB6-0060978B2AE6}"
"FileList"="*.dmp"
"Flags"=dword:0000007d
"Folder"=hex(2):25,00,57,00,49,00,4e,00,44,00,49,00,52,00,25,00,00,00
"IconPath"=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,\
  74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,77,\
  00,65,00,72,00,2e,00,64,00,6c,00,6c,00,2c,00,30,00,00,00
"Display"=hex(2):40,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,\
  6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,\
  00,77,00,65,00,72,00,66,00,61,00,75,00,6c,00,74,00,2e,00,65,00,78,00,65,00,\
  2c,00,2d,00,31,00,30,00,30,00,00,00
"Description"=hex(2):40,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,\
  00,6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,\
  5c,00,77,00,65,00,72,00,66,00,61,00,75,00,6c,00,74,00,2e,00,65,00,78,00,65,\
  00,2c,00,2d,00,31,00,30,00,31,00,00,00
"StateFlags0007"=dword:00000002
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\System error minidump files]
@="{C0E13E61-0CC6-11d1-BBB6-0060978B2AE6}"
"FileList"="*.dmp"
"Flags"=dword:0000007d
"Folder"=hex(2):25,00,57,00,49,00,4e,00,44,00,49,00,52,00,25,00,5c,00,4d,00,69,\
  00,6e,00,69,00,64,00,75,00,6d,00,70,00,00,00
"IconPath"=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,\
  74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,77,\
  00,65,00,72,00,2e,00,64,00,6c,00,6c,00,2c,00,30,00,00,00
"Display"=hex(2):40,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,\
  6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,\
  00,77,00,65,00,72,00,66,00,61,00,75,00,6c,00,74,00,2e,00,65,00,78,00,65,00,\
  2c,00,2d,00,31,00,30,00,32,00,00,00
"Description"=hex(2):40,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,\
  00,6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,\
  5c,00,77,00,65,00,72,00,66,00,61,00,75,00,6c,00,74,00,2e,00,65,00,78,00,65,\
  00,2c,00,2d,00,31,00,30,00,33,00,00,00
"StateFlags0007"=dword:00000002
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Temporary Files]
@="{C0E13E61-0CC6-11d1-BBB6-0060978B2AE6}"
"PropertyBag"="{60F6E465-4DEF-11d2-B2D9-00C04F8EEC8C}"
"Flags"=dword:00000041
"Folder"=hex(2):25,00,54,00,45,00,4d,00,50,00,25,00,00,00
"LastAccess"=dword:00000007
"FileList"="*.*"
"StateFlags0007"=dword:00000002
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Temporary Setup Files]
@="{84e04a55-2d42-4909-86e3-62fd11483e8b}"
"IconPath"=hex(2):25,00,73,00,79,00,73,00,74,00,65,00,6d,00,72,00,6f,00,6f,00,\
  74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,73,\
  00,65,00,74,00,75,00,70,00,63,00,6c,00,6e,00,2e,00,64,00,6c,00,6c,00,2c,00,\
  30,00,00,00
"Description"=hex(2):40,00,25,00,73,00,79,00,73,00,74,00,65,00,6d,00,72,00,6f,\
  00,6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,\
  5c,00,73,00,65,00,74,00,75,00,70,00,63,00,6c,00,6e,00,2e,00,64,00,6c,00,6c,\
  00,2c,00,2d,00,31,00,30,00,30,00,31,00,00,00
"SetupDirectories"="$Windows.~BT;$Windows.~LS"
"Display"=hex(2):40,00,25,00,73,00,79,00,73,00,74,00,65,00,6d,00,72,00,6f,00,\
  6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,\
  00,73,00,65,00,74,00,75,00,70,00,63,00,6c,00,6e,00,2e,00,64,00,6c,00,6c,00,\
  2c,00,2d,00,31,00,30,00,30,00,30,00,00,00
"StateFlags0007"=dword:00000002
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Temporary Sync Files]
@="{E96F5460-09CE-4f46-88B1-F4B6B4A8E252}"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Thumbnail Cache]
@="{889900c3-59f3-4c2f-ae21-a409ea01e605}"
"StateFlags0007"=dword:00000000
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Update Cleanup]
@="{C1A6713B-F5BA-4340-BFE5-07DA0ED49A27}"
"IconPath"=hex(2):25,00,73,00,79,00,73,00,74,00,65,00,6d,00,72,00,6f,00,6f,00,\
  74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,73,\
  00,63,00,61,00,76,00,65,00,6e,00,67,00,65,00,75,00,69,00,2e,00,64,00,6c,00,\
  6c,00,2c,00,30,00,00,00
"Description"=hex(2):40,00,25,00,73,00,79,00,73,00,74,00,65,00,6d,00,72,00,6f,\
  00,6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,\
  5c,00,73,00,63,00,61,00,76,00,65,00,6e,00,67,00,65,00,75,00,69,00,2e,00,64,\
  00,6c,00,6c,00,2c,00,2d,00,31,00,30,00,30,00,33,00,00,00
"Display"=hex(2):40,00,25,00,73,00,79,00,73,00,74,00,65,00,6d,00,72,00,6f,00,\
  6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,\
  00,73,00,63,00,61,00,76,00,65,00,6e,00,67,00,65,00,75,00,69,00,2e,00,64,00,\
  6c,00,6c,00,2c,00,2d,00,31,00,30,00,30,00,32,00,00,00
"StateFlags0007"=dword:00000002
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Upgrade Discarded Files]
@="{84e04a55-2d42-4909-86e3-62fd11483e8b}"
"IconPath"=hex(2):25,00,73,00,79,00,73,00,74,00,65,00,6d,00,72,00,6f,00,6f,00,\
  74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,73,\
  00,65,00,74,00,75,00,70,00,63,00,6c,00,6e,00,2e,00,64,00,6c,00,6c,00,2c,00,\
  30,00,00,00
"Description"=hex(2):40,00,25,00,73,00,79,00,73,00,74,00,65,00,6d,00,72,00,6f,\
  00,6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,\
  5c,00,73,00,65,00,74,00,75,00,70,00,63,00,6c,00,6e,00,2e,00,64,00,6c,00,6c,\
  00,2c,00,2d,00,31,00,30,00,30,00,35,00,00,00
"SetupDirectories"="$WINDOWS.~Q;$INPLACE.~TR"
"Display"=hex(2):40,00,25,00,73,00,79,00,73,00,74,00,65,00,6d,00,72,00,6f,00,\
  6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,\
  00,73,00,65,00,74,00,75,00,70,00,63,00,6c,00,6e,00,2e,00,64,00,6c,00,6c,00,\
  2c,00,2d,00,31,00,30,00,30,00,34,00,00,00
"StateFlags0007"=dword:00000002
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Windows Error Reporting Archive Files]
@="{C0E13E61-0CC6-11d1-BBB6-0060978B2AE6}"
"FileList"="*.*"
"Flags"=dword:0000007d
"Folder"=hex(2):25,00,55,00,53,00,45,00,52,00,50,00,52,00,4f,00,46,00,49,00,4c,\
  00,45,00,25,00,5c,00,41,00,70,00,70,00,44,00,61,00,74,00,61,00,5c,00,4c,00,\
  6f,00,63,00,61,00,6c,00,5c,00,4d,00,69,00,63,00,72,00,6f,00,73,00,6f,00,66,\
  00,74,00,5c,00,57,00,69,00,6e,00,64,00,6f,00,77,00,73,00,5c,00,57,00,45,00,\
  52,00,5c,00,52,00,65,00,70,00,6f,00,72,00,74,00,41,00,72,00,63,00,68,00,69,\
  00,76,00,65,00,00,00
"IconPath"=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,\
  74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,77,\
  00,65,00,72,00,2e,00,64,00,6c,00,6c,00,2c,00,30,00,00,00
"Display"=hex(2):40,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,\
  6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,\
  00,77,00,65,00,72,00,2e,00,64,00,6c,00,6c,00,2c,00,2d,00,32,00,39,00,37,00,\
  00,00
"Description"=hex(2):40,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,\
  00,6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,\
  5c,00,77,00,65,00,72,00,2e,00,64,00,6c,00,6c,00,2c,00,2d,00,32,00,39,00,38,\
  00,00,00
"StateFlags0007"=dword:00000000
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Windows Error Reporting Queue Files]
@="{C0E13E61-0CC6-11d1-BBB6-0060978B2AE6}"
"FileList"="*.*"
"Flags"=dword:0000007d
"Folder"=hex(2):25,00,55,00,53,00,45,00,52,00,50,00,52,00,4f,00,46,00,49,00,4c,\
  00,45,00,25,00,5c,00,41,00,70,00,70,00,44,00,61,00,74,00,61,00,5c,00,4c,00,\
  6f,00,63,00,61,00,6c,00,5c,00,4d,00,69,00,63,00,72,00,6f,00,73,00,6f,00,66,\
  00,74,00,5c,00,57,00,69,00,6e,00,64,00,6f,00,77,00,73,00,5c,00,57,00,45,00,\
  52,00,5c,00,52,00,65,00,70,00,6f,00,72,00,74,00,51,00,75,00,65,00,75,00,65,\
  00,00,00
"IconPath"=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,\
  74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,77,\
  00,65,00,72,00,2e,00,64,00,6c,00,6c,00,2c,00,30,00,00,00
"Display"=hex(2):40,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,\
  6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,\
  00,77,00,65,00,72,00,2e,00,64,00,6c,00,6c,00,2c,00,2d,00,32,00,39,00,35,00,\
  00,00
"Description"=hex(2):40,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,\
  00,6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,\
  5c,00,77,00,65,00,72,00,2e,00,64,00,6c,00,6c,00,2c,00,2d,00,32,00,39,00,36,\
  00,00,00
"StateFlags0007"=dword:00000000
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Windows Error Reporting System Archive Files]
@="{C0E13E61-0CC6-11d1-BBB6-0060978B2AE6}"
"FileList"="*.*"
"Flags"=dword:0000007d
"Folder"=hex(2):25,00,41,00,4c,00,4c,00,55,00,53,00,45,00,52,00,53,00,50,00,52,\
  00,4f,00,46,00,49,00,4c,00,45,00,25,00,5c,00,4d,00,69,00,63,00,72,00,6f,00,\
  73,00,6f,00,66,00,74,00,5c,00,57,00,69,00,6e,00,64,00,6f,00,77,00,73,00,5c,\
  00,57,00,45,00,52,00,5c,00,52,00,65,00,70,00,6f,00,72,00,74,00,41,00,72,00,\
  63,00,68,00,69,00,76,00,65,00,00,00
"IconPath"=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,\
  74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,77,\
  00,65,00,72,00,2e,00,64,00,6c,00,6c,00,2c,00,30,00,00,00
"Display"=hex(2):40,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,\
  6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,\
  00,77,00,65,00,72,00,2e,00,64,00,6c,00,6c,00,2c,00,2d,00,33,00,30,00,31,00,\
  00,00
"Description"=hex(2):40,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,\
  00,6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,\
  5c,00,77,00,65,00,72,00,2e,00,64,00,6c,00,6c,00,2c,00,2d,00,33,00,30,00,32,\
  00,00,00
"StateFlags0007"=dword:00000000
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Windows Error Reporting System Queue Files]
@="{C0E13E61-0CC6-11d1-BBB6-0060978B2AE6}"
"FileList"="*.*"
"Flags"=dword:0000007d
"Folder"=hex(2):25,00,41,00,4c,00,4c,00,55,00,53,00,45,00,52,00,53,00,50,00,52,\
  00,4f,00,46,00,49,00,4c,00,45,00,25,00,5c,00,4d,00,69,00,63,00,72,00,6f,00,\
  73,00,6f,00,66,00,74,00,5c,00,57,00,69,00,6e,00,64,00,6f,00,77,00,73,00,5c,\
  00,57,00,45,00,52,00,5c,00,52,00,65,00,70,00,6f,00,72,00,74,00,51,00,75,00,\
  65,00,75,00,65,00,00,00
"IconPath"=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,\
  74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,77,\
  00,65,00,72,00,2e,00,64,00,6c,00,6c,00,2c,00,30,00,00,00
"Display"=hex(2):40,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,\
  6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,\
  00,77,00,65,00,72,00,2e,00,64,00,6c,00,6c,00,2c,00,2d,00,32,00,39,00,39,00,\
  00,00
"Description"=hex(2):40,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,\
  00,6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,\
  5c,00,77,00,65,00,72,00,2e,00,64,00,6c,00,6c,00,2c,00,2d,00,33,00,30,00,30,\
  00,00,00
"StateFlags0007"=dword:00000000
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Windows Upgrade Log Files]
@="{84e04a55-2d42-4909-86e3-62fd11483e8b}"
"IconPath"=hex(2):25,00,73,00,79,00,73,00,74,00,65,00,6d,00,72,00,6f,00,6f,00,\
  74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,73,\
  00,65,00,74,00,75,00,70,00,63,00,6c,00,6e,00,2e,00,64,00,6c,00,6c,00,2c,00,\
  30,00,00,00
"Description"=hex(2):40,00,25,00,73,00,79,00,73,00,74,00,65,00,6d,00,72,00,6f,\
  00,6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,\
  5c,00,73,00,65,00,74,00,75,00,70,00,63,00,6c,00,6e,00,2e,00,64,00,6c,00,6c,\
  00,2c,00,2d,00,31,00,30,00,30,00,37,00,00,00
"SetupDirectories"="Windows\\\\Panther"
"ValidIfUpgrade"=dword:00000001
"Display"=hex(2):40,00,25,00,73,00,79,00,73,00,74,00,65,00,6d,00,72,00,6f,00,\
  6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,\
  00,73,00,65,00,74,00,75,00,70,00,63,00,6c,00,6e,00,2e,00,64,00,6c,00,6c,00,\
  2c,00,2d,00,31,00,30,00,30,00,36,00,00,00
"StateFlags0007"=dword:00000000
 

After thought,

 

I believe I had a similar problem when I test the commands in a bat file. It looped and launched cmdprompt over and over and over again. I figured RunWait would stop that from happening but it looks like it didn't.

 

Basically, the reg file merges the StateFlags007 into the registy. Then cleanmgr /sagerun:7 runs Disk Manager with the configurations I set in the registry.

Edited by Melba23
Added code tags
Link to comment
Share on other sites

  • Moderators

hatemedude,

When you post code please use Code tags - see here how to do it. Then you get a scrolling box (and syntax colouring for AutoIt code) as you can see above now I have added the tags. ;)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

cannot reproduce - your script works for me. of course i must acknowledge the UAC first. you don't have your UAC disabled by any chance?

Signature - my forum contributions:

Spoiler

UDF:

LFN - support for long file names (over 260 characters)

InputImpose - impose valid characters in an input control

TimeConvert - convert UTC to/from local time and/or reformat the string representation

AMF - accept multiple files from Windows Explorer context menu

DateDuration -  literal description of the difference between given dates

Apps:

Touch - set the "modified" timestamp of a file to current time

Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes

SPDiff - Single-Pane Text Diff

 

Link to comment
Share on other sites

Well, I figured it out. I had thought that the infinite loop was a limitation of bat files. I was mistaken. The name of my exe was CleanMgr and I was calling CleanMgr.exe and that caused the loop. Once I changed the .exe to DiskClean it ran perfectly fine. I appreciate your time and sorry to have wasted over something so simple hehe.

<-- FNG to scripting. D:

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...