Chimaera Posted February 19, 2015 Share Posted February 19, 2015 (edited) We have just had a small raid server installed at work to protect customer files and some of our stuff as well I have a tool which retrieves customer backups from the network back to the machines after format etc This is how i access at min, i test for a file on the server then they choose a folder to retrieve If FileExists("\\TSSERV\BackupShare\test.dll") Then $sSource = FileSelectFolder("Choose A Backup.", "\\TSSERV\BackupShare", 2) If @error Then ; If error then add warning Switch @error Case 1 MsgBox($MB_ICONWARNING, "Selection Error", "User Cancelled Operation", 4) EndSwitch EndIf Then the program uses robocopy to copy the files across and to avoid UNC problems. The machine being used to access the server has never connected to before. Now the issue is this is a proper server now with username and password and the first bit should trigger the popup where we have to put in the username/password, but it doesnt seem to then we have to try and open it by network and trigger the popup etc Is there a way to add them automatically? Its only used on our network and only staff use it so user and pass isnt a prob Edited February 19, 2015 by Chimaera If Ive just helped you ... miracles do happen. Chimaera CopyRobo() * Hidden Admin Account Enabler * Software Location From Registry * Find Display Resolution * _ChangeServices() Link to comment Share on other sites More sharing options...
Chimaera Posted February 19, 2015 Author Share Posted February 19, 2015 Managed to get somewhere on this like this Global $netsh1 = ShellExecuteWait("netsh.exe", 'advfirewall firewall set rule group="Network Discovery" new enable=Yes', "", "", @SW_HIDE) Global $netsh2 = ShellExecuteWait("netsh.exe", 'advfirewall firewall set rule group="File and Printer Sharing" new enable=Yes', "", "", @SW_HIDE) Global $netuse = Run(@ComSpec & " /c " & "net use p: \\TSSERV\BackupShare /user:username password", "",@SW_SHOW) Had to switch on discovery etc Then add the access command If Ive just helped you ... miracles do happen. Chimaera CopyRobo() * Hidden Admin Account Enabler * Software Location From Registry * Find Display Resolution * _ChangeServices() Link to comment Share on other sites More sharing options...
Chimaera Posted February 27, 2015 Author Share Posted February 27, 2015 Still getting a problem with this When i run this $netuse = Run(@ComSpec & " /c " & "net use p: \\TSSERV\BackupShare /user:username password /persistent:yes", "", @SW_SHOW) It creates the share correctly but after a reboot the share has a cross against it and you cant login with inputting the password If i map the share manually it works correctly Any ideas? If Ive just helped you ... miracles do happen. Chimaera CopyRobo() * Hidden Admin Account Enabler * Software Location From Registry * Find Display Resolution * _ChangeServices() Link to comment Share on other sites More sharing options...
Radiance Posted February 27, 2015 Share Posted February 27, 2015 I've had a similar problem once where the remote system was not using active directory to authenticate users and had its own user management system. I figured out that only way to get it to work was setting the username/password on both the AD user and the user to log onto the target system to exactly the same. Link to comment Share on other sites More sharing options...
Chimaera Posted February 27, 2015 Author Share Posted February 27, 2015 at the minute the only way round it ive found is to delete all 4 connections at startup and recreate them If Ive just helped you ... miracles do happen. Chimaera CopyRobo() * Hidden Admin Account Enabler * Software Location From Registry * Find Display Resolution * _ChangeServices() Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now