JustScriptIt
Technical User
I am trying to create a script that deletes a file that is generated in the process of a service is shutting down. Once the service has shut down, the file disappears.
That means, the script must
1. Detect the presence of a file
2. Then it can delete it
What WMI tools do I use? Are there other functions I can use to make this work?
Below is pseudo-code
That means, the script must
1. Detect the presence of a file
2. Then it can delete it
What WMI tools do I use? Are there other functions I can use to make this work?
Below is pseudo-code
Code:
shutdown smc.exe
while smc.exe is shutting down, detect whether LUInfo.dat has been created. If yes, then delete it.
start smc.exe