VBScript to install MSDN....Pls Help
Hello all,
I need your suggestion about vbscript that i am writing, I don't know if this is a right place to ask this question
I have to install msdn from network share using unc path, here we use radia to deploy and that installs msi using local system account
Now here is my mission: I am coding a vbscript to install a msi which is on server share to access it i have to use user id and password.
Here is the script that i am using;
Dim MyNetDrv, MyServer, MyShare, WshShell
Set WshShell = WScript.CreateObject("WScript.Shell")
'Find out next available drive letter
set objFS=CreateObject ("Scripting.FileSystemObject")
set colDrives=objFS.Drives
letter=Asc("c")
while objFS.DriveExists(Chr(letter)+":")
letter=letter+1
wend
MyServer = "msdnsrv"
user = "domain\user"
pwd = "pwdd"
MyShare = "msdn"
MyNetDrv = +UCASE(Chr(letter))+":"
WshShell.Run "C:\winnt\system32\net.exe use " & """MSDNSRV """ & "Ba1l-on /u:prog1\zccauto", 0, true
'Set oNet = Wscript.CreateObject("WScript.Network")
'oNet.MapNetworkDrive MyNetDrv, "\\"& MyServer & "\" & MyShare, False , user, pwd
msiline = "msiexec /i \\msdnsrv\msdn\April2007\msdn.msi SETUP_EXE=yes ADDLOCAL=ALL ALLUSERS=1"
WshShell.Run msiline,0,true
I am mapping a network share, but i should not map any network instead i should install directly from unc path providing used id and password.
Please suggest what can be done to the script
Thanks in advance
I need your suggestion about vbscript that i am writing, I don't know if this is a right place to ask this question
I have to install msdn from network share using unc path, here we use radia to deploy and that installs msi using local system account
Now here is my mission: I am coding a vbscript to install a msi which is on server share to access it i have to use user id and password.
Here is the script that i am using;
Set WshShell = WScript.CreateObject("WScript.Shell")
'Find out next available drive letter
set objFS=CreateObject ("Scripting.FileSystemObject")
set colDrives=objFS.Drives
letter=Asc("c")
while objFS.DriveExists(Chr(letter)+":")
letter=letter+1
wend
user = "domain\user"
pwd = "pwdd"
MyShare = "msdn"
MyNetDrv = +UCASE(Chr(letter))+":"
WshShell.Run "C:\winnt\system32\net.exe use " & """MSDNSRV """ & "Ba1l-on /u:prog1\zccauto", 0, true
0 Comments
[ + ] Show comments
Answers (0)
Please log in to answer
Be the first to answer this question
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.