Link to home
Start Free TrialLog in
Avatar of billmercer
billmercer

asked on

Changing a file's extension without annoying prompt.

When I rename a file in Explorer, I hate having to respond to the obnoxious "If you change a file name extension, the file may become unusable"  prompt. I often change file extensions, and I don't like being second-guessed by my OS. Is there a way to disable this prompt?
Avatar of sajuks
sajuks

In Eindows explorer Go to Tools>Folder Options>View
put a checkmark in Hide File Extensions for Known File Types.
See if the problem still persists
Hi Billmercer,

I found the following information on the web.  Hope it helps... Calguy.

Disclaimer: Modifying the registry can cause serious problems that may require you to reinstall your operating system. We cannot guarantee that problems resulting from modifications to the registry can be solved. Use the information provided at your own risk.

To Disable Windows File Protection (Windows 2000/XP):

Windows 2000 and XP include a feature called Windows File Protection (WFP), part of the System File Checker, which is intended to avoid some of the common DLL consistency issues.

*** This feature may also block valid attempts to change system files and it can therefore be disabled using this tweak.

Open your registry and find the key below.
Change the value of "SFCDisable" to equal "ffffff9d" to disable WFS or "0" to enable it. The other valid hexadecimal values are:


1 - disabled, prompt at boot to re-enable
2 - disabled at next boot only, no prompt to re-enable
4 - enabled, with popups disabled
ffffff9d - for completely disabled
Restart Windows for the change to take effect.

Additional Steps for Windows 2000 Service Pack 2 and Windows XP
This setting is disabled in Windows 2000 SP2 and Windows XP, and needs to re-enabled using a hex editor and changing SFC.DLL (or SFC_OS.DLL for Windows XP) following these instructions:

Windows 2000 SP2

Make a backup the SFC.DLL in the C:\WINNT\SYSTEM32 directory.
Make an additional copy of SFC.DLL called SFC1.DLL and open it in a hex editor.
At offset 00006211 (6211h) you should find the values "8B" and "C6". Do not continue if you are unable to find these values.
Change the values "8B C6" to read "90 90" and save the changes.
Run these commands to update the system files:
copy c:\winnt\system32\sfc1.dll c:\winnt\system32\sfc.dll /y
copy c:\winnt\system32\sfc1.dll c:\winnt\system32\dllcache\sfc.dll /y

If you are prompted to insert the Windows CD, click Cancel.
Restart Windows for the change to take effect.
Windows XP

Make a backup the SFC_OS.DLL in the C:\WINDOWS\SYSTEM32 directory.
Make an additional copy of SFC_OS.DLL called SFC_OS1.DLL and open it in a hex editor.
Windows XP (no Service Pack)
At offset 0000E2B8 (0E2B8h) you should find the values "8B" and "C6".
Windows XP (Service Pack 1)
At offset 0000E3BB (0E3BBh) you should find the values "8B" and "C6".
Do not continue if you are unable to find these values.
Change the values "8B C6" to read "90 90" and save the changes.
Run these commands to update the system files:
copy c:\windows\system32\sfc_os1.dll c:\windows\system32\sfc_os.dll /y
copy c:\windows\system32\sfc_os1.dll c:\windows\system32\dllcache\sfc_os.dll /y

If you are prompted to insert the Windows CD, click Cancel.
Restart Windows for the change to take effect.
Once these files have been updated apply the registry setting above.

Note: You must manually modify the operating system files using a hex editor to allow this tweak to disable SFC on Windows 2000 (SP1+) or Windows XP.

     
  (Default) REG_SZ (value not set)  
  SFCDisable REG_DWORD 0xffffff9d (4294967197)  
 
 HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVers...  
 
Registry Settings
System Key: [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]
Value Name: SFCDisable
Data Type: REG_DWORD (DWORD Value)
Value Data: 0 = enabled (default), ffffff9d = disabled
 
Disclaimer: Modifying the registry can cause serious problems that may require you to reinstall your operating system. We cannot guarantee that problems resulting from modifications to the registry can be solved. Use the information provided at your own risk.

Avatar of billmercer

ASKER

Sajuks, thanks for your response, however it doesn't really address the problem. I don't want to hide the extensions, I want to see them, and be able to change them.

Calguy, I will give your suggestion a try, though it makes me nervous to disable SFC just for this convenience.
I'd really like to just disable the prompt without changing anything else.


