0

I have a single login batch file for my users in group policy user login scripts. It is running when they login, but the vbs files I call from within the batch file do not appear to be.

As a simple example...

test.bat

echo Start...
wscript.exe "\\Server\test.vbs"
echo Done!

test.vbs

msgbox("Hello")

When I run the Batch file manually, it all works!

I have read some stuff about Windows 7 running scripts with different elevation if they are a computer administrator due to UAC but this user is not a local or domain admin and I have even turned off UAC on the computer.

Even more worrying is that this is only happening on some computers, started on different days and does not seem to be related to any windows update. If the same user logs into a different computer it works.

My computers are running Windows 7 and the domain is Server 2008.

Please help me.

7
  • You can put a vbscript directly as logon script. No need to use a batchfile that creates an ugly textbox. This is likely also going to solve your problem.
    – LPChip
    Aug 7, 2015 at 13:20
  • If this is not acceptable, then make sure that when a user runs the script as administrator, the administrator user has access to the network share. Not sure you can actually set this so you may have to grand the everyone right to that folder. (the previous comment will work for sure though)
    – LPChip
    Aug 7, 2015 at 13:22
  • Actually, I resorted to this method because some users computers were having trouble running multiple login scripts. They would just run the first one and not the others. I would also rather get to the bottom of this issue rather than work around it.
    – Yeodave
    Aug 7, 2015 at 14:13
  • Permissions on the folders seem fine, as if the user runs the batch file manually everything works.
    – Yeodave
    Aug 7, 2015 at 14:14
  • And thats where you're mistaken. When a logon script is executed, it runs as a different user/different environment. Its best practice to have one vb script and use everything in there. vbscript is very powerful. You can use all kinds of IF's to make only part of that script applicable to that user, such as checking if the user is member of a security group.
    – LPChip
    Aug 7, 2015 at 14:39

0

You must log in to answer this question.