Solved

Problem launching external application

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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
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…

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