I am trying to create a batch file that will map a shared folder on another domain. After some research, I found the NET USE command to map drives.
@echo off
Net Use M: \\IP\Folder\ /persistent:yes /USER:domain\userID PASS
This works great for mapping the drive, but when I open it, the folder is empty. When I remote desktop onto server, I can see that the folder is not empty, and I know the permissions have not changed because I just set them, and no one else has access to change them. Moreover, if I don't use NET USE and map the drive manually, i get prompted for UserName and Password, and all is well, folder is not empty.
Why is NET USE causing the folder to appear empty?