[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Can I make login script actions hidden

Posted on 2013-12-04
7
Medium Priority
?
747 Views
Last Modified: 2014-01-06
I set up a login script .bat file to map network drives and install some shared printers because the users keep deleting them. It works but as the user logs in they see the CMD window and then it opens each printer's Window (not sure what its called I attached a screen shot) Then it dissappears. Now they're complaining they don't want to see this. Is there any way to get the script to work yet not display anything on their screens just map the drives and printers in the backgound
printer.doc.docx
0
Comment
Question by:Axis52401
[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
7 Comments
 
LVL 9

Accepted Solution

by:
Trenton Knew earned 2000 total points
ID: 39696939
Are you able to make the script run as the system account?  Maybe use the task scheduler ...  checkout

SCHTASKS /?
SCHTASKS /Create /?
SCHTASKS /Run /?

There is also a group policy for running tasks silently I think.  Maybe create and run task as system account during logon?
0
 
LVL 57

Expert Comment

by:Mike Kline
ID: 39696940
Test this GPO

User Configuration | Administrative Templates | System | Scripts

GPO = Run legacy logon scripts hidden

Have you looked at group policy preferences for some of this?  Just for down the road.

Thanks

Mike
0
 
LVL 2

Author Comment

by:Axis52401
ID: 39696955
What do you mean by make the script run as the system account? I have a/bat file on the server Sysvol\domain etc and in the user profile it set to use that file. I don't want to have to go to each station an create a task on each PC

I Tried that setting in the GP either I did it wrong or Its not applying because after running gpupdate on the test PC i'm using I still see the cmd window and printer popups. If I could even get the login script batch file to skip everything if its already mapped that might work too but I don't know the dos commands to do that. that way it would only happen once for each user not every time
0
Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

 
LVL 9

Expert Comment

by:Trenton Knew
ID: 39696958
might also be an idea to recreate the printers at logoff instead of logon.  That way the printers dialog never becomes an issue as the machine "preps" itself for the next user when the last user logs off.

There might also be a group policy setting that disallows the deletion of printers.
0
 
LVL 9

Expert Comment

by:Trenton Knew
ID: 39696967
if you run the .bat file via the task scheduler, you can specify which user account to run the script as.  If you run the script under NT_AUTHORITY\SYSTEM the user will not see the bat file run, nor will the printer window pop up (I think).
0
 
LVL 2

Author Comment

by:Axis52401
ID: 39696989
How do I set it to run via the task scheduler? Its worth a try
0
 
LVL 24

Expert Comment

by:Sandeshdubey
ID: 39700262
Try this vbs script and apply the logon policy to map the drive.I have applied many times this does not prompt for printer windows.Save the file as filename.vbs,copy the file to sysvol share(script folder) and apply the logon policy.


Dim multiPrinter, UNCpath1, UNCpath2, UNCpath3, UNCpath4, UNCpath5
UNCpath1 = "\\server01\printer1"
UNCpath2 = "\\server01\printer2"
UNCpath3 = "\\server01\printer3"
UNCpath4 = "\\server01\pinter4"
UNCpath5 = "\\server01\printer4"
Set multiPrinter = CreateObject("WScript.Network")
multiPrinter.AddWindowsPrinterConnection UNCpath1
multiPrinter.AddWindowsPrinterConnection UNCpath2
multiPrinter.AddWindowsPrinterConnection UNCpath3
multiPrinter.AddWindowsPrinterConnection UNCpath4
multiPrinter.AddWindowsPrinterConnection UNCpath5
multiPrinter.SetDefaultPrinter UNCpath1
WScript.Quit

Alternately you can apply  GP Preferences to map printer but for WinXP you need to install Client Side Extensions for Windows XPhttp://www.microsoft.com/en-in/download/details.aspx?id=3628: http://blogs.technet.com for policy to work:

 GP Preferences to map printer ;http://blogs.technet.com/b/grouppolicy/archive/2009/06/24/gp-preferences-set-a-default-printer.aspx
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

Group policies can be applied selectively to specific devices with the help of groups. Utilising this, it is possible to phase-in group policies, over a period of time, by randomly adding non-members user or computers at a set interval, to a group f…
Here's a look at newsworthy articles and community happenings during the last month.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Suggested Courses

649 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