This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
winstold [2011/09/22 07:56] ueluekmen created |
— (current) | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | <code winst> | ||
| - | ; Copyright (c) uib gmbh (www.uib.de) | ||
| - | ; This sourcecode is owned by uib | ||
| - | ; and published under the Terms of the General Public License. | ||
| - | ; | ||
| - | ;################################################################## | ||
| - | ;Siehe auch unter | ||
| - | ; http:// | ||
| - | ; http:// | ||
| - | ; helper dll and scripts from w2000 server resource kit | ||
| - | ; | ||
| - | [Initial] | ||
| - | ; Message at install time: | ||
| - | Message=Installiere Druckertreiber ...... | ||
| - | LogLevel=2 | ||
| - | ; Log Errors in Logfile but don't abort: | ||
| - | ExitOnError=false | ||
| - | ; Show syntax errors in the script: | ||
| - | ScriptErrorMessages=on | ||
| - | ; Dont trace step by step through the script: | ||
| - | TraceMode=off | ||
| - | ; let started programs run in front of the winst window | ||
| - | StayOnTop=false | ||
| - | |||
| - | |||
| - | [Aktionen] | ||
| - | DefVar $RebootFlag$ | ||
| - | DefVar $WinstRegKey$ | ||
| - | DefVar $RebootRegVar$ | ||
| - | ;Variables for version of the operating system (OS)-Test | ||
| - | DefVar $SYSTEMROOT$ | ||
| - | DefVar $SYSTEMDRIVE$ | ||
| - | Set $SYSTEMDRIVE$ = " | ||
| - | Set $SYSTEMROOT$ = " | ||
| - | DefVar $TEMP$ | ||
| - | DefVar $OS$ | ||
| - | DefVar $MinorOS$ | ||
| - | |||
| - | DefVar $IpNumbers$ | ||
| - | DefStringlist $IpList$ | ||
| - | DefVar $aktIpNumber$ | ||
| - | DefVar $MyPrinterName$ | ||
| - | DefVar $MyPrinterNameIp$ | ||
| - | DefVar $Path2InfFile$ | ||
| - | DefVar $InfFile$ | ||
| - | DefVar $PrinterPort$ | ||
| - | DefVar $PrinterNameInInfFile$ | ||
| - | |||
| - | |||
| - | set $OS$ = GetOS | ||
| - | set $MinorOS$ = GetNTVersion | ||
| - | if ( $OS$ = " | ||
| - | ; show product picture | ||
| - | ShowBitmap /3 " | ||
| - | |||
| - | ; lets copy and register helper dll | ||
| - | | ||
| - | | ||
| - | |||
| - | | ||
| - | ; der Pfad fuer PCL N: | ||
| - | ; should we install ? | ||
| - | set $IpNumbers$ = IniVar (" | ||
| - | if not ($IpNumbers$ = " | ||
| - | ; free defined printer name eg. bro_uib_room5 | ||
| - | set $MyPrinterName$ = " | ||
| - | ; Name of to printer model exactly as it is in the inf-file below | ||
| - | set $PrinterNameInInfFile$ =" | ||
| - | ; full path to the inf-file to use | ||
| - | if ($MinorOS$ = " | ||
| - | set $InfFile$ = " | ||
| - | endif | ||
| - | if ($MinorOS$ = "Win NT 5.2") | ||
| - | set $InfFile$ = " | ||
| - | endif | ||
| - | if ($MinorOS$ = " | ||
| - | set $InfFile$ = " | ||
| - | endif | ||
| - | |||
| - | ; get list of ipnumbers | ||
| - | set $IpList$ = splitstring($IpNumbers$, | ||
| - | for $s$ in $IpList$ do sub_install_printer | ||
| - | endif | ||
| - | |||
| - | |||
| - | ; der Pfad fuer PS N: | ||
| - | ; should we install ? | ||
| - | set $IpNumbers$ = IniVar (" | ||
| - | if not ($IpNumbers$ = " | ||
| - | ; free defined printer name eg. bro_uib_room5 | ||
| - | set $MyPrinterName$ = " | ||
| - | ; Name of to printer model exactly as it is in the inf-file below | ||
| - | set $PrinterNameInInfFile$ =" | ||
| - | ; full path to the inf-file to use | ||
| - | if ($MinorOS$ = " | ||
| - | set $InfFile$ = " | ||
| - | endif | ||
| - | if ($MinorOS$ = " | ||
| - | set $InfFile$ = " | ||
| - | endif | ||
| - | |||
| - | ; get list of ipnumbers | ||
| - | set $IpList$ = splitstring($IpNumbers$, | ||
| - | for $s$ in $IpList$ do sub_install_printer | ||
| - | | ||
| - | endif | ||
| - | endif | ||
| - | |||
| - | [Files_copy_prnadmin] | ||
| - | copy -v %ScriptPath%\files\prnadmin.dll %System% | ||
| - | |||
| - | [DosInAnIcon_register_prnadmin] | ||
| - | c: | ||
| - | cd %System% | ||
| - | regsvr32.exe /s prnadmin.dll | ||
| - | |||
| - | [sub_install_printer] | ||
| - | set $aktIpNumber$ = " | ||
| - | ; define portname | ||
| - | set $PrinterPort$ = " | ||
| - | set $MyPrinterNameIp$ = $MyPrinterName$+" | ||
| - | set $Path2InfFile$ = ExtractFilePath($InfFile$) | ||
| - | | ||
| - | ; now install the printer | ||
| - | DosInAnIcon_install_printer | ||
| - | |||
| - | [DosInAnIcon_install_printer] | ||
| - | rem Install the printer port | ||
| - | cscript %ScriptPath%\files\portmgr.vbs -a -c "" | ||
| - | rem install printer driver and connect to port | ||
| - | rem cscript %ScriptPath%\files\prnmgr.vbs -a -b " | ||
| - | cscript %ScriptPath%\files\prnmgr.vbs -a -b " | ||
| - | </ | ||