Advertisement
4_2005-2006 Internet/ Browsers/ HTML #162909

Rounded Boxes

I don't know how much this script will really help anyone, but here it is. It displays boxes of content with rounded corners. The script works in all versions of IE and Netscape 4+. If you're interested, take a look, and don't forget to VOTE FOR THIS SCRIPT! Thanks.

AI

AI-sammanfattning: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

Källkod
original-source
'<pre>
' Purpose: Create a network share for NT users. You will
' need to have correct permissions to do this and it can be
' done to remote computers.
' We pass in the folder name, path of the folder and 
' description of the share folder.
Private Sub CreateShare(strShareName, strPath, strDescription) 
	Dim objSWbemServices as object 
	Dim objSWbemObject as object  
	Dim colSWbemObject as object 
 Dim intRet as integer 
 Dim blnExists as boolean 
 Dim objSWbem as object 
 ' Next we call the standard GetObject function for 
 ' returning COM objects and pass it the connection 
 ' string for connecting to the WMI.
 objSWbemServices = GetObject("winmgmts:\\.\root\cimv2") 
 ' This same line can be executed on a remote computer 
 ' with a differnt connection string like this:
 ' objSWbemServices = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
 
 ' Now we enumrate the Shares on the target computer and
 ' return it to a collection
 colSWbemObject = objSWbemServices.InstancesOf("Win32_Share") 
 ' Loop through each share on the machine to see if it already exists 
 	For each objSWbem in colSWbemObject 
 		If(objSWbem.name = strShareName)Then 
			blnShareExists = True 
			Exit For 
		Else   
			blnShareExists = False 
	 End If 
	Next 
	' if the share didn’t exist our Boolean will be false
	' and we can try to add it.
	If (blnShareExists = False)Then 
 	' Create the share 
 	' Now we need to get 
 		objSWbemObject = objSWbemServices.Get("Win32_Share") 
 		' Last we call the create passing our path, name,
 		' description and 10 is for max number of users 
 	intRet = objSWbemObject.Create(strPath, strShareName, , 10, strDescription) 
 Else 
 	msgbox("Folder aready shared") 
 End If 
End Sub
'</pre>

Upload
Originalkommentarer (3)
Återställd från Wayback Machine