Solved

Problem launching external application

Posted on 2008-06-11
4
347 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
4 Comments
 
LVL 14

Expert Comment

by:rachitkohli
Comment Utility
can u show the code for opening it..
0
 
LVL 2

Expert Comment

by:gurutodd
Comment Utility
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 85

Accepted Solution

by:
Mike Tomlinson earned 250 total points
Comment Utility
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
Comment Utility
Perfect. Thanks Idle Mind
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Vb.Net Menu 1 21
Expando 4 33
Get String split 5 31
Get Count in a variable with 5 digits always 1 8
As more and more people are shifting to the latest .Net frameworks, the windows presentation framework is gaining importance by the day. Many people are now turning to WPF controls to provide a rich user experience. I have been using WPF controls fo…
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
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…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

744 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now