 |
 |
 |
 |
Registered: 05/13/08
Posts: 596
|
|
|
 |
 |
 |
 |
|
 |
 |
 |
 |
|
Express Hosting
"We are the official hosting company of UBB.threads. Ask us about our free migration services to migrate your UBB.threads installation."
|
|
|
 |
 |
 |
 |
 |
 |
 |
 |
#188075 - 06/21/07 07:45 PM
Re: Posted Code window size
[Re: ntdoc]
|
|
Registered: 11/09/06
Posts: 3384
|
|
Sample: Function DefaultAutoexecNT($Ext,$Bak)
If @INWIN=2 Exit 1 EndIf
Dim $File,$FileBackup,$WL
Dim $Handle,$OpenFile,$CloseFile
$File = '%SYSTEMROOT%\SYSTEM32\AUTOEXEC.'+$Ext
$FileBackup = '%SYSTEMROOT%\SYSTEM32\AUTOEXEC.'+$Bak
If Exist($FileBackup)
;Assumes a valid backup already exists so we will now create all new default file
Else
If Exist($File)
Move $File $FileBackup
If @ERROR Exit @ERROR EndIf
EndIf
EndIf
$WL='@echo off'+ @CRLF+
@CRLF+
'REM AUTOEXEC.BAT is not used to initialize the MS-DOS environment.'+@CRLF+
'REM AUTOEXEC.NT is used to initialize the MS-DOS environment unless a'+@CRLF+
'REM different startup file is specified in an application'+"'"+'s PIF.'+@CRLF+
@CRLF+
'REM Install CD ROM extensions'+@CRLF+
'lh %SystemRoot%\system32\mscdexnt.exe'+@CRLF+
@CRLF+
'REM Install network redirector (load before dosx.exe)'+@CRLF+
'lh %SystemRoot%\system32\redir'+@CRLF+
@CRLF+
'REM Install DPMI support'+@CRLF+
'lh %SystemRoot%\system32\dosx'+@CRLF+
@CRLF+
'REM The following line enables Sound Blaster 2.0 support on NTVDM.'+@CRLF+
'REM The command for setting the BLASTER environment is as follows:'+@CRLF+
'REM SET BLASTER=A220 I5 D1 P330'+@CRLF+
'REM where:'+@CRLF+
'REM A specifies the sound blaster'+"'"+'s base I/O port'+@CRLF+
'REM I specifies the interrupt request line'+@CRLF+
'REM D specifies the 8-bit DMA channel'+@CRLF+
'REM P specifies the MPU-401 base I/O port'+@CRLF+
'REM T specifies the type of sound blaster card'+@CRLF+
'REM 1 - Sound Blaster 1.5'+@CRLF+
'REM 2 - Sound Blaster Pro I'+@CRLF+
'REM 3 - Sound Blaster 2.0'+@CRLF+
'REM 4 - Sound Blaster Pro II'+@CRLF+
'REM 6 - SOund Blaster 16/AWE 32/32/64'+@CRLF+
'REM'+@CRLF+
'REM The default value is A220 I5 D1 T3 and P330. If any of the switches is'+@CRLF+
'REM left unspecified, the default value will be used. (NOTE, since all the'+@CRLF+
'REM ports are virtualized, the information provided here does not have to'+@CRLF+
'REM match the real hardware setting.) NTVDM supports Sound Blaster 2.0 only.'+@CRLF+
'REM The T switch must be set to 3, if specified.'+@CRLF+
'SET BLASTER=A220 I5 D1 P330 T3'+@CRLF+
@CRLF+
'REM To disable the sound blaster 2.0 support on NTVDM, specify an invalid'+@CRLF+
'REM SB base I/O port address. For example:'+@CRLF+
'REM SET BLASTER=A0'+@CRLF
$Handle = FreeFileHandle()
$OpenFile = Open($Handle, $File,5)
$WL = WriteLine($Handle,$WL + @CRLF)
$CloseFile = Close($Handle)
Exit @ERROR
EndFunction
|
|
Top
|
|
|
|
|
 |
 |
 |
 |
 |
 |
 |
 |
