Quantcast
Channel: PowerShell General
Viewing all articles
Browse latest Browse all 10624

I need my script to wait on a registry value to populate

$
0
0

I having an issue with a powershell script that is running a little to early. The script is suppose to read a registry value or attribute then map a printer. The script runs on startup and based on the users location they will get a printer that is assigned to that area. What is happening is the location aware agent isn't populating the registry keys before the script runs, and even if I delay it for 5 or 10 seconds.

So my question is, Is there a way to "read" the registry key to see when it gets populated or changes and the run the script? Any ideas?


Viewing all articles
Browse latest Browse all 10624

Trending Articles