Toon posts:

[XP] LPT mapping probleem. inlogscript ?

Pagina: 1
Acties:

Verwijderd

Topicstarter
Goedemiddag,

Win XP SP2 werkstation
Win 2003 std Server

Volgens het inlogscript moeten gebruikers die in security group: l-users-NL-bedrijf-P-05 zitten, een LPT mapping krijgen naar printer 07:


If INGROUP("l-users-NL-bedrijf-P-05")
SetDefaultPrinter("\\NL-bedrijf-20\NL-bedrijf-P-05")
use LPT1: "\\NL-bedrijf-20\NL-bedrijf-P-07"
ENDIF

Het vreemde is dat één PC, zodra er ingelogged word, een LPT mapping krijgt naar printer 10.
Gebruiker zit in de goede groep, aan lokale gebruikers hangen geen scripts

Als we de mapping handmatig aanmaken:
Net use LPT1: \\servernaam\printernaam /persistent:yes
wordt deze de volgende ochtend overschreven (?). de mapping verwijst iig weer naar de verkeerde printer.

Beetje vreemd probleem, krijg er geen vinger achter.
Iemand ?

Alvast bedankt !

  • alt-92
  • Registratie: Maart 2000
  • Niet online

alt-92

ye olde farte

Geef nog even aan welke scripttaal je hiervoor gebruikt, en zet even iets meer van het script neer eventueel - graag ook de [ code ] tags dan gebruiken.

Ik zet ondertussen het OS in de titel per de Windows Clients - Policy.

ik heb een 864 GB floppydrive! - certified prutser - the social skills of a thermonuclear device


Verwijderd

Topicstarter
Dank je.

Gaat om een KIX script:
Hier nog wat meer van het script:
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
$trash = SetConsole("MINIMIZE")
$trash = RedirectOutput("C:\WINDOWS\logon.log")

;**************************************************************************************************
;*
;*LOGIN SCRIPTS VOOR BEDRIJF NEDERLAND
;*
;*
;**************************************************************************************************

;**************************************************************************************************
; Variabelen
;**************************************************************************************************
$IsTerminal = (@WKSTA = "NL-BEDRIJF-22")

;**************************************************************************************************
; Tijd synchroniseren met de server
;**************************************************************************************************

SetTime "\\NL-BEDRIJF-21"


;**************************************************************************************************
; Drive letters toe kennen
;**************************************************************************************************

;Eerst alle mappings weggooien!
;Dit werkt beter dan Use * /DELETE op Windows 9x

Use LPT1: /DELETE
Use F: /DELETE
Use G: /DELETE
Use H: /DELETE
Use I: /DELETE
Use J: /DELETE
Use K: /DELETE
use N: /DELETE
use O: /DELETE
Use P: /DELETE
Use R: /DELETE
Use S: /DELETE
Use T: /DELETE
Use U: /DELETE
Use X: /DELETE


; Standaard mappings
Use P: "\\NL-BEDRIJF-21\Productie"
Use T: "\\NL-BEDRIJF-21\Testomgeving"
Use O: "\\NL-BEDRIJF-21\Ontwikkeling"
Use U: "\\NL-BEDRIJF-21\Users"
Use X: "\\NL-BEDRIJF-21\apps"

Use I: "\\NL-BEDRIJF-21\Home\@UserID"
Use J: "\\NL-BEDRIJF-21\Groups"


If InGroup ("g_BEDRIJF_use")
  Use V: /del
  Use R: /del
  Use V: "\\10.88.16.22\lffBEDRIJF"
  Use R: "\\10.88.16.22\Users"
EndIf


If INGROUP("l-users-Printers-1eVerdieping-P-01")
  AddPrinterConnection("\\NL-BEDRIJF-20\NL-BEDRIJF-P-01")
  ENDIF
  
If INGROUP("l-users-Printers-2eVerdieping")
  AddPrinterConnection("\\NL-BEDRIJF-20\NL-BEDRIJF-P-05")
  AddPrinterConnection("\\NL-BEDRIJF-20\NL-BEDRIJF-P-07")
  AddPrinterConnection("\\NL-BEDRIJF-20\NL-BEDRIJF-P-10")
  AddPrinterConnection("\\NL-BEDRIJF-20\NL-BEDRIJF-P-14")
 ENDIF

If INGROUP("l-users-Printers-1eVerdieping-")
  AddPrinterConnection("\\NL-BEDRIJF-20\NL-BEDRIJF-P-03")
  AddPrinterConnection("\\NL-BEDRIJF-20\NL-BEDRIJF-P-04")
  AddPrinterConnection("\\NL-BEDRIJF-20\NL-BEDRIJF-P-12")
  SetDefaultPrinter("\\NL-BEDRIJF-20\NL-BEDRIJF-P-04")
  ENDIF

