?
Solved

Problem launching external application

Posted on 2008-06-11
4
Medium Priority
?
400 Views
Last Modified: 2013-11-27
Hi,

Im trying to get my program to launch srdiag.exe from the C:\WINDOWS\system32\Restore folder on my pc. Its a utility used by system restore to generate log files and place them in a cab file. The problem is when i try to launch it from my program it doesnt work quite right. The srdiag.exe command window launches and closes after several seconds as it should but no files are created. There are no errors reported by vb or srdiag.

Im using VB Express 2008 and ive already tried the usual shell and process.start commands with the same result.

Im on Win XP Pro.

Thanks

Adam
0
Comment
Question by:adam-barrett
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 14

Expert Comment

by:rachitkohli
ID: 21759261
can u show the code for opening it..
0
 
LVL 2

Expert Comment

by:gurutodd
ID: 21759476
Shell("C:\windows\system32\Restore\srdiag.exe")
It will create the cab in the current path of your application, not in the restore directory.  Hope that helps.

TB
0
 
LVL 86

Accepted Solution

by:
Mike Tomlinson earned 1000 total points
ID: 21760632
Try setting the WorkingDirectory():

        Dim p As New Process
        p.StartInfo.FileName = "c:\windows\system32\restore\srdiag.exe"
        p.StartInfo.WorkingDirectory = "c:\windows\system32\restore"
        p.Start()
0
 
LVL 1

Author Closing Comment

by:adam-barrett
ID: 31466109
Perfect. Thanks Idle Mind
0

Featured Post

Want to be a Web Developer? Get Certified Today!

Enroll in the Certified Web Development Professional course package to learn HTML, Javascript, and PHP. Build a solid foundation to work toward your dream job!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question