cptHark Posted November 6, 2019 Posted November 6, 2019 Hello I want to conect to a Network with DriveMapAdd. This worked just fine but when you restart the Computer the Mapped drive is gone. So i used the persistent mapping flag and that seemed to work, too. However when the Computer is restarted I cant connect to the Network because it doesnt remember the Username and password I ave it the first time. How do I fix this? My Code:Func setdrivem() DriveMapAdd("M:", GUICtrlRead($driveM),1, GUICtrlRead($netzuser),GUICtrlRead($netzpassword) ) EndFunc $netzuser and $netzpassword are set earlier in the gui and it works right after executing the script but i want it to stay connected
Nine Posted November 6, 2019 Posted November 6, 2019 You would need to save them in a file (.ini file for ex.) or save them in registry. “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
Nine Posted November 6, 2019 Posted November 6, 2019 Well, at least decide, which one of the 2 solutions I proposed you prefer “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
rudi Posted November 8, 2019 Posted November 8, 2019 #cs [Mapping One] Drive=M: UNC=\\Server\Share\Path User=MyUserName PlainTextPassword=T0p53cRet #ce $ini="C:\temp\Mapping.ini" $sect="Mapping One" $Default="!-ERROR-!" $Persistent=1 $Key="Drive" $Drive=IniRead($ini,$sect,$Key,$Default) $Key="UNC" $UNC=IniRead($ini,$sect,$Key,$Default) $Key="User" $User=IniRead($ini,$sect,$Key,$Default) $Key="PlainTextPassword" $PlainTextPassword=IniRead($ini,$sect,$Key,$Default) DriveMapAdd($Drive,$UNC,$Persistent,$User,$PlainTextPassword) cu, Rudi. Earth is flat, pigs can fly, and Nuclear Power is SAFE!
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