|
-
Mar 27th, 2009, 11:30 AM
#1
Thread Starter
Hyperactive Member
Process start is not passing arguments?
I can connect when I go into command prompt manually and type:
rasdial one username password
This will work. It will dial and connect.
Now when I try doing this programmatically it will not work. It doesn't seem to be passing the arguments I've specified:
vb.net Code:
Public Shared Sub Dial() Dim p As New Process() p.StartInfo.CreateNoWindow = True p.StartInfo.UseShellExecute = False p.StartInfo.FileName = "cmd" 'command prompt launches, no arguments were passed though. p.StartInfo.Arguments = "rasdial one username password" p.Start() End Sub
-
Mar 27th, 2009, 11:41 AM
#2
Re: Process start is not passing arguments?
Have you tried passing them all in the FileName property?
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Mar 27th, 2009, 12:15 PM
#3
Re: Process start is not passing arguments?
does cmd TAKE arguements? all cmd does is give you a command prompt. Instead of using cms as the filename, it should be rasdial ... and your arguements should be "one username password" or what ever it needs to be.
-tg
-
Mar 27th, 2009, 12:23 PM
#4
Re: Process start is not passing arguments?
cmd does take arguments of what you want to pass to the command window. Its the arguments after rasdial which I would question as being received by rasdial and not cmd.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Mar 27th, 2009, 07:11 PM
#5
Thread Starter
Hyperactive Member
Re: Process start is not passing arguments?
Using "Rasdial" instead of "cmd" fixed it. Thanks guys.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|