Run a VBScript (program startup) from VB.net in AutoCAD

Bassiemeer

Member
Joined
May 17, 2011
Messages
5
Programming Experience
Beginner
Hello,

I have made a userform in AutoCAD, I made some buttons where I want to start software from.
The programm I want to run is started by an VBScript from the manufacturer.
When I double click the VBScript the program starts, but trying to execute if from a button_click on my AutoCAD userform it returns that I am missing MSVCR70.dll files.
The missing file is in the folder of the program I want to run, aswel in my System32 folder.

I tried to execute it the next ways:
VB.NET:
Process.Start("C:\WINDOWS\system32\cscript.exe", """C:\Program Files (x86)\Program\Run.vbs")
and

VB.NET:
Process.Start("C:\Program Files (x86)\Program\Run.vbs")

What is going wrong ?
 
VB.NET:
[SIZE=2]
Process.Start([/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Shortcut Run.lnk"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2])
[/SIZE]

That does seem to work, only problem, when I select the shortcut with OpenFileDialog it takes the VBScript file it links to and not the .lnk.
 
Back
Top