Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help for newbie 1

Status
Not open for further replies.

exman2k5

Technical User
Joined
May 6, 2005
Messages
34
Location
US
Hello all. I am trying to run a very simple vb script to run a vpn client and then start landesk

Set objShell = CreateObject ("WScript.Shell")
objshell.Run "ipsecdialer.exe"
WScript.Sleep 15000
objshell.Run "LDISCN32.EXE /NTT=LIMPKIN:5007 /S="LIMPKIN" /I= /noui /sync"

I get this error :
Script: script name
Line: 4
Char: 50
Error: Expected end of statement
Code: 800A0401
Source: Microsoft VBScript compilation error

This is my very first script attempt. Can anyone point me in the right direction? Thanks in advance
 
And this ?
objshell.Run "LDISCN32.EXE /NTT=LIMPKIN:5007 /S=""LIMPKIN"" /I= /noui /sync"


Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Thanks for answering but i dont understand your response. Are you saying i should add a "?
 
What I said is, replace this:
objshell.Run "LDISCN32.EXE /NTT=LIMPKIN:5007 /S="LIMPKIN" /I= /noui /sync"
By this:
objshell.Run "LDISCN32.EXE /NTT=LIMPKIN:5007 /S=""LIMPKIN"" /I= /noui /sync"

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Thanks for clarifying, i tried that but still get an error.

Script: script name
Line: 5
Char: 1
Error: Expected statement
Code: 800A0400
Source: Microsoft VBScript compilation error
 
Can you please post your actual code as I don't see a 5th line ...

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Sure here it is

Set objShell = CreateObject ("WScript.Shell")
objshell.Run "ipsecdialer.exe"
WScript.Sleep 15000
objshell.Run
"LDISCN32.EXE /NTT=LIMPKIN:5007 /S=""LIMPKIN"" /I= /noui /sync"
 
Why have you splitted your Run call in two lines ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
I thought that was what you had posted for me to do, i'll try it again
 
PH thank you very much, it works now. One question though, the script seems to only work if i input the path to the executable in the path statement, it wont work if i type in the path in the script; eg C:\Program Files\Landesk... gives an error file not found. Is this normal? Thanks again for your help
 
objshell.Run """C:\Program Files\Landesk...\LDISCN32.EXE"" /NTT=LIMPKIN:5007 /S=""LIMPKIN"" /I= /noui /sync"

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Thanks again, you've been a great help, runs no problem. How can i learn more about this? Any tips/recommendations?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top