Solved

Problem launching external application

Posted on 2008-06-11
4
392 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 250 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
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…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …

726 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