Solved

Problem launching external application

Posted on 2008-06-11
4
359 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
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 85

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

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…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
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…
This is a video that shows how the OnPage alerts system integrates into ConnectWise, how a trigger is set, how a page is sent via the trigger, and how the SENT, DELIVERED, READ & REPLIED receipts get entered into the internal tab of the ConnectWise …

932 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

8 Experts available now in Live!

Get 1:1 Help Now