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 


[VB]Drive path

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
alcamize
How do I cheat?
Reputation: 0

Joined: 11 Sep 2007
Posts: 6

PostPosted: Sun May 03, 2009 10:46 pm    Post subject: [VB]Drive path Reply with quote

First of all W00T THE FORUMS ARE BACK!!!

2ndly I am making a tool with VB that will install firefox, plugins, apps i use etc, well i have all that worked out but I was wondering(cause i'm putting it on a USB) if i could change the path i currently have J:\\ to something that it will look for, say its not that on a diff computer it will look for the files in each drive or watever. So basically I'm asking if there is a way to change the J:\\ to something universal or something it will look for
Back to top
View user's profile Send private message
yoyonerd
Grandmaster Cheater
Reputation: 0

Joined: 26 Apr 2008
Posts: 699
Location: -->formerly yoyonerd<--

PostPosted: Mon May 04, 2009 12:12 am    Post subject: Reply with quote

You aren't being to detailed.

Is the J: the name of the flashdrive path?
Or is it the name of the System Drive?

_________________
Back to top
View user's profile Send private message AIM Address
Frostbyt3
Master Cheater
Reputation: 0

Joined: 07 Jan 2008
Posts: 323
Location: Australia

PostPosted: Mon May 04, 2009 12:32 am    Post subject: Reply with quote

I havent tried it in VB, but I've succesfully used (In C#)

Code:
string path = "%WINDIR%\\..\\";


to give me the users root drive(drive with windows)

In vb it would probably be

Code:
dim path as string
path = "$WINDIR/../";


So to sum up, I would personally do :

Code:
string path = "%WINDIR%\\..\\ProInstaller";
InstallApps(path);
Back to top
View user's profile Send private message MSN Messenger
alcamize
How do I cheat?
Reputation: 0

Joined: 11 Sep 2007
Posts: 6

PostPosted: Mon May 04, 2009 4:21 am    Post subject: Reply with quote

J:\ is the path of the flash drive and the flash drive has the files the app will use, and say I plug the usb into another computer the path might change to K:\, so my question is how could I change
Code:
Call Process.Start("J:\\Programs\\Firefox Setup 3.0.10.exe")
to something that will look for that file. or make the J:\\ changable within the app itself
Back to top
View user's profile Send private message
yoyonerd
Grandmaster Cheater
Reputation: 0

Joined: 26 Apr 2008
Posts: 699
Location: -->formerly yoyonerd<--

PostPosted: Mon May 04, 2009 9:05 am    Post subject: Reply with quote

alcamize wrote:
J:\ is the path of the flash drive and the flash drive has the files the app will use, and say I plug the usb into another computer the path might change to K:\, so my question is how could I change
Code:
Call Process.Start("J:\\Programs\\Firefox Setup 3.0.10.exe")
to something that will look for that file. or make the J:\\ changable within the app itself


Make your program search through its drive...

Hmm, at the top of my head I'd say look into the Directory class.

_________________
Back to top
View user's profile Send private message AIM Address
tombana
Master Cheater
Reputation: 2

Joined: 14 Jun 2007
Posts: 456
Location: The Netherlands

PostPosted: Mon May 04, 2009 9:05 am    Post subject: Reply with quote

I think App.path will get the path of the application itself. So when your application is on the flash drive, you can do:
Code:
Call Process.Start(App.path + "\\Programs\\Firefox Setup 3.0.10.exe")

You might need to remove the slash before 'Programs' but I'm not sure.
Back to top
View user's profile Send private message
alcamize
How do I cheat?
Reputation: 0

Joined: 11 Sep 2007
Posts: 6

PostPosted: Mon May 04, 2009 1:16 pm    Post subject: Reply with quote

tombana I tried your method, but that didn't work; and yoyonerd I am not sure how to search thought a drive but I came up with an idea this morning on the bus, its making a text box that will change the drive path of each of the buttons o.O just not sure how that would be coded
Back to top
View user's profile Send private message
tombana
Master Cheater
Reputation: 2

Joined: 14 Jun 2007
Posts: 456
Location: The Netherlands

PostPosted: Mon May 04, 2009 2:22 pm    Post subject: Reply with quote

I think App.path is for VB6 and not VB.NET. I wasn't sure which one you were using
Back to top
View user's profile Send private message
shhac
Expert Cheater
Reputation: 0

Joined: 30 Oct 2007
Posts: 108

PostPosted: Tue May 05, 2009 12:34 pm    Post subject: Reply with quote

tombana wrote:
I think App.path is for VB6 and not VB.NET. I wasn't sure which one you were using
in VB.NET it is
Code:
Application.StartupPath
Back to top
View user's profile Send private message
92Garfield
I'm a spammer
Reputation: 57

Joined: 20 Dec 2007
Posts: 5871
Location: Banana Republic Germany

PostPosted: Tue May 05, 2009 2:51 pm    Post subject: Reply with quote

tombana wrote:
I think App.path will get the path of the application itself. So when your application is on the flash drive, you can do:
Code:
Call Process.Start(App.path + "\\Programs\\Firefox Setup 3.0.10.exe")

You might need to remove the slash before 'Programs' but I'm not sure.


In VB you dont gotta use \\ just use \

also you can use

Code:
shell (app.path & "\Programs\Firefox Setup 3.0.10.exe")

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

Joined: 26 Apr 2008
Posts: 699
Location: -->formerly yoyonerd<--

PostPosted: Tue May 05, 2009 8:17 pm    Post subject: Reply with quote

Ehh, I'd help you but I don't really know VB~
_________________
Back to top
View user's profile Send private message AIM Address
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