If INGROUP("l-users-Printers-1eVerdieping-Wholesale")
  AddPrinterConnection("\\NL-BEDRIJF-20\NL-BEDRIJF-P-11")
  SetDefaultPrinter("\\NL-BEDRIJF-20\NL-BEDRIJF-P-11")
  use LPT1: "\\NL-BEDRIJF-20\NL-BEDRIJF-P-11"
  ENDIF

If INGROUP("l-users-NL-BEDRIJF-P-01")
SetDefaultPrinter("\\NL-BEDRIJF-20\NL-BEDRIJF-P-01")
  use LPT1: "\\NL-BEDRIJF-20\NL-BEDRIJF-P-01"
  ENDIF

If INGROUP("l-users-NL-BEDRIJF-P-05")
  SetDefaultPrinter("\\NL-BEDRIJF-20\NL-BEDRIJF-P-05")
  use LPT1: "\\NL-BEDRIJF-20\NL-BEDRIJF-P-07"
 ENDIF

If INGROUP("l-users-NL-BEDRIJF-P-07")
  SetDefaultPrinter("\\NL-BEDRIJF-20\NL-BEDRIJF-P-07")
  use LPT1: "\\NL-BEDRIJF-20\NL-BEDRIJF-P-07"
ENDIF

If INGROUP("l-users-NL-BEDRIJF-P-10")
  SetDefaultPrinter("\\NL-BEDRIJF-20\NL-BEDRIJF-P-10")
  use LPT1: "\\NL-BEDRIJF-20\NL-BEDRIJF-P-10"
 ENDIF


;*******************************************************************************************************
; Als NL-BEDRIJF-05 (cONTRACTEN PRINTER) uitvalt, uitvoeren onderstaande regels (HAAL DE PUNTKOMMA`S WEG).
; NL-BEDRIJF-14 is een reserve Contracten Printer
;*******************************************************************************************************
;
;  AddPrinterConnection("\\NL-BEDRIJF-20\NL-BEDRIJF-P-14")
;  use lpt1: /delete
;
;If INGROUP("l-users-NL-BEDRIJF-P-05")
; SetDefaultPrinter("\\NL-BEDRIJF-20\NL-BEDRIJF-P-14")
;  use LPT1: "\\NL-BEDRIJF-20\NL-BEDRIJF-P-14"
; ENDIF
;
;If INGROUP("l-users-NL-BEDRIJF-P-07")
;  SetDefaultPrinter("\\NL-BEDRIJF-20\NL-BEDRIJF-P-14")
;  use LPT1: "\\NL-BEDRIJF-20\NL-BEDRIJF-P-14"
;ENDIF
;
;**************************************************************************************************


;**************************************************************************************************
; Opbouwen start menu Desktops
;**************************************************************************************************
      SELECT 
         CASE NOT($IsTerminal)
            shell "%comspec% /C rd /s /q " + chr(34) +"%userprofile%\Start Menu\programs" + chr(34)
            shell "xcopy " + chr(34) + "x:\support\desktops\start menu\programs" + chr(34) + " " + chr(34) + "%userprofile%\start menu\programs" + chr(34) + " /c /e /i /r /y /z"
      ENDSELECT


If @"Windows98"
  RUN "\\NL-BEDRIJF-21\Vscan$\vupd.exe /silent"
EndIf

Verwijderd

Probeer het bv. eens zo om alle mappings eerst te verwijderen

code:
1
2
3
If ingroup("Group")

        DelTree("HKEY_CURRENT_USER\Printers\connections")


Schrijft wat gemakkelijker weg in het script en zo blijft er zeker niets achter van oude mappings.

  • alt-92
  • Registratie: Maart 2000
  • Niet online

alt-92

ye olde farte

Verwijderd schreef op woensdag 23 januari 2008 @ 13:12:
Het vreemde is dat één PC, zodra er ingelogged word, een LPT mapping krijgt naar printer 10.
Gebruiker zit in de goede groep
Da's fijn voor 'm, maar zit ie toevallig in meerdere groepen, waaronder de groep die de -10 krijgt?

Zoals ik het nu zie is dat enkel bij deze user het geval - het script is dus duidelijk in orde wat dat betreft, ik zou er niet van staan te kijken dat in dit geval wel de mapping gemaakt wordt naar je -07 printer maar vervolgens overschreven wordt omdat de gebruiker ook nog in groep -10 zit :)


Just a thought..

ik heb een 864 GB floppydrive! - certified prutser - the social skills of a thermonuclear device