Zydecode Studio

Archive for the 'Windows' Category

PNG2SWF batch file

Wednesday, October 18th, 2006

Option Explicit
 
Dim fso: Set fso = CreateObject(”Scripting.FileSystemObject”)
Dim CurrentFolder: Set CurrentFolder = fso.GetFolder(”.\png”)
Dim WShell: Set WShell = WScript.CreateObject(”WScript.Shell”)
 
Dim Files: Set Files = CurrentFolder.Files
Dim File
Dim fileName
Dim objFile
Dim str
 
For Each File In Files
Set objFile = fso.GetFile(File)
fileName = fso.GetBaseName(objFile)
 
str = “C:\progra~1\swftools\png2swf.exe -X 540 -Y 360 [...]

Apache MSI installer

Thursday, September 21st, 2006

if the installer just bails on the initial screen, make sure that the computer has a domain set up in the networking dialog. This is used to auto-configure the install of Apache, and looks like there is no detection other than failure during the installation process.

FTP script for Windows batch file

Saturday, August 5th, 2006

REM set file name by today’s date - %ftpFile% format will be “FTP-2004-03-25.txt” SetLocal
FOR /F “tokens=2-4 delims=/ ” %%i in (’DATE/T’) do SET ftpStr=FTP-%%k-%%i-%%j
echo %ftpFile% if NOT exist C:\FTP\%ftpStr% EXIT
(echo open 10.0.9.5
echo ftp_user
echo ftp_password
echo put C:\FTP\%ftpStr%.txt inbound/%ftpStr%.txt
echo quit)>myFTP.txt ftp -s:myFTP.txt del myFTP.txt echo %ftpStr%.txt uploaded: %Date% %Time%>>ftp.log
exit

Open Windows Explorer in non-default drive

Sunday, October 23rd, 2005

How to stop Windows opening Windows Explorer in the default “My Documents” folder, which is bloody annoying if you don’t use My Documents..
C:\WINNT\explorer.exe /e,E:\

permissions for IIS - ODBC

Sunday, October 16th, 2005

how to set permissions for IIS - ODBC
had problems with IUSR not having permissions for access DB
took me ages to solve - turns out IUSR needs read/write/delete permissions for C:\WINNT directory (not execute).
Also - use MDAC 2.5 as it has Jet 4 drivers in it…

repair or re-create MBR

Sunday, October 16th, 2005

The simplest way to repair or re-create MBR is to run Microsoft’s standard utility called FDISK with a parameter /MBR, like
A:\> FDISK.EXE /MBR
FDISK is a standard utility included in MS-DOS, Windows 95, 98, ME.
If you have Windows NT / 2000 / XP, you can boot from startup floppy disks or CD-ROM, choose repair option during [...]

remove the FreeBSD boot manager

Sunday, October 16th, 2005

The quick way to remove the FreeBSD boot manager and restore a standard MBR is:
# boot0cfg -B -b /boot/mbr ad0