You could try mapping the share with the net
command:
net use R: \\%IP%\c %password% /USER:%username%
if errorlevel 1 goto :eof
start notepad R:\%path%\filename.ini
When you are finished you can run:
net use R: /DELETE
The only thing I'm concerned about here is that because you're using the start
command, you can't clean up the mapped drive, otherwise it might disappear before notepad can open the file. And you wouldn't be able to save it.
Perhaps you would consider splitting this into a script that sets up a mapping and another script that does the required actions.
For more information, type:
net help use