Solved

Where is a batch program being triggered from at logon

Posted on 2016-10-18
9
26 Views
Last Modified: 2016-10-25
Hello:

I am in the process of removing printers from our older Print Server and adding printers from our new Print Server.  I have a script that executes the removeprinters.bat file and then another script that adds the printers from the addprinters.bat file, that are triggered at logon from our Group Policy.  The add/remove printer process is working just fine.

The problem is that I have 1 user that logs on to a laptop and he always wanted to have 1 specific printer to be his default printer.  About 1.5 years ago, I created a batch program that specifies that network printer to be his default as he logs on to that specific laptop.  I put the batch file in the user' C:\Users\username\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup - folder.  Since I am now removing the older printers and adding the new printer I needed to change this locally stored batch program to reflect the new printer name (new printer server).

The problem is that I cannot find that batch program right now to edit/remove it.  But, that program is still being triggered at logon.  
If I navigate to the C:\Users\username\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup - folder that batch program is not in there.  Nor is that batch program in the C:\Windows\Start Menu\Programs\Startup - folder of that laptop.  But the funny thing is that the batch program still is triggered because the user and I see it executing at logon.  The batch program brings up a DOS windows and attempts to designate the printer on the older printer server as the default printer.  Since the older printer is not longer installed on that laptop an error message comes up instead.  The user simply clicks the 'OK' button and proceeds with his day.

How can I find the batch file that is being triggered on the laptop at logon?  perhaps I should do a search on the computer for that file name?  i do not see any reference listed in the registry (Computer\HKey Local Machine\Software\Microsoft\windows\current version\Run .

I will have a chance to look at this laptop tomorrow.
0
Comment
Question by:Pkafkas
9 Comments
 
LVL 21

Assisted Solution

by:Joseph Moody
Joseph Moody earned 167 total points
Comment Utility
Have you checked the logon script attribute in the users AD properties?
0
 
LVL 23

Assisted Solution

by:NVIT
NVIT earned 167 total points
Comment Utility
Examine the addprinters.bat. Maybe it's called from there.  Or the users AD profile has a batch that runs?
0
 
LVL 62

Assisted Solution

by:☠ MASQ ☠
☠ MASQ ☠ earned 166 total points
Comment Utility
Addprinters.bat is a good idea
you might also find it with Autoruns
https://technet.microsoft.com/en-us/sysinternals/bb963902.aspx
0
 

Author Comment

by:Pkafkas
Comment Utility
To answer teh above questions:

The local batch program which sets a default printer, is not run from the login script.

The local batch program which sets a default printer, is not run from the addprinters batch file (group policy).
0
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

Author Comment

by:Pkafkas
Comment Utility
right away when this user logs on, the following batch program executes.  And then then error comes up.

logon
I will see if this error comes up for other users as well.  I am conducting searches for the batch file.  It may be important to mention that local group policy does not trigger anything at start up.
0
 

Accepted Solution

by:
Pkafkas earned 0 total points
Comment Utility
I found it from a search.

screen2
0
 
LVL 23

Assisted Solution

by:NVIT
NVIT earned 167 total points
Comment Utility
Glad you solved it, Pkafkas
0
 

Author Comment

by:Pkafkas
Comment Utility
I figured out the actual problem on my own, I simoply was looking in the incorrect start up folder; however, being able to discuss the problem helped me bring some much needed clarity to figure it out.
0
 

Author Closing Comment

by:Pkafkas
Comment Utility
I figured it out myself.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

A Bare Metal Image backup allows for the restore of an entire system to a similar or dissimilar hardware. They are highly useful for migrations and disaster recovery. Bare Metal Image backups support Full and Incremental backups. Differential backup…
Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…

763 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

9 Experts available now in Live!

Get 1:1 Help Now