Solved

Can I make login script actions hidden

Posted on 2013-12-04
7
483 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
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
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
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

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

Join & Write a Comment

I'm a big fan of Windows' offline folder caching and have used it on my laptops for over a decade.  One thing I don't like about it, however, is how difficult Microsoft has made it for the cache to be moved out of the Windows folder.  Here's how to …
Resolve DNS query failed errors for Exchange
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 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 …

708 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

14 Experts available now in Live!

Get 1:1 Help Now