Solved

Can I make login script actions hidden

Posted on 2013-12-04
7
647 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 500 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
Connect further...control easier

With the ATEN CE624, you can now enjoy a high-quality visual experience powered by HDBaseT technology and the convenience of a single Cat6 cable to transmit uncompressed video with zero latency and multi-streaming for dual-view applications where remote access is required.

 
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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
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…
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 to another domain controller. Log onto the new domain controller with a user account t…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

717 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