Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Syntax error line 1 character 9???

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,66595
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Syntax error line 1 character 9???
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Syntax error line 1 character 9??? - 11/18/2008 2:07:12 AM   
  Filfoot

 

Posts: 5
Score: 0
Joined: 9/24/2008
Status: offline
 
I am trying to place the following code into a VBscript .

Msiexec /i F:\INVU.Setup.Client.msi





The code should launch microsoft installer and install program in the backgroubd, however I get the error  message

Windows script host
Line 1
Char 9
Syntax error
Code 800A03EA
Microsoft VBScript compilation error

Any ideas why ??? Code
 
 
Post #: 1
 
 RE: Syntax error line 1 character 9??? - 11/18/2008 2:10:57 AM   
  dm_4ever


Posts: 2728
Score: 46
Joined: 6/29/2006
From: Orange County, California
Status: offline
How exactly are you running it?  Post code.

_____________________________

dm_4ever

My philosophy: K.I.S.S - Keep It Simple Stupid
Read Me: http://www.visualbasicscript.com/m_24727/tm.htm
Frequently Asked Stuff: http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to Filfoot)
 
 
Post #: 2
 
 RE: Syntax error line 1 character 9??? - 11/18/2008 2:50:57 AM   
  Filfoot

 

Posts: 5
Score: 0
Joined: 9/24/2008
Status: offline
 
Will be running it through a logon script. But tested it by double clicking on the VBS file within windows explorer

The code is
Msiexec /i F:\INVU.Setup.Client.msi

If I type the above command into a command prompt it works..

Thanks

(in reply to dm_4ever)
 
 
Post #: 3
 
 RE: Syntax error line 1 character 9??? - 11/18/2008 2:56:17 AM   
  ebgreen


Posts: 5251
Score: 31
Joined: 7/12/2005
Status: offline
VBScript is not just command line commands. That would be a batch file (sort of). Do you want to do this in VBScript or in a batch file?

_____________________________

"... 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

(in reply to Filfoot)
 
 
Post #: 4
 
 RE: Syntax error line 1 character 9??? - 11/18/2008 2:56:42 AM   
  jpjeffery

 

Posts: 27
Score: 0
Joined: 11/17/2008
Status: offline
I'm going to double-up on dm4ever's suggestion. Post your code!
quote:

Msiexec /i F:\INVU.Setup.Client.msi
is not VBScript code so if you "...tested it by double clicking on the VBS file within windows explorer..." then it'll be really useful to see the code in that file in order to help.

_____________________________

JJ

Variables won't. Constants aren't

Apostrophes do not belong in plurals of anything, especially not acronyms like HDD, PC, CPU and so on

(in reply to Filfoot)
 
 
Post #: 5
 
 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

(in reply to jpjeffery)
 
 
Post #: 6
 
 RE: Syntax error line 1 character 9??? - 11/18/2008 3:22:17 AM   
  ebgreen


Posts: 5251
Score: 31
Joined: 7/12/2005
Status: offline
Use the .Run() command to run the install.

_____________________________

"... 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

(in reply to Filfoot)
 
 
Post #: 7
 
 RE: Syntax error line 1 character 9??? - 11/18/2008 3:48:44 AM   
  jpjeffery

 

Posts: 27
Score: 0
Joined: 11/17/2008
Status: offline
I'd say Software Installation via GPO (Machine Configuration or User Configuration) is a better bet all round. Seems to me that installing by script is just re-inventing the wheel. I've only got round to using GPOs to install software in the last three weeks and found it to be ridiculously easy. As long as the package is a .msi file (and the Sage install mentioned by the OP is...) then it's a bit of a doddle.

_____________________________

JJ

Variables won't. Constants aren't

Apostrophes do not belong in plurals of anything, especially not acronyms like HDD, PC, CPU and so on

(in reply to ebgreen)
 
 
Post #: 8
 
 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

(in reply to jpjeffery)
 
 
Post #: 9
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Syntax error line 1 character 9??? Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts