[PROBLEM] File Associations

Posts 115 of 20 · Page 1 of 2
[PROBLEM] File Associations
How do i set my VB program to open all '*.mpgh' file. how do i do that, also i was to know when the application is opening the file, how do i set the application to do the task and not to just Start Normally.

(any problems understanding? i can give an example (i just give it now) )
EXAMPLE:
When I open an '.HTML' file Google chrome opens it and go directly to the site. When i open Google chrome it doesn't go to the site by default.

Thanks in advance,
Topblast
What exactly do you want to happen upon opening a .mpgh file?

Also, to grab them all:

[php]
For Each filePath As String In FileIO.FileSystem.GetFiles("C:\", FileIO.SearchOption.SearchAllSubDirectories, "*.mpgh")
MsgBox(filePath) '... do whatever with the file location now.
Next
[/php]

You can change the drivename I listed to a more specific start location such as "C:\Users\name\Documents" etc.

But, if you start at C:\ there might be some files you can't touch and get exceptions, I'll write a LINQ equivalent later which will hopefully fix it up.
Quote Originally Posted by Jason View Post
What exactly do you want to happen upon opening a .mpgh file?

Also, to grab them all:

[php]
For Each filePath As String In FileIO.FileSystem.GetFiles("C:\", FileIO.SearchOption.SearchAllSubDirectories, "*.mpgh")
MsgBox(filePath) '... do whatever with the file location now.
Next
[/php]

You can change the drivename I listed to a more specific start location such as "C:\Users\name\Documents" etc.

But, if you start at C:\ there might be some files you can't touch and get exceptions, I'll write a LINQ equivalent later which will hopefully fix it up.
What is was is to make my program start them not find them.
Quote Originally Posted by topblast View Post


What is was is to make my program start them not find them.
"is was is"? 3 linking verbs stacked up together?

And, how can you start something without finding it?

Your gonna have to edit after finding them
Quote Originally Posted by topblast View Post
How do i set my VB program to open all '*.mpgh' file. how do i do that, also i was to know when the application is opening the file, how do i set the application to do the task and not to just Start Normally.

(any problems understanding? i can give an example (i just give it now) )
EXAMPLE:
When I open an '.HTML' file Google chrome opens it and go directly to the site. When i open Google chrome it doesn't go to the site by default.

Thanks in advance,
Topblast
http://www.mpgh.net/forum/33-visual-...sociation.html
Oh fuck I hate programs that do that.

It's in the registry.
Quote Originally Posted by freedompeace View Post
Oh fuck I hate programs that do that.

It's in the registry.
Is there anything you like or appreciate in this world !! :P
Quote Originally Posted by Hassan View Post


Is there anything you like or appreciate in this world !! :P
Lots, actually. Basically anything that's not annoying. :]
Quote Originally Posted by freedompeace View Post
Lots, actually. Basically anything that's not annoying. :]
is there something u dont find annoying?


Quote Originally Posted by Hassan View Post


Is there anything you like or appreciate in this world !! :P
access denied
[php] My.Computer.Registry.ClassesRoot.CreateSubKey(file Type & "\shell\open\command").SetValue("", Application.ExecutablePath & " ""%l"" ", Microsoft.Win32.RegistryValueKind.String)
[/php]

if i get this work my file format will be off the hook and the encryption if GREAT.
Quote Originally Posted by topblast View Post

[php]My.Computer.Registry.ClassesRoot.CreateSubKey(file Type & "\shell\open\command").SetValue("", Application.ExecutablePath & " ""%l"" ", Microsoft.Win32.RegistryValueKind.String)
[/php]if i get this work my file format will be off the hook and the encryption if GREAT.
What do you mean ? I don't understand -.-


PS: he pink is because of my sister laptop
Quote Originally Posted by topblast View Post


is there something u dont find annoying?




access denied
[php] My.Computer.Registry.ClassesRoot.CreateSubKey(file Type & "\shell\open\command").SetValue("", Application.ExecutablePath & " ""%l"" ", Microsoft.Win32.RegistryValueKind.String)
[/php]

if i get this work my file format will be off the hook and the encryption if GREAT.
Lots of things.

Also, your file format. Great job getting it, but who's going to use it?

Quote Originally Posted by topblast View Post


PS: he pink is because of my sister laptop
Windows Vista UAC disallows writing to global keys (keys that affect all users) unless you're in priveleged mode. This means either administrator or having your application signed.
Quote Originally Posted by freedompeace View Post
Lots of things.

Also, your file format. Great job getting it, but who's going to use it?
I am using it for an application i am making.

Quote Originally Posted by freedompeace View Post
Windows Vista UAC disallows writing to global keys (keys that affect all users) unless you're in priveleged mode. This means either administrator or having your application signed.
how i get rid of that?
Quote Originally Posted by topblast View Post

I am using it for an application i am making.



how i get rid of that?
To be able to add keys while in debug mode (Running from Visual Studio), Run Visual Studio as an administrator. If you have an exe, run it as admin. Always works for me.
ok, i guess i can do that.

hmm that only starts it, i want it to do something when it opens.
Posts 115 of 20 · Page 1 of 2
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?