Solved

Logon Script on Laptop

Posted on 2011-02-24
10
1,458 Views
Last Modified: 2012-05-11
I apologize in advance for the length of this post but I tried to provide all relevant information.

The Scenario:
=============
Windows Server 2003 Standard Edition.
Windows 7 Pro running on a laptop.
Drive mapping accomplished with logon script configured in group policy.
Logon script called using launchapp.wsf in order to avoid the elevated token issue introduced with UAC.

We've used this logon script configuration with many clients in mixed environments (Server 2003/2008, Windows XP/Vista/7) without any issues.  As a side note, launchapp.wsf includes code to differentiate between XP and Vista/7 as well as elevated/non-elevated users. (Thanks to Michael Murgolo: http://blogs.technet.com/b/elevationpowertoys/archive/2010/05/25/uac-logon-scripts-and-the-launchapp-wsf-workaround.aspx)

The Problem:
============
One of our clients informed us that network drives were missing.  We've narrowed it down to the scheduled task created by launchapp.wsf - it will not run on a laptop if the laptop is running on batteries.  We could manually change that setting in the task but the task will get overwritten by launchapp.wsf at the next logon so there's no point.

We've thought of a couple of options but haven't had any luck in determining if they are even possible.  If anyone could help out, I'd greatly appreciate it:

Option 1:
=========
Include the setting for the task to run despite laptop running on batteries when launchapp.wsf creates the task.  However, there doesn't appear to be a command line switch for task power options, so there doesn't seem to be a way to do this.

Option 2:
=========
Use group policy (or local policy on the laptop) to change the default settings used when tasks are created but in 2003 group policy, the task scheduler settings don't include power options.

Option 3:
=========
Tell the user to plug-in before loging on.  We've done this but we know there will be times that they forget.

As a work-around, we've placed a shortcut to the script on their desktop for them to run if they don't see any network drives after logging on.

Again, sorry for the lengthy post.  If anyone has encountered this problem and has a solution, please let me know.

Thanks in advance.
0
Comment
Question by:Sabbec
  • 5
  • 2
  • 2
  • +1
10 Comments
 
LVL 5

Expert Comment

by:ccns
ID: 34974830
im guessing you have tried putting the login script in the login script area in users AD user account and that doesnt work which is why you are using group policy?
as it will map the drives no matter what
0
 

Author Comment

by:Sabbec
ID: 34974906
Thanks for suggesting that option - I thought of earlier today but haven't had a chance to try it.  We generally prefer to use group policy because we've found that it's easier to manage as users change roles in an organization because we can move them to different OUs to have their logon change rather than modifying individual user accounts.  My plan is to make that change before the user logs in tomorrow morning (they're offsite today).  I will let you know if it works.
0
 
LVL 10

Accepted Solution

by:
APNFSSC earned 400 total points
ID: 34974918
I think you need to alter the Launchapp.wsf file so that it set's the battery settings when creating the new task

http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/Q_26298859.html

0
 
LVL 47

Expert Comment

by:dstewartjr
ID: 34974920
Have you considered scrapping logon scripts altogether and using Group Policy Preferences ?


GP Preferences Will Reduce Logon Scripts : Mapping Drives


http://blogs.technet.com/b/grouppolicy/archive/2009/02/11/gp-preferences-will-reduce-logon-scripts-mapping-drives.aspx
0
 
LVL 5

Expert Comment

by:ccns
ID: 34974980
also you could put in two scripts into group policy. one with specific mapped drives only and then one with the other stuff.
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Author Comment

by:Sabbec
ID: 34978328
ccns:
I opted to not put the script in the user's account so that I can try APNFSSC's suggestion.

APNFSSC:
This looks like what I needed!  I tried this change in our sandbox environment and it worked perfectly so I put it on the production server (made a temporary OU with the change so I can test for one end-user).  That person won't be trying it for a few hours but I'll let you know the results.

dstewartjr:
Correct me if I'm wrong but GP Preferences are only available in Server 2008 and this is Server 2003.
0
 
LVL 47

Assisted Solution

by:dstewartjr
dstewartjr earned 100 total points
ID: 34980011
You are wrong :)

All you need is one Vista/Windows 7 on the network. You then install RSAT on the Vista/Windows 7.

Next You install CLient Side Extensions on your XP/Server 2003 clients <<< you can deploy these with WSUS

http://www.microsoft.com/downloads/en/details.aspx?FamilyID=e60b5c8f-d7dc-4b27-a261-247ce3f6c4f8&displaylang=en
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=bfe775f9-5c34-44d0-8a94-44e47db35add&displaylang=en

Now you can use the new group policies that come with 2008 on your 2003 network
0
 

Author Comment

by:Sabbec
ID: 35000795
Sorry for the delay in responding.  I'm still waiting to hear back from the client as to whether it worked.  (They're bogged down with RRSP season but the deadline is today.)

The changes I made are based on APNFSSC's solution - I'm pretty confident they'll work but I want to have client confirmation before awarding points.

A side note to dstewartjr:
Thanks for the information!  I'm going to try implementing this internally before rolling it out to a client.
0
 

Author Comment

by:Sabbec
ID: 35012793
I still haven't been able to reach the client so I'm going to award points anyway because I'm confident that APNFSSC's solution will work.  I'm also going to award points to dstewartjr for setting me straight on GP Preferences in 2003.
0
 

Author Comment

by:Sabbec
ID: 35023226
I forgot to upload the revised script.  Since I can't upload a .wsf file, it's named launchapp..txt file.  Just rename it to launchapp.wsf to use it. Launchapp.txt
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
ACTIVE DIRECTORY 4 23
firefox deployment by sccm 1 20
active directory 3 21
Windows 2003 SID Regeneration in ESXi 6.0 5 0
Resolve DNS query failed errors for Exchange
Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
This Micro Tutorial will teach you how to change your appearance and customize your Windows 7 interface to your unique preference. This will be demonstrated using Windows 7 operating system.

707 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

16 Experts available now in Live!

Get 1:1 Help Now