logoff script losing permissions to share



Mike Brearley
07-10-2005, 12:32 AM
I'm setting up a vb script that run at logoff (using local group policy
settings). The vbs script launches a command line xcopy routine that copies
files from the users laptop to thier home directory on a Windows 2000 file
server using \\servername\username$\Documents.

If I run the script while logged in, it runs fine. When it runs during the
logoff script process, it doesn't copy anything.

Any ideas?

--
Posted 'as is'. If there are any spelling and/or grammar mistakes, they
were a direct result of my fingers and brain not being synchronized or my
lack of caffeine.

Mike Brearley

Mike
07-10-2005, 12:32 AM
logoff scripts are processed after authentication tickets are closed.

have you considered using offline files instead?


"Mike Brearley" <nospam@spam.com> wrote in message
news:%23VAYOiuWFHA.1796@TK2MSFTNGP15.phx.gbl...
> I'm setting up a vb script that run at logoff (using local group policy
> settings). The vbs script launches a command line xcopy routine that
> copies files from the users laptop to thier home directory on a Windows
> 2000 file server using \\servername\username$\Documents.
>
> If I run the script while logged in, it runs fine. When it runs during
> the logoff script process, it doesn't copy anything.
>
> Any ideas?
>
> --
> Posted 'as is'. If there are any spelling and/or grammar mistakes, they
> were a direct result of my fingers and brain not being synchronized or my
> lack of caffeine.
>
> Mike Brearley
>
>

Mike Brearley
07-10-2005, 12:32 AM
The thing is... if I use a cmd file it works fine. It's only after I
switched to using a vbs file that launches a command line that it hasn't
been working. I would like to stick with the vbscript purely for the
flexability.

Offline files are not an option. There's too many things they don't handle
properly.


"Mike" <reply@togroup.com> wrote in message
news:OU8XcluWFHA.3188@TK2MSFTNGP09.phx.gbl...
> logoff scripts are processed after authentication tickets are closed.
>
> have you considered using offline files instead?
>
>
> "Mike Brearley" <nospam@spam.com> wrote in message
> news:%23VAYOiuWFHA.1796@TK2MSFTNGP15.phx.gbl...
>> I'm setting up a vb script that run at logoff (using local group policy
>> settings). The vbs script launches a command line xcopy routine that
>> copies files from the users laptop to thier home directory on a Windows
>> 2000 file server using \\servername\username$\Documents.
>>
>> If I run the script while logged in, it runs fine. When it runs during
>> the logoff script process, it doesn't copy anything.
>>
>> Any ideas?
>>
>> --
>> Posted 'as is'. If there are any spelling and/or grammar mistakes, they
>> were a direct result of my fingers and brain not being synchronized or my
>> lack of caffeine.
>>
>> Mike Brearley
>>
>>
>
>

Torgeir Bakken \(MVP\)
07-10-2005, 12:32 AM
Mike Brearley wrote:

> The thing is... if I use a cmd file it works fine. It's only
> after I switched to using a vbs file that launches a command line
> that it hasn't been working. I would like to stick with the
> vbscript purely for the flexability.
Hi,

If you use the Run method to launch the command line, be sure to set
the third parameter to True to let the script wait for the command to
finish:

objShell.Run "xcopy.exe something", 0, True

(the 0 value for the second parameter will hide the console window)


WSH 5.6 documentation (local help file) can be downloaded
from here if you haven't got it already:
http://msdn.microsoft.com/downloads/list/webdev.asp



--
torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of
the 1328 page Scripting Guide:
http://www.microsoft.com/technet/scriptcenter/default.mspx

Mike Brearley
07-10-2005, 12:33 AM
"Torgeir Bakken (MVP)" <Torgeir.Bakken-spam@hydro.com> wrote in message
news:O9ZmqVvWFHA.3584@TK2MSFTNGP14.phx.gbl...
> Mike Brearley wrote:
>
>> The thing is... if I use a cmd file it works fine. It's only
>> after I switched to using a vbs file that launches a command line
>> that it hasn't been working. I would like to stick with the
>> vbscript purely for the flexability.
> Hi,
>
> If you use the Run method to launch the command line, be sure to set
> the third parameter to True to let the script wait for the command to
> finish:
>
> objShell.Run "xcopy.exe something", 0, True
>
> (the 0 value for the second parameter will hide the console window)
>
>
> WSH 5.6 documentation (local help file) can be downloaded
> from here if you haven't got it already:
> http://msdn.microsoft.com/downloads/list/webdev.asp
>
>
Thanks... that worked. I changed the 0 to a 1 though so that it would show
the what was going on.

--
Posted 'as is'. If there are any spelling and/or grammar mistakes, they
were a direct result of my fingers and brain not being synchronized or my
lack of caffeine.

Mike Brearley


logoff script losing permissions to share