Three ways to disable the FileSystemObject component

  

As we all know, the power and destructiveness of the FileSystemObject component is why it has been disabled by free homepage providers (those supporting ASP). I sorted it out and found only two methods. Later, when I was stimulated by someone, I thought of a third way that I didn't know. Oh, I don't know if it is like this.

First: Log out of the component with RegSrv32 /u C:\\WINDOWS\\SYSTEM\\scrrun.dll (win98 path). This method is too vicious, belongs to the same method, everyone has no use, is the next move

Second: modify the value of Progid, the way to call components in ASP is usually Set object name = Server. CreateObject ("Progid"), at this point we can modify the Progid value in the registry to reach the way to disable the component. Type regedit in Start-Run and then find HKEY_CLASSES_ROO T\\Scripting.FileSystemObject. At this point we can change the value of the Progid, such as Scripting.FileSystemObject8. This is called in the ASP page:

<%@ Language=Vbscript%> <% Set Fs=Server.CreateObject("Scripting.FileSystemObject8") %>

(If you have not called this component before, you can see the effect without restarting, otherwise please check the effect after restarting.)

At this time, let's take a look at the original calling method. Result:

<%@ Language=Vbscript%> <% Set Fs=Server.CreateObject("Scripting.FileSystemObject") %>

The result of this operation is : Server Object Error 'ASP 0177 : 800401f3'

Server.CreateObject Failed

/aspimage/testfile2.asp, Line 3

800401f3

(OK , to meet our requirements)

This method because I was two steps late, the results let others rush to answer, which greatly stimulated me, the result is a third method.

The third type: careful masters will think, since the component can be disabled by modifying the Progid value, can Clsid also be modified? (OK, you want to be like me) We know that in addition to the CreateObject method, you can also use the general <object> annotation to create a component. We can use HTM L's <object> annotation in ASP to make it available on the webpage. Add a component to it. The method is:

<object runat=server id=fs1 scope=page progid="Scripting.FileSystemObject"></object>

Runat indicates that it is executed on the server side. Scope represents the life cycle of the component. You can use Session, Appl ication or page (for the current page, or default).

This kind of writing is useless to us. Another way to write it is:

<object runat=server id=fs1 scope=page classid="clsid:clsid value"></object>

We can also disable the component by modifying the value of Clsid For example, change the value of HKEY_CLASSES_RO OT\\Scripting.FileSystemObject\\CLSID in the registry to 0D43FE01-F093-11CF-8940-00A0C90 54228 to 0D43FE01-F093-11CF-8940-00A0C9054229 (change the last bit), this time For:

<object runat=server id=fs1 scope=page classid="clsid:0D43FE01-F093-11CF-8940-00A0C9054229"></object>

Run the result, no problem, OK. At this time, we use

<object runat=server id=fs1 scope=page classid="clsid:0D43FE01-F093-11CF-8940-00A0C9054228"></object>

This time an error occurred.

Copyright © Windows knowledge All Rights Reserved