Solved

Logon Script on Laptop

Posted on 2011-02-24
10
1,469 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 
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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Can't Login to Laptop 18 46
Configure Windows Server 2012 time server 3 39
Duplicate SPN entries 1 24
Deploying MSI package with GPO 3 27
There are many software programs on offer that will claim to magically speed up your computer. The best advice I can give you is to avoid them like the plague, because they will often cause far more problems than they solve. Try some of these "do it…
Auditing domain password hashes is a commonly overlooked but critical requirement to ensuring secure passwords practices are followed. Methods exist to extract hashes directly for a live domain however this article describes a process to extract u…
This Micro Tutorial will teach you how to the overview of Microsoft Security Essentials. This is a free anti-virus software that guards your PC against viruses, spyware, worms, and other malicious software. This will be demonstrated using Windows…
This Micro Tutorial will give you basic overview of the control panel section on Windows 7. It will depth in Network and Internet, Hardware and Sound, etc. This will be demonstrated using Windows 7 operating system.

752 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