Solved

command won't run from my logon script

Posted on 2006-10-25
8
162 Views
Last Modified: 2010-04-13
I created a Logon Script policy for an OU.  The script checks users' environment and call  a few batch files to update software/settings if needed.  The script ran perfectly OK from Windows Explorer.  However, it won't run the last batch file once I try it from the Logon Script policy.  Is there a limit on how many batch files can be nested and called from a logon script?   What is the best way to resovle this problem?  Thank you.



0
Comment
Question by:altonyoung
8 Comments
 
LVL 5

Expert Comment

by:Yogalingam
ID: 17808002
As of such there is no limits for adding scripts but if your script works fine. kindly try to readd the script files.
If you require some help on how to add the batch files/scripts to GP
http://www.serverwatch.com/tutorials/article.php/1474241
0
 
LVL 4

Expert Comment

by:eaperezh
ID: 17812831
Make sure that your batch file is not returning a screen or some for of output that you are not handling properly.

Also, make sure that the script/batch being executed is located in a place where the users can read it. If you run it interactively with your credentials, does it work? if you run it interactively with someone else's credentials (not a person with admin rights, that will spoil the fun) does it work?

0
 

Author Comment

by:altonyoung
ID: 17815835
Yogalingam,

I did try readding the script a few times.  Same result.

Eaperezh,

I ran the same script interactively as a regular user, not an administrator, it ran fine.  I only had trouble with the last line of code in a batch file that was called from the script.  There's nothing in my scirpt that would require user interaction.  

Any more ideas?   Thank you all for the support.  

 
0
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 
LVL 4

Expert Comment

by:eaperezh
ID: 17818973
when you say it wont run the last batch file, what is the difference with the previously called batch files? Do you re-initialize some variables as to not allow a mixup?
Is this batch being called the same way as the others?
0
 

Author Comment

by:altonyoung
ID: 17820088
I do not set or re-initialize any variables in my batch files.   Here is what I tried in the batch file:

Test 1:
Step 1.  run the program setup.exe
Step 2.  run update.exe for the program
Step 3.  run the batch file to set up user environment such as user defined views, registry keys, etc.

Test 2:
Step 1:  run the program setup.exe
Step 2: run the batch file to setup user envrionment
Step 3: run the update.exe for the program

In both tests, step 3 wouldn't run.  




 

0
 

Author Comment

by:altonyoung
ID: 17844501
I thought I would let you guys know what I found out:  I use sleep.exe in my batch file to wait for the previous process to finish before continue on to process the next command.  My original setting was to wait for 2.5 minutes.  Once I shorten the waiting time for sleep.exe to 1.5 minute, problem sovled.  Is there a time limit for logon scripts?   Thank you.  

0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
ID: 18309749
PAQed with points refunded (125)

Computer101
EE Admin
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
Owning a franchise can be the dream of a lifetime. It provides a chance for economic growth. You can be as successful as you want.  To make your franchise successful, you need to market it successfully. Here are six of the best marketing strategies …
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now