Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question
    
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
add comment

1 Answer

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 Configuration\Windows Settings\Scripts(Logon\Logoff) (my preference), or under Computer Configuration, which can be tricky.

share|improve this answer
    
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 comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.