BASH is poorly suited to this, almost nothing in Windows is designed using the UNIX process model. Your bash script will be a thin wrapper around whatever external utility you find which allows you to generate arbitrary keypresses (and odds are, that utility will be flagged and deleted by your antivirus).
MS Windows has three kinds of directory paths which partly overlap and partly don't and almost no programs implement all of them.
BASH would be no help here, as in UNIX, there's only one kind of path and network filesystems are the responsibility of the operating system, not the shell.
MS fortunately made a few kludges to join different kinds of paths together when your app needs a specific kind.
You should be able to turn a shared folder into a drive letter CMD can use, via something like
net use Z: \\computer_name\share_name /PERSISTENT:YES
That might even be a permanent mapping, unless you do
pushd/popd is just a wrapper made around cd, it doesn't possess the magical ability to convert a network path into a local one. Altering the universe like that is an operating system feature. You have to ask Windows to do what you want.
Y is the first free letter on the server.
The program is opened, but the vbscript (see above) is not executed. It starts only when I close the program� Any clue on what happens?