Re: Startup Script from AD policy



Hi,

This KB article explains the error:

http://support.microsoft.com/?kbid=156276

Per the KB, you need a new cmd.exe, plus registry changes. Another fix would
be to temporarily map a drive. For example:

Set objNetwork = Wscript.CreateObject("Wscript.Network")
Set winShell = Wscript.CreateObject("Wscript.Shell")
objNetwork.MapNetworkDrive "K:", "\\193.136.66.26\NetLogon"
winShell.Run "cmd /c K:\sdat.exe /silent"
objNetwork.RemoveNetworkDrive "K:", True, True

--
Richard
Microsoft MVP Scripting and ADSI
Hilltop Lab - http://www.rlmueller.net

"david carvalho" <davidcarvalho@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:58307882-6CB4-4F7E-AA06-0941BC926B09@xxxxxxxxxxxxxxxx
> hi thanks for the tip. i completly forget that.
> I have another problem yet.
> I want the sdatxxx.exe file to be executed, so I put it on the NETLOGON
> folder.
> I'm trying to use 2 versions without result:
>
> a) vbscript
> Set winShell = wscript.CreateObject("wscript.shell")
> winShell.run "cmd /c \\193.136.66.26\netlogon\sdat.exe /silent"
>
> b) batch file
> @echo off
> \\my.ip.address\netlogon\sdat.exe /silent
>
> I always get a "UNC paths are not supported. Defaulting to windows
> directory"
> and the software doesn't update
>
> How can I do this ?
> thanks !
> David
>
> "Richard Mueller" wrote:
>
>> david carvalho wrote:
>>
>> > Hi!
>> > I'm writing a simple script under some "OU" policy, computer
>> > configuration\windows settings\scripts
>> > it runs ok when it's just to write something on screen for example. The
>> > problem is tha I want to run an executable (when the machine starts up,
>> > not
>> > when users log in), and I can't place the executable on the same folder
>> > as
>> > the script so I can access it. I get a permission denied. So I put the
>> > executable on the NETLOGON folder. But I guess that this folder is only
>> > accessible after some domain user logs on. I get the same problem when
>> > putting the executable under a shared folder with read/write
>> > permissions
>> > for
>> > everyone.
>> > How can I force the workstations to execute this remote file ?
>> > thanks !
>> > david
>>
>> Startup scripts run with System permissions on the local machine and with
>> the permissions of the computer object in the domain. When I need to
>> allow a
>> startup script access to a shared folder, I grant permissions to the
>> "Domain
>> Computers" group.
>>
>> --
>> Richard
>> Microsoft MVP Scripting and ADSI
>> Hilltop Lab - http://www.rlmueller.net
>>
>>
>>


.



Relevant Pages

  • Re: remove user exe execute permission
    ... be able to read or execute the file. ... In NTFS grant - read and execute ... remove the 'read' permission of that folder. ...
    (microsoft.public.windows.server.security)
  • Re: Unable to load oci.dll
    ... aspnet has read and execute permissions to the oracle bin ... permissions to the oracle bin folder and it fails. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: HP Scanner Creates problem in second account
    ... It means there is a problem with permissions on either the program folder or ... Try assigning 'read & execute' ... permissions to the limited account username. ... in the view tab of folder options. ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: Server Reports empty
    ... > permissions of the folder: ... > - Local Service Read & Execute, List Folder Contents, and Read permissions ... > - Network Service Read & Execute, List Folder Contents, and Read ...
    (microsoft.public.windows.server.sbs)
  • Re: Startup Script from AD policy
    ... i would still have the problem because of the cmd shell. ... What permissions should I have exactly? ... I believe I've done the same in SYSVOL folder? ... >>> Microsoft MVP Scripting and ADSI ...
    (microsoft.public.windows.server.scripting)