PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Hébergement serveur > ms.win.server.scripting > computer startup script - error 1219 with net use command
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
computer startup script - error 1219 with net use command

Réponse
 
LinkBack Outils de la discussion
Vieux 01/12/2007, 00h35   #1
JR
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut computer startup script - error 1219 with net use command

Hi,
I am trying to write a computer startup script to run a .exe on
everybody's computer, but when I try to map a drive with the net use
command, I keep getting the following error:

"System error 1219 has occurred.
Multiple connections to a server or shared resource by the same user,
using more than one user name, are not allowed. Disconnect all
previous connections to the server or shared resource and try again.."

I was first using the domain admin account, then created a service
account just for this, and still got the same error.

My script looks like something this:


net use * /del
net use J: "\\server\share\path" password /u:domain\user *error
occurs here*
cd \
J:
J:\program.exe
net use J: /del
EXIT


Machines are XP, server is 2003 SBS. Everything up to date.

Can anybody tell me why I keep getting this error? Any would be
much appreciated!

  Réponse avec citation
Vieux 01/12/2007, 07h04   #2
Pegasus \(MVP\)
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: computer startup script - error 1219 with net use command


"JR" <joshransom@hotmail.com> wrote in message
news:b204c326-ad3c-41a1-a222-011ac8aecd27@s19g2000prg.googlegroups.com...
> Hi,
> I am trying to write a computer startup script to run a .exe on
> everybody's computer, but when I try to map a drive with the net use
> command, I keep getting the following error:
>
> "System error 1219 has occurred.
> Multiple connections to a server or shared resource by the same user,
> using more than one user name, are not allowed. Disconnect all
> previous connections to the server or shared resource and try again.."
>
> I was first using the domain admin account, then created a service
> account just for this, and still got the same error.
>
> My script looks like something this:
>
>
> net use * /del
> net use J: "\\server\share\path" password /u:domain\user *error
> occurs here*
> cd \
> J:
> J:\program.exe
> net use J: /del
> EXIT
>
>
> Machines are XP, server is 2003 SBS. Everything up to date.
>
> Can anybody tell me why I keep getting this error? Any would be
> much appreciated!
>


Why do you specify a user account / password in the problem line?


  Réponse avec citation
Vieux 03/12/2007, 11h01   #3
Chris M
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: computer startup script - error 1219 with net use command

JR wrote:
> Hi,
> I am trying to write a computer startup script to run a .exe on
> everybody's computer, but when I try to map a drive with the net use
> command, I keep getting the following error:


That won't work. Startup scripts run in the context of the local SYSTEM
account.

Even if the drive mapping was successful, it would disappear when a user
logged on - network drives are mapped on a per-user basis.

The solution is to use a logon script instead (you may have to use
loopback processing to get it to work, depending on where you want the
policy to apply).

You won't need to specify any explicit credentials since a logon script
will run in the context of the user who is logging on.

Cheers,


--
Chris M.

Remove pants to email me.
  Réponse avec citation
Vieux 03/12/2007, 11h04   #4
Chris M
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: computer startup script - error 1219 with net use command

JR wrote:
> Hi,
> I am trying to write a computer startup script to run a .exe on
> everybody's computer, but when I try to map a drive with the net use
> command, I keep getting the following error:


Sorry, I've just re-read your post and noticed that you only want to run
an exe at startup.

In that case, you don't even need to script it.

Put the executable into the Machine startup folder in the group policy
object (in the SYSVOL share) and just run it directly from there.


--
Chris M.

Remove pants to email me.
  Réponse avec citation
Vieux 03/12/2007, 11h09   #5
Pegasus \(MVP\)
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: computer startup script - error 1219 with net use command


"Chris M" <News@mckeownpants-online.com> wrote in message
news:fj0nls$nh2$1@aioe.org...
> JR wrote:
>> Hi,
>> I am trying to write a computer startup script to run a .exe on
>> everybody's computer, but when I try to map a drive with the net use
>> command, I keep getting the following error:

>
> That won't work. Startup scripts run in the context of the local SYSTEM
> account.
>


Sorry, this is incorrect. Startup scripts run in the context
of the user who is logging on. You can see it for yourself
by inserting these lines into your script:
echo User=%UserName%
pause


  Réponse avec citation
Vieux 03/12/2007, 11h19   #6
Chris M
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: computer startup script - error 1219 with net use command

