I have a .bat file that has the following links with network passwords.
net use u: \\Myserver\Folder45 Cyrus024 /User:NA\cyrus.t.andrews
net use v: \\Myserver\Folder3645 Cyrus024 /User:NA\cyrus.t.andrews
net use x: \\Myserver\Folder32645 Cyrus024 /User:NA\cyrus.t.andrews
net use y: \\Myserver\Folder995 Cyrus024 /User:NA\cyrus.t.andrews
I want the code to pull the password "Cyrus24" so that it can be replaced. I want to be able to do this every 30 days when the password expires. Problem is I have to define the string exactly in order to change the characters I want to change. How can I get the code to pull any 8 characters that proceed "^/User:NA\cyrus.t.andrews"?
Here is what I have tried:
'--get text to replace and new text.
s1 = inputbox ("Enter text to be replaced.", "What to replace?", Right/User:NA\cyrus.t.andrews ",8))