cannot run correctly from shell... :(

  • Thread starter Thread starter Leszek Gruszka
  • Start date Start date
L

Leszek Gruszka

Someone can help me?

Dim aplik as integer
aplik = Shell("""gpresult.exe"" >1.txt", , True)

I don't know how to run it properly. I'm getting an error at ">".

ERROR: Invalid argument/option - '>gpo.txt'.
Type "GPRESULT /?" for usage.
 
Leszek,

You can try this sample, I do not know if you have to use
Application.StartupPath (copied the last text from Pieter) with this.

\\\
Dim p As New Process
p.StartInfo.UseShellExecute = False
p.StartInfo.Arguments = myargumentstring
p.StartInfo.WorkingDirectory = myworkdirectorystring
p.StartInfo.FileName =C:\myprogram
p.Start()
///
I hope this helps?

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top