Let me try to be clearer and use the actual network paths for illustration purposes:
***Please note: Item 4 is important. It's been established 1000 times. Thank you.***
1. R: drive is mapped to network path [highlight #FCE94F]
\\RAO_ARIA_DB\Custom Reports\[/highlight]
2. S: drive is mapped to network path [highlight #FCE94F]
\\ServerABC\Main Photos\[/highlight]
3. Let's simplify. Say there are only 3 user ID's involved. Domain:
Domain123
Me: userme
Admin: useradmin Password: password1
3rd user: userregular
4.
All 3 users have the same mapped drives for R: and S: drives on their respective PC's. All 3 users are permitted to access the locations linked to by R: and S:
[highlight #8AE234]
I need a script that will open
S:\Photos Folder\User ABC\Face Photos as
useradmin without having to use the network path. Please do not ask why.

I need Explorer to open the location in the S drive.[/highlight]
Tester.vbs located in
R:\~ Machine Links\zzz_Scripts works perfectly when
userme or
userregular runs it. Contents:
Set objShell = CreateObject("Wscript.Shell")
'Line2
'Line3
'Line4
'Line5
objSHell.Run("""S:\Photos Folder\User ABC\Face Photos""")
Now, I want to accomplish the highlighted in green, so I have another script in the same location:
RunAs.vbs. Contents:
Dim strCreateFolder
'strCreateFolder = "R:\~ Machine Links\zzz_Scripts\Tester.vbs"
strCreateFolder = "\\RAO_ARIA_DB\Custom Reports\~ Machine Links\zzz_Scripts\Tester.vbs"
'strCreateFolder = "Tester.vbs"
set WshShell = CreateObject("WScript.Shell")
strCmdLine = "runas /netonly /noprofile /user

omain123\useradmin" & _
" ""cmd.exe /c wscript " & "\""" & strCreateFolder & "\""" & """"
WScript.echo strCmdLine
WshShell.Run strCmdLine, 2, False
WScript.Sleep 100
WshShell.Sendkeys "password1~"
Note: Ultimately, it is
strCreateFolder = "\\RAO_ARIA_DB\Custom Reports\~ Machine Links\zzz_Scripts\Tester.vbs" that worked. So I'm down to the issue of why
RunAs.vbs cannot execute
Tester.vbs correctly so that
S:\Photos Folder\User ABC\Face Photos is opened as user
useradmin
I hope I am very clear enough here. All the previous questions and unclear assumptions have been addressed. There are only 2 scripts involved:
RunAs.vbs and
Tester.vbs. Attached are the error messages returned when
RunAs.vbs is run by
userme or
userregular. The 3 error messages pertain to that
strCreateFolder line when it is changed.
HELP PLEASEEEEEEEEEEEEE!!!!