Re: If username = stuff
From: Mark Coutinho (mark_at_soaaids.nl)
Date: 12/23/04
- Next message: Matthias Tacke: "Re: If username = stuff"
- Previous message: Al Dunbar [MS-MVP]: "Re: Novice Script Question"
- In reply to: Matthias Tacke: "Re: If username = stuff"
- Next in thread: Matthias Tacke: "Re: If username = stuff"
- Reply: Matthias Tacke: "Re: If username = stuff"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 23 Dec 2004 13:39:57 +0100
Hi Matthias,
I made some changes for my batch, but I can't get the last thing
right.
This is what I got:
@echo off&setlocal
setPB=F:\PUBLIC\Uitrollen\Printersverbinden\AllePrintersVerbindenKleur.bat
set P2=F:\PUBLIC\Uitrollen\Printersverbinden\AllePrintersVerbinden.bat
set Users= petra berry
for %%A in (%Users%) do if /I "%USERNAME%" EQU "%%A" set PB=%PB%
call %P2%
(in the original there is a space between 'set' and 'PB' (i.e. set PB,
but I can't get it right in my Free Agent mail)
Now what has to happen is: if Berry or Petra is the one who's logging
in they have to 'use' PB
If anyone else is logging in they have to call P2.
But no matter how I puzzle with the last two lines of the batch I
never get i right.
Could you help me once more, please?
Thanks!
On Mon, 20 Dec 2004 15:24:45 +0100, Matthias Tacke <Matthias@Tacke.de>
wrote:
>Mark Coutinho wrote:
>> My batch looks like this right now
>>
>> @echo off&setlocal
>> set PB=f:\public\AllePrintersVerbindenKleur.reg
>> set P2=f:\public\AllePrintersVerbinden.reg
>> set Users=petra berry wilma rose-marie
>> for %%A in (%Users%) do if /I "%USERNAME%" EQU "%%A" set PB=%P2%
>> call %PB%
>>
>> It's about the .reg entry's
>> I know I said I wanted to call batches, but is it possible to execute
>> these registry-entries instead? Of course it is, but how would the
>> lines be then?
>>
>> So the 5 users will get a colorprinter in their printer-registry-key
>> and all the others get the other registry entry which does not have a
>> colorprinter in it.
>>
>You could use reg.exe (included in xp, for w2k in the resource Kit)
>to integrate the settings directly, or use start xyz.reg to install
>the reg file. Type reg /? in a cmd window.
>
>Depending on your environment there should be other/better ways to
>set default/allowed printers.
>
>HTH
- Next message: Matthias Tacke: "Re: If username = stuff"
- Previous message: Al Dunbar [MS-MVP]: "Re: Novice Script Question"
- In reply to: Matthias Tacke: "Re: If username = stuff"
- Next in thread: Matthias Tacke: "Re: If username = stuff"
- Reply: Matthias Tacke: "Re: If username = stuff"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|