|
Hi all,
I have found this[http://support.microsoft.com/kb/821775] one for enumerating the installed softwares.Now I want to get the main exe name associated with that software.How can I get that one. I found in registry that the installed exes are found in the path
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\
But I am not able to combine both those things
Thanks in Advance
Dana
|
|
|
|
|
You can't combine the two keys because there is no relationship between them. Everything under the Uninstall key is concerned with exactly that, only how to uninstall the package. It doesn't have any way of tracking what the main .EXE for that application is.
|
|
|
|
|
Thanks for the reply Dave.
Take this situation. If the user has deleted some of the files in a particular software folder(like the main exe).If now I try to run that particular exe, Then calling that program may produce an illegal result.
Dana
|
|
|
|
|
danasegaranea wrote: Then calling that program may produce an illegal result.
Yep, you have to handle that case in your code. That what exception handling is for. Trying to prevent it is pointless.
In either case, you have to validate the result returned anyway. Or were you just going to blindly trust whatever output you got from an external application?? THAT'S what you should be worried about.
|
|
|
|
|
Thanks Dave. I have handled that one. But I thought that there might be some way.
Thanks for the advice
Dana
|
|
|
|
|
Not really, no. Even if there was, it's still a bad idea to try an get around it. What's to stop someone from just replacing the .EXE or a virus get's ahold of it? You STILL have to validate the data you get back from it, even if the external app is considered "good".
|
|
|
|
|
i am trying to open DGN files throguh microstation V7.1
i have a problem in declaring an object from MicroStationDGN.Application using vb.net, when i delcare it like this:
dim app = new microstationDGN.application
i got this error "type microstationDGN.application is not defined"
also i am trying to add com reference of microstation dll file "ustation.dll"
i got this error " this reference could not be added , this is not a valid assembly or com component, please make sure this file is accessible and that its a vaild assembly or com component"
Mohd Marei
|
|
|
|
|
You're going to have to find a board that supports this library.
You can only add a reference to COM-based or .NET managed code DLL's. The error is telling you that the DLL you're trying to use in NOT COM-based, or is not registered on your machine, or is not a managed code library.
Since you haven't been able to import the classes exposed by the DLL, you cannot use the Dim line that you posted. This will only work once a reference has been successfully set.
|
|
|
|
|
My applications has 2 listboxes in it, what the program does is that it will play the video from listbox1 but for each 15 seconds it will stop the video, and then play the short videos from a 2nd listbox. When the video from th e 2nd listbox finishes, it will resume playing the video from listbox1.
I have a function that handles the openstatechange event and another function that handles playstatechange event.
My implementation works as following:
When the play button clicks, it will start playing the first item on the first listbox, the 15 seconds timer starts at the same time
the video will start playing
when the timer is up, the timerinterval event will fire, and in this event handler, i pause the video, store the currently playing position, and then stop the video and then use the .URL to make the wmplayer load a video from the second list.
The openstate event will take care of the playing when the the openstate changes to "mediaopen" and will start playing
This all works fine.
Now the problems occurs when the short video finsihes playing. A playstate event handler handles the event that a media has stopped, in this case, the code loads the video from the first list to resume, and then also sets the currentplaytime.
once i have set the .URL property, the playstate changes to "transitioning" and the openstate changes to "mediaopening" indefiniately. And for this reason, the .play function in my openstate event handler which only executes the .play() function when the openstate=mediaopen does not occur.
am i missing something here?
Maybe perhaps the video from the first list is a wmv file while video from the 2nd list is a divx avi file?
|
|
|
|
|
Why don't you use two mediaplayer controls (in the same place one hidden and one visible.) and get rid of all these stuff?!!
Play the first video, pause it, hide its mediaplayer control, show the other control, play the short video, hide its control and so on!!!
|
|
|
|
|
I've created a macro (in .net 2003) to capture the build event…the macro is working fine while I'm running it through .net IDE…the problem is that when I'm building the .sln from Visual Studio Command line, the macro is not getting invoked...i want that macro to be run while building the project from command line so that I can schedule it as a job in windows.
Please assist me if u know how to run a macro from visual studio command prompt without opening the IDE.
I have searched in net and have found some syntax but they are opening the solution also which I don't want to do.
The command which I tried was
devenv "C:\Inetpub\wwwroot\XXX\XXX.sln" /command "BUILDMACRO.BuildMacro.vsmacros" /build release /out "C:\Inetpub\wwwroot\XXX\Build.log"
and I'm getting the following error for this command even though my solution gets build successfully without invoking the macro
Error ::
Not enough storage is available to complete this operation.
Please help us out !!
Thanks in advance
Regards,
Vivek
-- modified at 10:22 Wednesday 21st November, 2007
|
|
|
|
|
This macro will not get run if you execute the build from the command line. Neither will pre-build and post-build commands. You're going to have to move the macro's functionality to something else you can run from a batch file.
|
|
|
|
|
thanks for the reply but i am sorry i did not understand, if i am moving my macro out how will i be able to capture my build event ?
is there any other way to capture the build event inside VB.net 2003
i want to capture my build event and increment my build number and label in VSS with that build number
i cannot use nant script as it would not work in my project
what should i do to automate my build process ???
|
|
|
|
|
vivek_luke wrote: if i am moving my macro out how will i be able to capture my build event ?
There is no "event" to capture. You're not running the entire Visual Studio IDE, so there's nothing to run. You have to rewrite your code to do whatever it needs to do using utilities and whatnot that run from the command line. You cannot use any facilities inside Visual Studio to do this. Your macro will never run.
You have to update the version numbers using whatever command line utilities you chose or need to process and edit whatever files you need to do what you want. Macros will NOT be available to you. You might want to consider looking into PowerShell to do some of this.
|
|
|
|
|
using ENVDTE namespace i can get the event onbuildbegin inside vb.net 2003
in C#.net i can capture post build events while building from command line
i just want to build my solution from command line which will change the assembly version number
|
|
|
|
|
How do I restrict a user from only selecting the items in the collection?
|
|
|
|
|
DropDownMode i believe, you want it as a dropdownlist so that they cannot type.
|
|
|
|
|
Hi!
I would like know about if exist a method for detect the connection/disconnection of LAN network using Windows's API in vb, i found in anothers internet sites but i not found nothing as help, i sorry but, can you help me in this problem?, thanks for your help.
|
|
|
|
|
Check the My.Computer.Network.IsAvailable property.
|
|
|
|
|
Hello every one,
I am making a VB 2005 application in express edition, to let the user do a free hand drawing.
I want to hide the mouse pointer / courser over the picture box.. Is it possible...if yes plz let me know..
Regards
Nishkarsh
|
|
|
|
|
If you want to allow user to do free drawing in that case instead of hiding mouse cursor you should use a cursor like Cross, this can be done by simply setting cursor property of the picture box-
PictureBox1.Cursor = Cursors.Cross
However if you do not want to see any cursor when mouse comes over picture box control, you will need to use API function.
Following code should give you the desired result-
-------------------------Code Start------------------------------------
Private Declare Function ShowCursor Lib "user32" (ByVal bShow As Long) As Long
Dim Show As Boolean
Private Sub PictureBox1_MouseEnter(ByVal sender As Object, ByVal e As System.EventArgs) Handles PictureBox1.MouseEnter
Show = False
ShowCursor(Show)
End Sub
Private Sub PictureBox1_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles PictureBox1.MouseLeave
Show = True
ShowCursor(Show)
End Sub
----------------------------Code End------------------------------------------
I hope this helps .
-Dave.
Dave Traister,
ComponentOne LLC.
www.componentone.com
|
|
|
|
|
Use Cursor.Hide() and Cursor.Show() in MouseEnter and MouseLeave events of the picture respectively.
|
|
|
|
|
Hi
Is there any direct way to get the number of records in random access files except by calculating the length of file and then dividing it by the length of each record.
(Visual Studio 2003)
Thanks
reman
|
|
|
|
|
You have two choices. You can either "do the math", or you can read the entire file record-by-record and count them. There's no other way to do it.
|
|
|
|
|
I am relatively new to vb.net.
I have a windows form with a command button followed by 3 radion buttons (ie GoBtn, ByDate, ByRef, None). None is marked checked at design time.
At run time, if I hit Go then the ByDate radio button gets turned on. Is this 'normal'? I don't understand this behaviour.
Thanks for your help!
QuickBooks Programming, Add-ons, Services
www.AaaTeX.com
|
|
|
|