#188080 - 06/21/07 07:58 PM
Re: Posted Code window size
[Re: ntdoc]
|
Carpal Tunnel
|
Registered: 07/04/06
Posts: 4447
Loc: Liverpool : England : UK
|
|
The result is more pleasing in quote tags Function DefaultAutoexecNT($Ext,$Bak) If @INWIN=2 Exit 1 EndIf Dim $File,$FileBackup,$WL Dim $Handle,$OpenFile,$CloseFile $File = '%SYSTEMROOT%\SYSTEM32\AUTOEXEC.'+$Ext $FileBackup = '%SYSTEMROOT%\SYSTEM32\AUTOEXEC.'+$Bak If Exist($FileBackup) ;Assumes a valid backup already exists so we will now create all new default file Else If Exist($File) Move $File $FileBackup If @ERROR Exit @ERROR EndIf EndIf EndIf $WL='@echo off'+ @CRLF+ @CRLF+ 'REM AUTOEXEC.BAT is not used to initialize the MS-DOS environment.'+@CRLF+ 'REM AUTOEXEC.NT is used to initialize the MS-DOS environment unless a'+@CRLF+ 'REM different startup file is specified in an application'+"'"+'s PIF.'+@CRLF+ @CRLF+ 'REM Install CD ROM extensions'+@CRLF+ 'lh %SystemRoot%\system32\mscdexnt.exe'+@CRLF+ @CRLF+ 'REM Install network redirector (load before dosx.exe)'+@CRLF+ 'lh %SystemRoot%\system32\redir'+@CRLF+ @CRLF+ 'REM Install DPMI support'+@CRLF+ 'lh %SystemRoot%\system32\dosx'+@CRLF+ @CRLF+ 'REM The following line enables Sound Blaster 2.0 support on NTVDM.'+@CRLF+ 'REM The command for setting the BLASTER environment is as follows:'+@CRLF+ 'REM SET BLASTER=A220 I5 D1 P330'+@CRLF+ 'REM where:'+@CRLF+ 'REM A specifies the sound blaster'+"'"+'s base I/O port'+@CRLF+ 'REM I specifies the interrupt request line'+@CRLF+ 'REM D specifies the 8-bit DMA channel'+@CRLF+ 'REM P specifies the MPU-401 base I/O port'+@CRLF+ 'REM T specifies the type of sound blaster card'+@CRLF+ 'REM 1 - Sound Blaster 1.5'+@CRLF+ 'REM 2 - Sound Blaster Pro I'+@CRLF+ 'REM 3 - Sound Blaster 2.0'+@CRLF+ 'REM 4 - Sound Blaster Pro II'+@CRLF+ 'REM 6 - SOund Blaster 16/AWE 32/32/64'+@CRLF+ 'REM'+@CRLF+ 'REM The default value is A220 I5 D1 T3 and P330. If any of the switches is'+@CRLF+ 'REM left unspecified, the default value will be used. (NOTE, since all the'+@CRLF+ 'REM ports are virtualized, the information provided here does not have to'+@CRLF+ 'REM match the real hardware setting.) NTVDM supports Sound Blaster 2.0 only.'+@CRLF+ 'REM The T switch must be set to 3, if specified.'+@CRLF+ 'SET BLASTER=A220 I5 D1 P330 T3'+@CRLF+ @CRLF+ 'REM To disable the sound blaster 2.0 support on NTVDM, specify an invalid'+@CRLF+ 'REM SB base I/O port address. For example:'+@CRLF+ 'REM SET BLASTER=A0'+@CRLF $Handle = FreeFileHandle() $OpenFile = Open($Handle, $File,5) $WL = WriteLine($Handle,$WL + @CRLF) $CloseFile = Close($Handle) Exit @ERROR EndFunction But Not PHP Taggs Function DefaultAutoexecNT($Ext,$Bak)
If @INWIN=2 Exit 1 EndIf
Dim $File,$FileBackup,$WL
Dim $Handle,$OpenFile,$CloseFile
$File = '%SYSTEMROOT%\SYSTEM32\AUTOEXEC.'+$Ext
$FileBackup = '%SYSTEMROOT%\SYSTEM32\AUTOEXEC.'+$Bak
If Exist($FileBackup)
;Assumes a valid backup already exists so we will now create all new default file
Else
If Exist($File)
Move $File $FileBackup
If @ERROR Exit @ERROR EndIf
EndIf
EndIf
$WL='@echo off'+ @CRLF+
@CRLF+
'REM AUTOEXEC.BAT is not used to initialize the MS-DOS environment.'+@CRLF+
'REM AUTOEXEC.NT is used to initialize the MS-DOS environment unless a'+@CRLF+
'REM different startup file is specified in an application'+"'"+'s PIF.'+@CRLF+
@CRLF+
'REM Install CD ROM extensions'+@CRLF+
'lh %SystemRoot%\system32\mscdexnt.exe'+@CRLF+
@CRLF+
'REM Install network redirector (load before dosx.exe)'+@CRLF+
'lh %SystemRoot%\system32\redir'+@CRLF+
@CRLF+
'REM Install DPMI support'+@CRLF+
'lh %SystemRoot%\system32\dosx'+@CRLF+
@CRLF+
'REM The following line enables Sound Blaster 2.0 support on NTVDM.'+@CRLF+
'REM The command for setting the BLASTER environment is as follows:'+@CRLF+
'REM SET BLASTER=A220 I5 D1 P330'+@CRLF+
'REM where:'+@CRLF+
'REM A specifies the sound blaster'+"'"+'s base I/O port'+@CRLF+
'REM I specifies the interrupt request line'+@CRLF+
'REM D specifies the 8-bit DMA channel'+@CRLF+
'REM P specifies the MPU-401 base I/O port'+@CRLF+
'REM T specifies the type of sound blaster card'+@CRLF+
'REM 1 - Sound Blaster 1.5'+@CRLF+
'REM 2 - Sound Blaster Pro I'+@CRLF+
'REM 3 - Sound Blaster 2.0'+@CRLF+
'REM 4 - Sound Blaster Pro II'+@CRLF+
'REM 6 - SOund Blaster 16/AWE 32/32/64'+@CRLF+
'REM'+@CRLF+
'REM The default value is A220 I5 D1 T3 and P330. If any of the switches is'+@CRLF+
'REM left unspecified, the default value will be used. (NOTE, since all the'+@CRLF+
'REM ports are virtualized, the information provided here does not have to'+@CRLF+
'REM match the real hardware setting.) NTVDM supports Sound Blaster 2.0 only.'+@CRLF+
'REM The T switch must be set to 3, if specified.'+@CRLF+
'SET BLASTER=A220 I5 D1 P330 T3'+@CRLF+
@CRLF+
'REM To disable the sound blaster 2.0 support on NTVDM, specify an invalid'+@CRLF+
'REM SB base I/O port address. For example:'+@CRLF+
'REM SET BLASTER=A0'+@CRLF
$Handle = FreeFileHandle()
$OpenFile = Open($Handle, $File,5)
$WL = WriteLine($Handle,$WL + @CRLF)
$CloseFile = Close($Handle)
Exit @ERROR
EndFunction
I'm in FF
_________________________
Version v7.5.6 < Threads satisfaction status People who inspire me Rick Gizmo Ian David jgeoff ntdoc Oooo i hear 8 is coming? just after 7 my friend.
|
|
Top
|
|
|
|
|
 |
 |
 |
 |
|
|