Page 1 of 1 1
Topic Options
#121280 - 2004-06-15 04:29 PM deleting and reinstalling printers
Lou Offline
Fresh Scripter

Registered: 2002-01-10
Posts: 13
Loc: Hunt Valley MD
Hello,

I am using kixstart version 4.11.0.0. All of my clients are Windows XP. I need to delete my 5 printers on everyone's machine and then re-add them. Currently my script looks like this: Igonore the Windows 98 section. I am going to take that out shortly. Any help is much appreciated.



; KCI Hunt Valley Kixtart login script
;
; Revised 8/7/2001
; Lou Novotny
; Modified
;
;
; Hide the DOS window, if possible.
SetConsole("HIDE")






SELECT CASE (SUBSTR(@IPADDRESS0,1,11)) = "172. 20. 34"

GOTO templates


EndSelect

SELECT CASE (SUBSTR(@IPADDRESS0,1,11)) = "172. 20. 32"

GOTO templates


EndSelect

SELECT CASE (SUBSTR(@IPADDRESS0,1,11)) = "172. 20. 33"

GOTO templates

EndSelect

SELECT CASE (SUBSTR(@IPADDRESS0,1,11)) = "172. 20. 35"

GOTO templates


EndSelect


goto end

:templates

? "Setting OS variables..."

IF @INWIN = 1
; Windows NT Section
;SETM "USERNAME=%USERNAME%"
SET "DIVISION=@COMMENT"
SET "FULLNAME=@FULLNAME"


SET "PS_DIR_QCF=G:\PLOTTING\PS7\QCF"
SET "PS_DIR_CFG=G:\PLOTTING\PS7\CFG"
SET "PS_NAM_CFG=PS.CFG"
SET "PS_USR_NAME=@FULLNAME Division: @COMMENT"

SET "APRF=L:\ACAD14\PRF"
SET "APRF_FILES=L:\ACAD14\PRF"





ELSE
;Windows 9x Section
SHELL "winset.exe USERNAME=@USERID"
SHELL "winset.exe DIVISION=@COMMENT"
SHELL "winset.exe FULLNAME=@FULLNAME"
SHELL "winset.exe Privilege=@PRIV"

SHELL "winset.exe PS_DIR_QCF=G:\PLOTTING\PS7\QCF"
SHELL "winset.exe PS_DIR_CFG=G:\PLOTTING\PS7\CFG"
SHELL "winset.exe PS_NAM_CFG=PS.CFG"
SHELL "winset.exe PS_USR_NAME=@FULLNAME Division: @COMMENT"
SHELL "winset.exe APRF=L:\ACAD14\PRF"
SHELL "winset.exe APRF_FILES=L:\ACAD14\PRF"
ENDIF

WRITEVALUE

("HKEY_CURRENT_USER\Software\Google\NavClient\1.1\whitelist",
"allow2", "|inside|prodapp.kci.com|devapp.kci.com|", "REG_SZ")



? "Setting Word Templates..."
; Copies templates to a standard directory and sets Word to use that directory to find templates
; Set the next variable based on the network location of the templates
; 7/1/2001 - KAS
$NetworkTempDir = "\\Kcinet\WINAPPS\KCI_Templates"
$KCIStds = "c:\KCI_Stds"
$WordTempDir = $KCIStds + "\WordTemplates"

? "Editing the Registry to point Word to the KCI Standard Word Templates Directory"
WRITEVALUE ("HKEY_CURRENT_USER\Software\Microsoft\Office\8.0\Common\FileNew\SharedTemplates", "", $WordTempDir, "REG_SZ")
WRITEVALUE ("HKEY_CURRENT_USER\Software\Microsoft\Office\9.0\Common\General", "SharedTemplates", $WordTempDir, "REG_SZ")

WRITEVALUE ("HKEY_CURRENT_USER\Software\Microsoft\Office\8.0\Common\FileNew\LocalTemplates", "", $WordTempDir, "REG_SZ")

? "Test for $WordTempDir and $KCIStds"
IF (EXIST ($WordTempDir)) <> 1
IF (EXIST ($KCIStds)) <> 1
? "Making $KCIStds ..."
MD $KCIStds
ENDIF

? "Making $WordTempDir ..."
$MakeDirVal = $WordTempDir + "\"
MD $MakeDirVal
ENDIF

? "Make sure the templates are not marked Read Only so they mnay be copied over."
$filename=Dir($WordTempDir+"\*.*")
WHILE ($filename <> "") AND (@error = 0)
IF GetFileAttr($WordTempDir + "\" + $filename) & 16 ; (= WordTempDir? )
$message = "[d] " + LCASE($WordTempDir + "\" + $filename)
? "$message"
ELSE
$message = "[f] " + LCASE($WordTempDir + "\" + $filename)
? "$message"
IF (SetFileAttr($WordTempDir + "\" + $filename,128) <> 0)
? "Error @error for $filename : @serror"
ENDIF
ENDIF

$filename=Dir() ; retrieve next file
LOOP

? "Copying Word Templates..."
$CopyVal1 = $NetworkTempDir + "\*.*"
$CopyVal2 = $WordTempDir + "\*.*"

COPY $CopyVal1 $CopyVal2




CLS
:End




? "Deleting Persistent Drives"

USE * /DELETE

CLS

? "Mapping Drives"

USE G: "\\kcinet\cadd"
? "G drive"
? "-------------------------"

USE H: "\\kcinet\apps"
? "H drive"
? "-------------------------"

USE I: "\\172.20.32.53\users$"
? "I drive"
? "-------------------------"

USE L: "\\kcinet\winapps"
? "L drive"
? "-------------------------"

USE M: "\\corp.kci.com\corp-projects"
? "M drive"
? "-------------------------"

USE N: "\\kcintsrv\projects"
? "N drive"
? "-------------------------"

USE P: "\\kcinet\plotting"
? "P drive"
? "-------------------------"

USE R: "\\kci-dc01\bd"
? "R drive"
? "-------------------------"

IF INGROUP ("kci\BDaccess")
USE Q: "\\kcinet\projects"
? "Mapping Q Drive"
? "-------------------------"
ENDIF




CLS


? "Synchronizing Workstation Clock to LAN Clock"
SETTIME "\\kci-dc01"

Top
#121281 - 2004-06-15 04:55 PM Re: deleting and reinstalling printers
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Have you tried the DELPRINTERCONNECTION that is built-in to KiXtart?

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#121282 - 2004-06-15 05:02 PM Re: deleting and reinstalling printers
Lou Offline
Fresh Scripter

Registered: 2002-01-10
Posts: 13
Loc: Hunt Valley MD
no, I don't have the handbook for kixstart anymore. What is the syntax for the delprinterconnection command. And while were at it if you know the command and syntax for adding a printer it would be greatly appreciated.

thanks,

Lou

Top
#121283 - 2004-06-15 05:06 PM Re: deleting and reinstalling printers
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
KiX does not ship with a handbook but you can print your own from the Word doc that is in the download.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#121284 - 2004-06-15 05:09 PM Re: deleting and reinstalling printers
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Here is an online version as well.
http://www.scriptlogic.com/Kixtart/htmlhelp/Reference/!keyword-index.asp

SL also has a CHM for DL.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Henriques) and 2516 anonymous users online.
Newest Members
fgarcia, Viginette, ManuvdWielNL, Sir_Barrington, batdk82
17889 Registered Users

Generated in 0.027 seconds in which 0.012 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org