Login | |
|
 |
RE: Syntax error line 1 character 9??? - 11/18/2008 3:12:46 AM
|
|
 |
|
| |
Filfoot
Posts: 5
Score: 0
Joined: 9/24/2008
Status: offline
|
Thanks guys for yourhelp and patience The whole code is below ,but it's just the last two lines I guess you'll be interested in. ' VBScript to map a network drive to the UserName. ' -----------------------------------------------------------------' Set objNet = CreateObject("WScript.Network") Set objFSO = CreateObject("Scripting.FileSystemObject") If objFSO.DriveExists("f:") Then objNet.RemoveNetworkDrive "f:",True,True End If If objFSO.DriveExists("g:") Then objNet.RemoveNetworkDrive "I:",True,True End If If objFSO.DriveExists("I:") Then objNet.RemoveNetworkDrive "I:",True,True End If If objFSO.DriveExists("o:") Then objNet.RemoveNetworkDrive "o:",True,True End If If objFSO.DriveExists("p:") Then objNet.RemoveNetworkDrive "p:",True,True End If If objFSO.DriveExists("q:") Then objNet.RemoveNetworkDrive "q:",True,True End If If objFSO.DriveExists("r:") Then objNet.RemoveNetworkDrive "r:",True,True End If If objFSO.DriveExists("s:") Then objNet.RemoveNetworkDrive "s:",True,True End If If objFSO.DriveExists("T:") Then objNet.RemoveNetworkDrive "T:",True,True End If If objFSO.DriveExists("y:") Then objNet.RemoveNetworkDrive "y:",True,True End If objNet.MapNetworkDrive "F:" , "\\Ksserver\Data" objNet.MapNetworkDrive "I:" , "\\Irisserver\TT" objNet.MapNetworkDrive "O:" , "\\Sage\PracticeMana\Z-Office Procedures Manual" objNet.MapNetworkDrive "P:" , "\\Sage\Payroll" objNet.MapNetworkDrive "Q:" , "\\Sage\PayBackup" objNet.MapNetworkDrive "R:" , "\\Sage\AccBackups" objNet.MapNetworkDrive "S:" , "\\Invuserver\Accountsprogs" objNet.MapNetworkDrive "T:" , "\\Scanner1\Tax" objNet.MapNetworkDrive "Y:" , "\\Irisserver\PVSW" ' This bit maps to user name ' -----------------------------------------------------------------' 'Option Explicit Dim objNetwork Dim strDriveLetter, strRemotePath, strUserName strDriveLetter = "g:" strRemotePath = "\\Invuserver\Invu\InvuPrinter" ' Purpose of script to create a network object. (objNetwork) ' Then to apply the MapNetworkDrive method. Result J: drive Set objNetwork = WScript.CreateObject("WScript.Network") ' Here is where we extract the UserName strUserName = objNetwork.UserName objNetwork.MapNetworkDrive strDriveLetter, strRemotePath _ & "\" & strUserName ' Extra code just to add a message box (take out the apostrophes') 'WScript.Echo " Launch Explorer, check: "& strDriveLetter 'WScript.Quit Set objNet = Nothing Set objFSO = Nothing Set objReg = Nothing 'This bit copys sage file to individual PC Set WSHShell = CreateObject("Wscript.Shell") WSHShell.Run ("s:\Sagebat.bat") Msiexec /i \\INVUSERVER\INVU.Setup.Client.msi /qn SERVERNAME=INVUSERVER START=NO
|
|
| |
|
|
|
 |
RE: Syntax error line 1 character 9??? - 11/18/2008 3:57:02 AM
|
|
 |
|
| |
ebgreen
Posts: 5251
Score: 31
Joined: 7/12/2005
Status: offline
|
If it is available, then GPO install is certainly an option. The only problem that I have with it is if there needs to be related prep work done on a machine before the product will install. In that case, making sure that the dependencies are done first can be problematic.
_____________________________
"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm http://www.visualbasicscript.com/m_47117/tm.htm
|
|
| |
|
|
|
|
|