Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Shell VB 6.0 how to use?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
kkkkk
Master Cheater
Reputation: 0

Joined: 05 Jun 2006
Posts: 328
Location: Netherlands

PostPosted: Sat Mar 29, 2008 4:14 am    Post subject: Shell VB 6.0 how to use? Reply with quote

i searched, tried and get runtime error 5.

I just simply want to click he command button and it starts an .exe

thanx,.

_________________
Taekwondo is my life
Questions? *****hotmail.com u really would like to know..u had ur chance. too many on msn now..
Back to top
View user's profile Send private message
jason744
Grandmaster Cheater
Reputation: 0

Joined: 25 Nov 2007
Posts: 638

PostPosted: Sat Mar 29, 2008 4:36 am    Post subject: Reply with quote

Shell("C:/", vbNormalFocus)

That's for .Net but it shouldn't be too hard to translate to VB6.

_________________
haxory' wrote:
can't VB do anything??
windows is programmed using VB right? correct me if im wrong.

so all things in windows you have like the start menu is a windows form too.
Back to top
View user's profile Send private message
kkkkk
Master Cheater
Reputation: 0

Joined: 05 Jun 2006
Posts: 328
Location: Netherlands

PostPosted: Sat Mar 29, 2008 5:26 am    Post subject: Reply with quote

i still dont know..always get error, i see many tutorials on the internet, but dont understand almost none Sad
_________________
Taekwondo is my life
Questions? *****hotmail.com u really would like to know..u had ur chance. too many on msn now..
Back to top
View user's profile Send private message
Estx
Expert Cheater
Reputation: 0

Joined: 04 Mar 2008
Posts: 172

PostPosted: Sat Mar 29, 2008 5:59 am    Post subject: Reply with quote

Error '5' means access denied (lol I remember that evil number from back in the day).

Could you show us the code you're using?

Give this a go:
Code:
Private Sub Command1_Click()
    Call Shell("c:\file.exe", vbNormalFocus)
End Sub

Make sure you edit values where needed.

Also, if you're using something like ZoneAlarm (or any other kernel hooking software) it may be automatically denying access to your application. So double check with that. (Many modern protection services do process monitoring).
Back to top
View user's profile Send private message
kkkkk
Master Cheater
Reputation: 0

Joined: 05 Jun 2006
Posts: 328
Location: Netherlands

PostPosted: Sat Mar 29, 2008 6:11 am    Post subject: Reply with quote

i have avg, dont think thats the problem. But when i use that code, i still get run time error 5
invaled procedure call or argument, and i did change c:\file.exe to an excisting file, do i have to mdo maybe something with the references? of a code that uses shell32.dll?

EDIT: already fixed, thanx Very Happy !!

Code:

Option Explicit

Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, _
ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long

Private Const SW_HIDE As Long = 0
Private Const SW_SHOWNORMAL As Long = 1

Private Sub Command1_Click()
ShellExecute 0&, "OPEN", "C:\ComboFix.txt", vbNullString, "C:\", SW_SHOWNORMAL
' ShellExecute Me.hwnd, "open", "c:\CSP_SNMP.vbs", "router1 Public", "C:\", 1
' c:\ = Destination Folder
End Sub

_________________
Taekwondo is my life
Questions? *****hotmail.com u really would like to know..u had ur chance. too many on msn now..
Back to top
View user's profile Send private message
Estx
Expert Cheater
Reputation: 0

Joined: 04 Mar 2008
Posts: 172

PostPosted: Sat Mar 29, 2008 6:25 am    Post subject: Reply with quote

Ah okay, windows API is better anyway.

Upgrade to .NET sometime - trust me, better to do it earlier than later.

You can get the VB.NET Express edition free from Microsoft.

Quote:
Hm, I was been wrong about Error 5 lol. Haven't used VB 6.0 in a long long time. Very Happy

If that code didn't work, either the Command1 control doesn't exist, the VB6 installation may be corrupt, or there is an error some-where in the code when you modify it.

Are you trying this from an empty project? If not, start a new one and try it (create a button, double click it, add the code).

By default there should be 4 references:
Visual Basic For Applications
Visual Basic runtime objects and procedures
Visual Basic objects and procedures
OLE Automation

The components wont affect the Shell() code.

If all fails, you can try the API. If that fails, then something is wrong with your DLL setup. Re-install.

Also, what version of Windows are you using? Vista and XP both have process running protection, but in XP it's disabled by default.

One last thing to suggest, try launching other files. I know that's irrelevant to the error, but I found VB6 used to have internal errors which caused exceptions to come up as if it were end-user code.
Back to top
View user's profile Send private message
kkkkk
Master Cheater
Reputation: 0

Joined: 05 Jun 2006
Posts: 328
Location: Netherlands

PostPosted: Sat Mar 29, 2008 6:44 am    Post subject: Reply with quote

thanx Smile
_________________
Taekwondo is my life
Questions? *****hotmail.com u really would like to know..u had ur chance. too many on msn now..
Back to top
View user's profile Send private message
minium haxor
Advanced Cheater
Reputation: 0

Joined: 03 Dec 2007
Posts: 82
Location: Faroe islands

PostPosted: Mon Jun 02, 2008 4:20 pm    Post subject: Reply with quote

if you add a text box that has the url then add to command

shell ("explorer.exe = text1.text")

_________________
Back to top
View user's profile Send private message
Trow
Grandmaster Cheater
Reputation: 2

Joined: 17 Aug 2006
Posts: 957

PostPosted: Mon Jun 02, 2008 7:51 pm    Post subject: Reply with quote

minium haxor wrote:
if you add a text box that has the url then add to command

shell ("explorer.exe = text1.text")


what the...

"text1.text" is a string, is it not...

Call shell ("explorer.exe " & text1.text)

_________________
Get kidnapped often.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites