Solved

Logon Script on Laptop

Posted on 2011-02-24
10
1,468 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 47

Expert Comment

by:Donald Stewart
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
 

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:Donald Stewart
Donald Stewart 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
A project that enables an administrator to perform actions within a user session context not just at the time of login but any time later on day(s) or week(s) later.
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles from a Windows Server 2008 domain controller to a Windows Server 2012 domain controlle…
This tutorial will walk an individual through the process of configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …

821 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