Group policy logon script doesn't run

  • Thread starter Thread starter CryptiniteDemon
  • Start date Start date
C

CryptiniteDemon

Guest
Okay, I made a simple .bat file to map a network drive on logon and put it
under the group policy in an OU I made.

The script is simply

net use z: \\THETEST\FXI


When I run the bat file manually from any of the computers it maps the drive
just fine. However, when I login the script never maps the drive.
 
Re: Group policy logon script doesn't run


"CryptiniteDemon" <CryptiniteDemon@discussions.microsoft.com> wrote in
message news:EA1653BB-28E3-40FF-BA2D-713464A53256@microsoft.com...
> Okay, I made a simple .bat file to map a network drive on logon and put it
> under the group policy in an OU I made.
>
> The script is simply
>
> net use z: \\THETEST\FXI
>
>
> When I run the bat file manually from any of the computers it maps the
> drive
> just fine. However, when I login the script never maps the drive.


Perhaps the batch file never runs when you log in . . .?
Modify it like so to make sure:

@echo off
echo The logon script %0 ran on %date% at %time% >> c:\logon.log
net use z: \\THETEST\FXI
net use
pause
 
Re: Group policy logon script doesn't run

I may be wrong but don't scripts in group polciy have to be VB script files?

"CryptiniteDemon" <CryptiniteDemon@discussions.microsoft.com> wrote in
message news:EA1653BB-28E3-40FF-BA2D-713464A53256@microsoft.com...
> Okay, I made a simple .bat file to map a network drive on logon and put it
> under the group policy in an OU I made.
>
> The script is simply
>
> net use z: \\THETEST\FXI
>
>
> When I run the bat file manually from any of the computers it maps the
> drive
> just fine. However, when I login the script never maps the drive.
 
Re: Group policy logon script doesn't run

Did you place the login script in the startup folder of the
corresponding policy? For example, browse to \\DomainController
\SYSVOL\domain\Policies\GUIDofyourPolicy\Machine\Scripts\Startup ?

Also did you link the GPO to the OU that contains the computers that
you are trying to run this startup script on?


On Apr 25, 2:35 pm, CryptiniteDemon
<CryptiniteDe...@discussions.microsoft.com> wrote:
> Okay, I made a simple .bat file to map a network drive on logon and put it
> under the group policy in an OU I made.
>
> The script is simply
>
> net use z: \\THETEST\FXI
>
> When I run the bat file manually from any of the computers it maps the drive
> just fine. However, when I login the script never maps the drive.
 
Re: Group policy logon script doesn't run

On Apr 25, 2:52 pm, "Paul Mckenna" <JazzyJ...@newsgroup.nospam> wrote:
> I may be wrong but don't scripts in group polciy have to be VB script files?
>
> "CryptiniteDemon" <CryptiniteDe...@discussions.microsoft.com> wrote in
> messagenews:EA1653BB-28E3-40FF-BA2D-713464A53256@microsoft.com...


Actually, I think you might be right. Can you try wrapping that
script in a vbscript and seeing if that works?
 
Re: Group policy logon script doesn't run

Wow no one has said I may be right before, I'm getting all emotional

Maybe try creating a login.vbs file with the following

Set WshNetwork = WScript.CreateObject("WScript.Network")
on error resume next
wshnetwork.mapnetworkdrive "Z:"," \\THETEST\FXI"

Hope this helps or at the very least gives you an idea on how to make it
work.

Paul


<stufeatherston@gmail.com> wrote in message
news:fe2f9ea5-2548-44bd-80a2-b29ca8eb0ebd@34g2000hsf.googlegroups.com...
> On Apr 25, 2:52 pm, "Paul Mckenna" <JazzyJ...@newsgroup.nospam> wrote:
>> I may be wrong but don't scripts in group polciy have to be VB script
>> files?
>>
>> "CryptiniteDemon" <CryptiniteDe...@discussions.microsoft.com> wrote in
>> messagenews:EA1653BB-28E3-40FF-BA2D-713464A53256@microsoft.com...

>
> Actually, I think you might be right. Can you try wrapping that
> script in a vbscript and seeing if that works?
 
Re: Group policy logon script doesn't run

your wrong...


"Paul Mckenna" <JazzyJ187@newsgroup.nospam> wrote in message
news:1CFE7E4F-9B20-48FD-B21C-58C8F78D1E6E@microsoft.com...
>I may be wrong but don't scripts in group polciy have to be VB script
>files?
>
> "CryptiniteDemon" <CryptiniteDemon@discussions.microsoft.com> wrote in
> message news:EA1653BB-28E3-40FF-BA2D-713464A53256@microsoft.com...
>> Okay, I made a simple .bat file to map a network drive on logon and put
>> it
>> under the group policy in an OU I made.
>>
>> The script is simply
>>
>> net use z: \\THETEST\FXI
>>
>>
>> When I run the bat file manually from any of the computers it maps the
>> drive
>> just fine. However, when I login the script never maps the drive.

>
 
Re: Group policy logon script doesn't run

I only use .cmd scripts, and they run for both logoff and logon.

TimeTraveller

<stufeatherston@gmail.com> wrote in message
news:fe2f9ea5-2548-44bd-80a2-b29ca8eb0ebd@34g2000hsf.googlegroups.com...
> On Apr 25, 2:52 pm, "Paul Mckenna" <JazzyJ...@newsgroup.nospam> wrote:
>> I may be wrong but don't scripts in group polciy have to be VB script
>> files?
>>
>> "CryptiniteDemon" <CryptiniteDe...@discussions.microsoft.com> wrote in
>> messagenews:EA1653BB-28E3-40FF-BA2D-713464A53256@microsoft.com...

>
> Actually, I think you might be right. Can you try wrapping that
> script in a vbscript and seeing if that works?
 
Re: Group policy logon script doesn't run



"stufeatherston@gmail.com" wrote:
> Also did you link the GPO to the OU that contains the computers that
> you are trying to run this startup script on?
>
>


Alrighty, that was the problem. Thank you.
 
Back
Top