>>>When I rename a file in Explorer, I hate having to respond to the obnoxious "If you change a file name extension, the file may become unusable"  prompt. I often change file extensions, and I don't like being second-guessed by my OS. Is there a way to disable this prompt?

One second...i would like to say something....Do you see the Extension when you change the file name ? If not then first goto Folder Options > View Tab > and untick "Hide Extension for Known file types" click Apply and Ok. Now you try to change the file name.

are the files registered with a known opener ? like the way txt files are opened with notepad.in the same way try registering the extns that u r modifying to open with a known application.
ASKER CERTIFIED SOLUTION
Avatar of spiderfix
spiderfix
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Does renaming them from the command prompt using REN do the same thing to you?

No, and if I have to do a lot of renaming, I usually use a command prompt or a third-party utility.
I'm just annoyed that I can't rename files from within Explorer without this stupid and useless prompt.
Spiderfix, can you give me a reference for the shell32.dll thing?
I'd love to billmercer but I didn't read that one, it's from memory.

All caution errors come from the operating system (Windows) and Microsoft has always compiled them
in the shell32.dll. I just decompiled (chill M$) the shell32.dll and here is the source for the caution rename
popup...

1115 DIALOGEX 0, 0, 240, 40
STYLE DS_FIXEDSYS | DS_MODALFRAME | DS_NOIDLEMSG | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Rename Warning!"
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
FONT 8, "MS Shell Dlg"
{
   CONTROL 32516, 8193, STATIC, SS_ICON | WS_CHILD | WS_VISIBLE, 5, 5, 21, 20
   CONTROL "", 8192, STATIC, SS_LEFT | WS_CHILD | WS_VISIBLE | WS_GROUP, 35, 5, 195, 8
   CONTROL "&In the future, do not show me this dialog box.", 4610, BUTTON, BS_AUTOCHECKBOX | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 35, 5, 195, 10
   CONTROL "&Yes", 6, BUTTON, BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 95, 20, 50, 14
   CONTROL "&No", 7, BUTTON, BS_DEFPUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 150, 20, 50, 14
}
The nest I posted may make you ask more questions because you see the "opt out" option there, so
I'll take a stab at explaining why that is...

...even though the original box had an "opt out" radio button checkmark obviously M$ took that option
out and the calls go into other libraries to end up showing you what you see on the rename warning
box.

What I posted would be the main call for the rename popup. That is the beauty of dynamic link libraries
and how they function. There will be common ground in a library that another process (or task call) uses,
so why bother rewriting code you've already written when you can make is a *.dll. The *.dll may have
a nest in the code that is a common call that many other processes (or task calls) use, so when the
common code is a nest in a dynamic library that nest is sitting in memory because this is the essence
of libraries is that they have the ability to "share" a snippet they contain.

So I can write a library and keep it much smaller by putting a snippet in it that calls a nest sitting in
memory from another library.

So although the rename nest I posted is the main call...the entire process you see on your desktop
(the rename caution warning popup) is the result of gathered nests (or snippets) from other libraries
sitting in memory.

Where all the other snippets lay and within which *.dll(s) they come from is something someone would
have to put in a couple of hours to gather all that info. I'd love to show you but I can't justify the two hours
in the process explorer and the debugger.

You could pay a programmer to write you a library that interacts with the M$ libraries and offers you
the original "opt out" checkbox or something like that. Maybe some mouse-click code in a library to
click the OK button on the rename popup a millisecond after it pops up is also possible. I doubt you'd
want to pay that kind of fee to dump a default warning box though.

I suppose you could also write a script with a robot mouse clicker call in there and use a command prompt
to prompt you for paths to file names you want to rename the extension on. Again [though] you'd either
have to write that script yourself or pay a script writer to code it all up for you...so your in a position
of paying someone a pretty high rate for the script. It's way cheaper to click the OK button yourself. ;)

I hope I made sense out of all that. Sometimes I can't explain things on paper the way I think them out.
Six bazillion registry keys, but the one I want doesn't exist. Oh well, such is life.


>>Six bazillion registry keys, but the one I want doesn't exist<<

You think that's bad...Longhorn has no regedit or registry. My goodness, what was Microsoft thinking when they
decided to implement that? Until I see the finished release (2007...2008) I am holding off bashing that O/S for now.
I wasn't that impressed when I played with one of the Longhorn alpha builds, it was still having some memory issues at that time.
Hmm, that could be a good thing, depending on what they're replacing it with. Personally, I like text files for configuration.

Maybe they're going back to using .ini files, lol.