02-25-04 04:35 PM
I have a cd with apache 2.0.47 on it with php and perl, and it run
fine under 2k and up. but i do have some sneaky triks i use
1. i set apache to use c:\wwwroot as document root, i put all the log,
and pit file in there too.
how o do this?
a vbscirpt, the copies the wwwroot folder from cd to the hd
here is the scitp:
Wscript.Echo "Files are now being copied..."
Dim FSO
Set FSO = CreateObject("Scripting.FileSystemObject")
FSO.CopyFolder "\server", "c:\server"
Dim o,d
Set oFs = CreateObject ("Scripting.FileSystemObject")
strFolder = "c:\server\apache"
set oDir = oFs.GetFolder(strFolder)
o=0: d=0
ScanAllSubDirs oDir
Sub ScanAllSubDirs (oFolder)
For each oFile in oFolder.files
DimReadOnly oFile
Next
For each oSubFolder in oFolder.subFolders
DimReadOnly oSubFolder
ScanAllSubDirs oSubFolder
Next
End sub
Sub DimReadOnly (ByRef objDat)
o=o+1
If objDat.Attributes MOD 2=1 then
objDat.Attributes = objDat.Attributes-1
d=d+1
End If
End Sub
Wscript.Echo "Installing Apache Services..."
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run("%SystemRoot%\system32\cmd.exe /k
c:\server\apache\bin\apache.exe -D SSL -k install")
WshShell.Run("c:\server\mysql\bin\mysqld-max-nt --install")
Wscript.Echo "Creating Schortcuts..."
Set Shell = CreateObject("WScript.Shell")
DesktopPath = Shell.SpecialFolders("Desktop")
Set link = Shell.CreateShortcut(DesktopPath & "\Start Apache.lnk")
link.Arguments = " -k start"
link.Description = "Start Apache"
link.HotKey = ""
link.IconLocation = "c:\server\apache\bin\apache.exe,0"
link.TargetPath = "c:\server\apache\bin\apache.exe"
link.WindowStyle = 1
link.WorkingDirectory = "c:\server\apache\bin"
link.Save
Set link2 = Shell.CreateShortcut(DesktopPath & "\Stop Apache.lnk")
link2.Arguments = "-k stop"
link2.Description = "Stop Apache"
link2.HotKey = ""
link2.IconLocation = "c:\server\apache\bin\apache.exe,0"
link2.TargetPath = "c:\server\apache\bin\apache.exe"
link2.WindowStyle = 1
link2.WorkingDirectory = "c:\server\apache\bin"
link2.Save
Set link3 = Shell.CreateShortcut(DesktopPath & "\restart Apache.lnk")
link3.Arguments = "-k restart"
link3.Description = "restart Apache"
link3.HotKey = ""
link3.IconLocation = "c:\server\apache\bin\apache.exe,0"
link3.TargetPath = "c:\server\apache\bin\apache.exe"
link3.WindowStyle = 1
link3.WorkingDirectory = "c:\server\apache\bin"
link3.Save
Wscript.Echo "Apache Has been installed!"
Wscript.Echo "Perl is installed to c:\server\perl\bin\perl.exe"
Wscript.Echo "Mysql is installed: root/nopassword"
as you ca see i also install my sql and oter programs
[ Post a follow-up to this message ]
|