Local group policy logon startup script not executing
up vote
0
down vote
favorite
This is for Windows 7
I have a .bat and .vbs file in a folder. The .bat runs the .vbs script. In the Local Policy Group editor, under Windows Settings/Scripts I added a reference to the .bat file in the Startup properties.
It seems as if my script is not running (I don’t see the result). Is there a log I can check to see why my script is not running? Do the .vbs and/or bat need to be in a special folder or anything? The .bat references the .vbs with a relative path - is that OK when being run as a startup script? Everything works fine when I just double-click to run the .bat file manually.
windows-7 script boot group-policy
add a comment |
up vote
0
down vote
favorite
This is for Windows 7
I have a .bat and .vbs file in a folder. The .bat runs the .vbs script. In the Local Policy Group editor, under Windows Settings/Scripts I added a reference to the .bat file in the Startup properties.
It seems as if my script is not running (I don’t see the result). Is there a log I can check to see why my script is not running? Do the .vbs and/or bat need to be in a special folder or anything? The .bat references the .vbs with a relative path - is that OK when being run as a startup script? Everything works fine when I just double-click to run the .bat file manually.
windows-7 script boot group-policy
Are you running this script on your own box? A while ago during the course of regular development at work I changed the default file handler for .vbs files from the normal scripting host to notepad++ so I could edit them. Upon the next login, I was greeted by all of our domain's scripts popping up in notepad++. Lesson learned: make sure you aren't making any assumptions about the file associations for your .bat and .vbs scripts. Just a thought.
– Fopedush
Jan 22 '13 at 22:36
Why overcomplicate things with a BAT and a VBS. Do everything in the VBS.
– Keltari
Oct 6 '14 at 21:01
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
This is for Windows 7
I have a .bat and .vbs file in a folder. The .bat runs the .vbs script. In the Local Policy Group editor, under Windows Settings/Scripts I added a reference to the .bat file in the Startup properties.
It seems as if my script is not running (I don’t see the result). Is there a log I can check to see why my script is not running? Do the .vbs and/or bat need to be in a special folder or anything? The .bat references the .vbs with a relative path - is that OK when being run as a startup script? Everything works fine when I just double-click to run the .bat file manually.
windows-7 script boot group-policy
This is for Windows 7
I have a .bat and .vbs file in a folder. The .bat runs the .vbs script. In the Local Policy Group editor, under Windows Settings/Scripts I added a reference to the .bat file in the Startup properties.
It seems as if my script is not running (I don’t see the result). Is there a log I can check to see why my script is not running? Do the .vbs and/or bat need to be in a special folder or anything? The .bat references the .vbs with a relative path - is that OK when being run as a startup script? Everything works fine when I just double-click to run the .bat file manually.
windows-7 script boot group-policy
windows-7 script boot group-policy
edited Jan 22 '13 at 23:04
Guy Thomas
2,57292846
2,57292846
asked Jan 22 '13 at 19:52
Derek
40011026
40011026
Are you running this script on your own box? A while ago during the course of regular development at work I changed the default file handler for .vbs files from the normal scripting host to notepad++ so I could edit them. Upon the next login, I was greeted by all of our domain's scripts popping up in notepad++. Lesson learned: make sure you aren't making any assumptions about the file associations for your .bat and .vbs scripts. Just a thought.
– Fopedush
Jan 22 '13 at 22:36
Why overcomplicate things with a BAT and a VBS. Do everything in the VBS.
– Keltari
Oct 6 '14 at 21:01
add a comment |
Are you running this script on your own box? A while ago during the course of regular development at work I changed the default file handler for .vbs files from the normal scripting host to notepad++ so I could edit them. Upon the next login, I was greeted by all of our domain's scripts popping up in notepad++. Lesson learned: make sure you aren't making any assumptions about the file associations for your .bat and .vbs scripts. Just a thought.
– Fopedush
Jan 22 '13 at 22:36
Why overcomplicate things with a BAT and a VBS. Do everything in the VBS.
– Keltari
Oct 6 '14 at 21:01
Are you running this script on your own box? A while ago during the course of regular development at work I changed the default file handler for .vbs files from the normal scripting host to notepad++ so I could edit them. Upon the next login, I was greeted by all of our domain's scripts popping up in notepad++. Lesson learned: make sure you aren't making any assumptions about the file associations for your .bat and .vbs scripts. Just a thought.
– Fopedush
Jan 22 '13 at 22:36
Are you running this script on your own box? A while ago during the course of regular development at work I changed the default file handler for .vbs files from the normal scripting host to notepad++ so I could edit them. Upon the next login, I was greeted by all of our domain's scripts popping up in notepad++. Lesson learned: make sure you aren't making any assumptions about the file associations for your .bat and .vbs scripts. Just a thought.
– Fopedush
Jan 22 '13 at 22:36
Why overcomplicate things with a BAT and a VBS. Do everything in the VBS.
– Keltari
Oct 6 '14 at 21:01
Why overcomplicate things with a BAT and a VBS. Do everything in the VBS.
– Keltari
Oct 6 '14 at 21:01
add a comment |
3 Answers
3
active
oldest
votes
up vote
0
down vote
I can confirm that my .bat files works, even though it's on by D:scripts folder. May I suggest put a simple command such as 'Notepad' in the batch file, just to see if it works.
May I also suggest that fire up Task Manager to see what process are are active, for example with your original script, are there any .vbs entries amongst the processes?
One more thought, are you configuring the scripts under User ConfigurationWindows SettingsScripts(LogonLogoff) (my preference), or under Computer Configuration, which can be tricky.
I had them under Computer Configuration. I will try makinga simple case just to confirm it is running. It is not a long running process so its hard to see it in task man
– Derek
Jan 22 '13 at 22:45
add a comment |
up vote
0
down vote
Well this is a common error.
When you have a bat or powershell file, you need to move the script into the folder that you get when you click the "SHOW FILES", by moving the scripts there you are pretty sure that the system has all the required permissions to run at startup.
In my case it is: C:WINDOWSSystem32GroupPolicyMachineScriptsStartup
add a comment |
up vote
0
down vote
First of all make sure that the policy is applied by runnin rsop from command prompt on the computer.
Second of all make sure that the script is accessible from a shared folder that the policy would read from it.
Not to mention some policies requires a restart even after a gpupdate /force . If it's placed under user configuration and you're applying it on a OU of computers make sure loopback processing mode is set to merged.
What I suspect that there's an issue with the batch file calling the vbs file I would recommend the following:
Run a command prompt and try to call the file manually one time from elevated cmd and another time from normal cmd, and it really depends on the methods you're trying to call the vbs file with either it is cscript or wscript now not to mention that some of those batch files are best to be configured as logon scripts under user settings and not computer (which I prefer).
Now try to edit the batch file that calls the script by the following :
@echo off
%WINDIR%SysWOW64cmd.exe
cscript script.vbs or \pathscript.vbs
I think it's better to store the script in the Sysvol share. Or you can simply add the vbs script into the login script. Also if you paste the content of the batch file it would be easier to diagnose what's going on.
add a comment |
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
I can confirm that my .bat files works, even though it's on by D:scripts folder. May I suggest put a simple command such as 'Notepad' in the batch file, just to see if it works.
May I also suggest that fire up Task Manager to see what process are are active, for example with your original script, are there any .vbs entries amongst the processes?
One more thought, are you configuring the scripts under User ConfigurationWindows SettingsScripts(LogonLogoff) (my preference), or under Computer Configuration, which can be tricky.
I had them under Computer Configuration. I will try makinga simple case just to confirm it is running. It is not a long running process so its hard to see it in task man
– Derek
Jan 22 '13 at 22:45
add a comment |
up vote
0
down vote
I can confirm that my .bat files works, even though it's on by D:scripts folder. May I suggest put a simple command such as 'Notepad' in the batch file, just to see if it works.
May I also suggest that fire up Task Manager to see what process are are active, for example with your original script, are there any .vbs entries amongst the processes?
One more thought, are you configuring the scripts under User ConfigurationWindows SettingsScripts(LogonLogoff) (my preference), or under Computer Configuration, which can be tricky.
I had them under Computer Configuration. I will try makinga simple case just to confirm it is running. It is not a long running process so its hard to see it in task man
– Derek
Jan 22 '13 at 22:45
add a comment |
up vote
0
down vote
up vote
0
down vote
I can confirm that my .bat files works, even though it's on by D:scripts folder. May I suggest put a simple command such as 'Notepad' in the batch file, just to see if it works.
May I also suggest that fire up Task Manager to see what process are are active, for example with your original script, are there any .vbs entries amongst the processes?
One more thought, are you configuring the scripts under User ConfigurationWindows SettingsScripts(LogonLogoff) (my preference), or under Computer Configuration, which can be tricky.
I can confirm that my .bat files works, even though it's on by D:scripts folder. May I suggest put a simple command such as 'Notepad' in the batch file, just to see if it works.
May I also suggest that fire up Task Manager to see what process are are active, for example with your original script, are there any .vbs entries amongst the processes?
One more thought, are you configuring the scripts under User ConfigurationWindows SettingsScripts(LogonLogoff) (my preference), or under Computer Configuration, which can be tricky.
edited Jan 22 '13 at 22:36
answered Jan 22 '13 at 22:29
Guy Thomas
2,57292846
2,57292846
I had them under Computer Configuration. I will try makinga simple case just to confirm it is running. It is not a long running process so its hard to see it in task man
– Derek
Jan 22 '13 at 22:45
add a comment |
I had them under Computer Configuration. I will try makinga simple case just to confirm it is running. It is not a long running process so its hard to see it in task man
– Derek
Jan 22 '13 at 22:45
I had them under Computer Configuration. I will try makinga simple case just to confirm it is running. It is not a long running process so its hard to see it in task man
– Derek
Jan 22 '13 at 22:45
I had them under Computer Configuration. I will try makinga simple case just to confirm it is running. It is not a long running process so its hard to see it in task man
– Derek
Jan 22 '13 at 22:45
add a comment |
up vote
0
down vote
Well this is a common error.
When you have a bat or powershell file, you need to move the script into the folder that you get when you click the "SHOW FILES", by moving the scripts there you are pretty sure that the system has all the required permissions to run at startup.
In my case it is: C:WINDOWSSystem32GroupPolicyMachineScriptsStartup
add a comment |
up vote
0
down vote
Well this is a common error.
When you have a bat or powershell file, you need to move the script into the folder that you get when you click the "SHOW FILES", by moving the scripts there you are pretty sure that the system has all the required permissions to run at startup.
In my case it is: C:WINDOWSSystem32GroupPolicyMachineScriptsStartup
add a comment |
up vote
0
down vote
up vote
0
down vote
Well this is a common error.
When you have a bat or powershell file, you need to move the script into the folder that you get when you click the "SHOW FILES", by moving the scripts there you are pretty sure that the system has all the required permissions to run at startup.
In my case it is: C:WINDOWSSystem32GroupPolicyMachineScriptsStartup
Well this is a common error.
When you have a bat or powershell file, you need to move the script into the folder that you get when you click the "SHOW FILES", by moving the scripts there you are pretty sure that the system has all the required permissions to run at startup.
In my case it is: C:WINDOWSSystem32GroupPolicyMachineScriptsStartup
edited Apr 5 '16 at 4:27
answered Apr 5 '16 at 3:25
Jose Ortega
1214
1214
add a comment |
add a comment |
up vote
0
down vote
First of all make sure that the policy is applied by runnin rsop from command prompt on the computer.
Second of all make sure that the script is accessible from a shared folder that the policy would read from it.
Not to mention some policies requires a restart even after a gpupdate /force . If it's placed under user configuration and you're applying it on a OU of computers make sure loopback processing mode is set to merged.
What I suspect that there's an issue with the batch file calling the vbs file I would recommend the following:
Run a command prompt and try to call the file manually one time from elevated cmd and another time from normal cmd, and it really depends on the methods you're trying to call the vbs file with either it is cscript or wscript now not to mention that some of those batch files are best to be configured as logon scripts under user settings and not computer (which I prefer).
Now try to edit the batch file that calls the script by the following :
@echo off
%WINDIR%SysWOW64cmd.exe
cscript script.vbs or \pathscript.vbs
I think it's better to store the script in the Sysvol share. Or you can simply add the vbs script into the login script. Also if you paste the content of the batch file it would be easier to diagnose what's going on.
add a comment |
up vote
0
down vote
First of all make sure that the policy is applied by runnin rsop from command prompt on the computer.
Second of all make sure that the script is accessible from a shared folder that the policy would read from it.
Not to mention some policies requires a restart even after a gpupdate /force . If it's placed under user configuration and you're applying it on a OU of computers make sure loopback processing mode is set to merged.
What I suspect that there's an issue with the batch file calling the vbs file I would recommend the following:
Run a command prompt and try to call the file manually one time from elevated cmd and another time from normal cmd, and it really depends on the methods you're trying to call the vbs file with either it is cscript or wscript now not to mention that some of those batch files are best to be configured as logon scripts under user settings and not computer (which I prefer).
Now try to edit the batch file that calls the script by the following :
@echo off
%WINDIR%SysWOW64cmd.exe
cscript script.vbs or \pathscript.vbs
I think it's better to store the script in the Sysvol share. Or you can simply add the vbs script into the login script. Also if you paste the content of the batch file it would be easier to diagnose what's going on.
add a comment |
up vote
0
down vote
up vote
0
down vote
First of all make sure that the policy is applied by runnin rsop from command prompt on the computer.
Second of all make sure that the script is accessible from a shared folder that the policy would read from it.
Not to mention some policies requires a restart even after a gpupdate /force . If it's placed under user configuration and you're applying it on a OU of computers make sure loopback processing mode is set to merged.
What I suspect that there's an issue with the batch file calling the vbs file I would recommend the following:
Run a command prompt and try to call the file manually one time from elevated cmd and another time from normal cmd, and it really depends on the methods you're trying to call the vbs file with either it is cscript or wscript now not to mention that some of those batch files are best to be configured as logon scripts under user settings and not computer (which I prefer).
Now try to edit the batch file that calls the script by the following :
@echo off
%WINDIR%SysWOW64cmd.exe
cscript script.vbs or \pathscript.vbs
I think it's better to store the script in the Sysvol share. Or you can simply add the vbs script into the login script. Also if you paste the content of the batch file it would be easier to diagnose what's going on.
First of all make sure that the policy is applied by runnin rsop from command prompt on the computer.
Second of all make sure that the script is accessible from a shared folder that the policy would read from it.
Not to mention some policies requires a restart even after a gpupdate /force . If it's placed under user configuration and you're applying it on a OU of computers make sure loopback processing mode is set to merged.
What I suspect that there's an issue with the batch file calling the vbs file I would recommend the following:
Run a command prompt and try to call the file manually one time from elevated cmd and another time from normal cmd, and it really depends on the methods you're trying to call the vbs file with either it is cscript or wscript now not to mention that some of those batch files are best to be configured as logon scripts under user settings and not computer (which I prefer).
Now try to edit the batch file that calls the script by the following :
@echo off
%WINDIR%SysWOW64cmd.exe
cscript script.vbs or \pathscript.vbs
I think it's better to store the script in the Sysvol share. Or you can simply add the vbs script into the login script. Also if you paste the content of the batch file it would be easier to diagnose what's going on.
edited Dec 14 '16 at 21:21
nKn
4,47552230
4,47552230
answered Dec 14 '16 at 20:46
Elie
480111
480111
add a comment |
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f540119%2flocal-group-policy-logon-startup-script-not-executing%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Are you running this script on your own box? A while ago during the course of regular development at work I changed the default file handler for .vbs files from the normal scripting host to notepad++ so I could edit them. Upon the next login, I was greeted by all of our domain's scripts popping up in notepad++. Lesson learned: make sure you aren't making any assumptions about the file associations for your .bat and .vbs scripts. Just a thought.
– Fopedush
Jan 22 '13 at 22:36
Why overcomplicate things with a BAT and a VBS. Do everything in the VBS.
– Keltari
Oct 6 '14 at 21:01