Hello.
I'm using FileInfo to determine if a file exists on a network PC and then delete it.
I'm running the app from the desktop of the main server that has full permissions.
The FileInfo only works when the PC that I want to delete a file has someone logged in to it, otherwise it will not work.
The app is winforms (soIUSR accound is not used) .
Also let me mention that if I use the file explorer to delete the file while the PC is not logged in, it works fine.
So any advice? Should I use impersonation? I kinda not want to as the admin pass for the main server changed from time to time.
Thanks.
I'm using FileInfo to determine if a file exists on a network PC and then delete it.
I'm running the app from the desktop of the main server that has full permissions.
The FileInfo only works when the PC that I want to delete a file has someone logged in to it, otherwise it will not work.
The app is winforms (soIUSR accound is not used) .
Also let me mention that if I use the file explorer to delete the file while the PC is not logged in, it works fine.
So any advice? Should I use impersonation? I kinda not want to as the admin pass for the main server changed from time to time.
Thanks.