Pegasus (MVP) wrote:
> "Chris M" <News@mckeownpants-online.com> wrote in message
> news:fj0nls$nh2$1@aioe.org...
>> JR wrote:
>>> Hi,
>>> I am trying to write a computer startup script to run a .exe on
>>> everybody's computer, but when I try to map a drive with the net use
>>> command, I keep getting the following error:

>> That won't work. Startup scripts run in the context of the local SYSTEM
>> account.
>>

>
> Sorry, this is incorrect. Startup scripts run in the context
> of the user who is logging on. You can see it for yourself
> by inserting these lines into your script:
> echo User=%UserName%
> pause



A startup script runs when the computer starts up. It'll run even if
nobody logs on. What is the user context in that case?

The logon/logoff scripts run as the user who is logging on/off.

--
Chris M.

Remove pants to email me.
  Réponse avec citation
Vieux 03/12/2007, 11h23   #7
Chris M
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: computer startup script - error 1219 with net use command

Pegasus (MVP) wrote:
> "Chris M" <News@mckeownpants-online.com> wrote in message
> news:fj0nls$nh2$1@aioe.org...
>> JR wrote:
>>> Hi,
>>> I am trying to write a computer startup script to run a .exe on
>>> everybody's computer, but when I try to map a drive with the net use
>>> command, I keep getting the following error:

>> That won't work. Startup scripts run in the context of the local SYSTEM
>> account.
>>

>
> Sorry, this is incorrect. Startup scripts run in the context
> of the user who is logging on. You can see it for yourself
> by inserting these lines into your script:
> echo User=%UserName%
> pause


For further clarification:

"Startup scripts run as Local System and have the full rights required
to run as Local System."

From here:

http://technet2.microsoft.com/Office....mspx?mfr=true


--
Chris M.

Remove pants to email me.
  Réponse avec citation
Vieux 03/12/2007, 11h56   #8
Pegasus \(MVP\)
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: computer startup script - error 1219 with net use command


"Chris M" <News@mckeownpants-online.com> wrote in message
news:fj0ovg$qpm$2@aioe.org...
> Pegasus (MVP) wrote:
>> "Chris M" <News@mckeownpants-online.com> wrote in message
>> news:fj0nls$nh2$1@aioe.org...
>>> JR wrote:
>>>> Hi,
>>>> I am trying to write a computer startup script to run a .exe on
>>>> everybody's computer, but when I try to map a drive with the net use
>>>> command, I keep getting the following error:
>>> That won't work. Startup scripts run in the context of the local SYSTEM
>>> account.
>>>

>>
>> Sorry, this is incorrect. Startup scripts run in the context
>> of the user who is logging on. You can see it for yourself
>> by inserting these lines into your script:
>> echo User=%UserName%
>> pause

>
> For further clarification:
>
> "Startup scripts run as Local System and have the full rights required to
> run as Local System."
>
> From here:
>
> http://technet2.microsoft.com/Office....mspx?mfr=true
>


You're right - I mixed up startup and logon scripts.


  Réponse avec citation
Vieux 03/12/2007, 20h22   #9
JR
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: computer startup script - error 1219 with net use command

On Dec 3, 3:04 am, Chris M <N...@mckeownpants-online.com> wrote:
> JR wrote:
> > Hi,
> > I am trying to write a computer startup script to run a .exe on
> > everybody's computer, but when I try to map a drive with the net use
> > command, I keep getting the following error:

>
> Sorry, I've just re-read your post and noticed that you only want to run
> an exe at startup.
>
> In that case, you don't even need to script it.
>
> Put the executable into the Machine startup folder in the group policy
> object (in the SYSVOL share) and just run it directly from there.
>
> --
> Chris M.
>
> Remove pants to email me.


On Dec 3, 3:04 am, Chris M <N...@mckeownpants-online.com> wrote:
> JR wrote:
> > Hi,
> > I am trying to write a computer startup script to run a .exe on
> > everybody's computer, but when I try to map a drive with the net use
> > command, I keep getting the following error:

>
> Sorry, I've just re-read your post and noticed that you only want to run
> an exe at startup.
>
> In that case, you don't even need to script it.
>
> Put the executable into the Machine startup folder in the group policy
> object (in the SYSVOL share) and just run it directly from there.
>
> --
> Chris M.
>
> Remove pants to email me.


Oh, so instead of putting the .bat file into that group policy object,
I just need to put the .exe itself? Thanks, I'll try that.
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 10h14.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,17970 seconds with 17 queries