Hello. :)
I am new here at the forums of DANIWEB and I hope to enjoy and learn more about programming software.

I have a problem with a little application I am making. The idea is simple. It is an application that execute file (like double clicking the actual files) through command buttons. It has 6 commands button. Each command button will run an .nsu file extension. These type of files loads Nvidia Overclocking profiles via nTuneCMD.

The directory is C:\NVProfiles\


Here is the code:

Private Sub BCFix_Click()
Shell "C:\NVProfiles\BCFix.nsu", vbNormalFocus
End Sub

Private Sub HIGHOC_Click()
Shell "C:\NVProfiles\HIGH OC X.nsu", vbNormalFocus
End Sub

Private Sub LOWOC_Click()
Shell "C:\NVProfiles\LOW OC.nsu", vbNormalFocus
End Sub

Private Sub MAXOC_Click()
Shell "C:\NVProfiles\OC MAX.nsu", vbNormalFocus
End Sub

Private Sub MEDOC_Click()
Shell "C:\NVProfiles\MED OC.nsu", vbNormalFocus
End Sub

Private Sub SYSDFLT_Click()
Shell "C:\NVProfiles\SYSDFLT.nsu", vbNormalFocus
End Sub

What could be the problem. I haven't programmed in VB for years, so I could have missed something obvious..

Thanks a lot :)

Recommended Answers

All 5 Replies

I am not sure if Shell supports that file extension.

Try to call the .nsu file in a batch file and call the .bat file using shell.

I am not sure, but doesn't "Shell" just act like double clicking a file in the Windows Explorer ?

Thanks

EDIT: The .nsu is already registered with its default application. All I need is just like double liking the file in the folder but through a button in a small application

Just try once as suggested in the previous post and check if that works.

Same Error.

That is what is included inside the bat file:

@ECHO off
START BCFix.nsu
EXIT
Private Sub BCFix_Click()
Shell "C:\NVProfiles\BCFix.bat", vbNormalFocus
End Sub

The bat file is in the same directory as the .nsu. I tried to run it alone and it worked but no luck with the application I am working on.. Any ideas ?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.