|
|
|
|
||||||
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
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! |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
"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? |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
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. |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
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. |
|
|
|
#5 |
|
Messages: n/a
Hébergeur: |
"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 |
|
|
|
#6 |
|
Messages: n/a
Hébergeur: |
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. |
|
|
|
#7 |
|
Messages: n/a
Hébergeur: |
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. |
|
|
|
#8 |
|
Messages: n/a
Hébergeur: |
"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. |
|
|
|
#9 |
|
Messages: n/a
Hébergeur: |
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. |
|
![]() |
| Outils de la discussion | |
|
|