|
I am trying to launch Silverlight 5 Out of Browser application without using a bat file. I would like the code contained in one vbscript. This is the code im working with.
Dim objShell,stArgs
strFile = "File Location"
strFileSrc = "URL file"
Set objShell = WScript.CreateObject( "WScript.Shell" )
objShell.Exec("""%ProgramFiles%\Microsoft Silverlight\sllauncher.exe""")
objShell.strArgs("/emulate:""" & strFile & """, /origin:""" & strFileSrc & """, /overwrite")
Set objShell = Nothing
I get the SlLauncher code box but I get
Line 7 Char 1
Error : Object doesn't support this property or method
Code: 800A01B6
Source: Microsoft VBscript runtime error
|
|
|
|
|
ChrisDuti wrote: Error : Object doesn't support this property or method
The method "strArgs" does not exist in the WScript.Shell object. I suggest you concatenate the arguments to the file you want to run, and use the "run" method. Or Google for a different example
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
You are correct I forgot to put in strArgs = Agruments
updating now
|
|
|
|
|
Cleaning up the code I put this:
Dim objShell
strFile = "File_Location.xap"
strFileSrc = "Source_Url"
strArgs = "/emulate:""" & strFile & """, /origin:""" & strFileSrc & """, /overwrite"
Set objShell = WScript.CreateObject( "WScript.Shell" )
objShell.Exec("""%ProgramFiles%\Microsoft Silverlight\sllauncher.exe"" " & strArgs)
On launch ... nothing.
|
|
|
|
|
..does it launch if you omit the arguments? If yes, then we should focus on those.
objShell.Exec("""%ProgramFiles%\Microsoft Silverlight\sllauncher.exe"" " & strArgs)
I'd change that to
executeThis = """%ProgramFiles%\Microsoft Silverlight\sllauncher.exe"" " & strArgs
objShell.Exec(executeThis) Thus gives you the opportunity to inspect what's being passed, even if it is using a MsgBox.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
How can I create tables,store procedure, and trigger using vb 2008 installer class during apps installation
|
|
|
|
|
|
Don't forget your any indexes you may have built.
|
|
|
|
|
This is normally done by running create scripts during the installation.
|
|
|
|
|
Please I want restore a database using vb 2008 installer class during Application Deployment.
|
|
|
|
|
|
Is there any way to identify an event that came to an end,
that the event arrived at the End Sub?
Sorry for the misspelled because I can not speak English and used a translator to help me
Thank you
Jonatas Marques
|
|
|
|
|
Only if you put code in the end of the Sub that signals this in some way.
|
|
|
|
|
What I need to do is something like this
Private Sub btn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn.Click
Here runs a function that checks if the btn.Click comes to an end and shoot another routine but this routine can only be triggered when the event comes to an end btn.Click Ex: after the end Sub
End Sub
|
|
|
|
|
Soooooo, in a single threaded environment, this is incredibly easy. Just call the method as the last line of your Click handler. That's a horrible button name, by the way.
Private Sub btn_Click(blah, blah) Handles btn.Click
...some code...
MyOtherMethod()
End Sub
|
|
|
|
|
Ok kkkk promise to fix the name of Button.
But I still have doubts is like MyOtherMethod () to do the check when Private Sub btn_Click (blah, blah) Handles btn.Click end its process
I'm trying to do is this
1 - click on the button
2 - click on the button triggers the event Private Sub btn_Click (blah, blah) Handles btn.Click
3 - The btn.Click event triggers the routine MyOtherMethod () the btn.Click however, have to continue running the remaining code
4 - MyOtherMethod () loop is waiting for the end of btn.Click
5 - When the event finished btn.Click, MyOtherMethod () loop that identifies that event ended btn.Click and runs a code that is out of the loop and ends
What i am not able to do is, call event btn.Click MyOtherMethod () and continue running the rest of the code, which waits btn.Click MyOtherMethod () finish to continue
and also I am not able to make the MyOtherMethod () identifies which ended btn.Click
thank you
Jonatas Marques
|
|
|
|
|
OK, you didn't get it. There is NO other code after the call to MyOtherMethod . That is the last thing that happens inside the event handler.
I serisouly doubt you need to go call some method, then have it wait on the rest of the code in the handler to finish. It WILL NOT ever finish until the method you called finishes itself.
It sounds as though you need to restructure what you're doing, synchronously, to avoid this situation. When you make a method call, the code that does the calling does NOT continue to run while the method is executing. The calling code completely stops and waits for the method called to return. This is called a "blocking call".
Also, event handlers should return inside of about 250 milliseconds. While your event handler code is exectuing, your UI is copmletely hung waiting for it. The user cannot click on anything in your app until the handler returns.
But, in any case, the ONLY way to do what you describe to is use threading and a WaitHandle to signal the other thread. So, your event handler gets called, and in it you kick off another thread.
What are you doing that you think you need to do this??
|
|
|
|
|
Hello everyone:
I need guidance on how to start with this small project.
I need to implement a web interface that will access applications that developed in vb.net with sql back end.
What I mean is the following:
I have two small applications, one is fire arms registration and the other is logistic.
Both apps reside on the same sql server.
I want to have a web interface that will point to each one base on the user access.
that is if the user is from fire arm than fire arm registration app will launch and so on..
of course this can for a number of applications.
The general purpose of this, is to have access to these applications via the web.
what best solution to use in order to accomplish this task.
I would like to know what i need to consider first in all aspect of this task.
Thanks in advance for your guidance and help.
|
|
|
|
|
waner michaud wrote: I need to implement a web interface that will access applications that developed in vb.net with sql back end.
What do you mean 'access applications'? You want to give a WEB UI to it or launch an exe? If launch then, since it's a web interface, exe needs to be downloaded to client system and then launched. If you do a process.start on server, it will not be on client system and they will now see/know.
|
|
|
|
|
Thanks for reply:
I want to give a WEB UI to it. All the user ought to do is to simply log in through a web interface.
Be mindful the application is an executable, it can be installed on a client machine.
For the WEB UI, it will be installed on the server.
The application can be accessed directly on the server or through the WEB UI.
I do not want to user to download anything. Simply login and based on his/her login ID will determine which application that will launch.
Once again thank you.
|
|
|
|
|
waner michaud wrote: will determine which application that will launch.
Launch where? On client or server?
If server, what's the use?
If client, you understand that it has to be downloaded on client system and then installed to be used.
|
|
|
|
|
Thanks again
On the server
|
|
|
|
|
hi
your feedback will be appreciated.
thanks
|
|
|
|
|
Well, I was waiting for your full response.
I did asked this too: If server, what's the use?
Can you share the expected workflow from logging in to returning back something to user.
I get that one executable needs to be picked, what after that, what role does it play and how does client come to know/use it. Since it will not be downloaded and will be launched on server side, what are you trying achieve?
|
|
|
|
|
Thanks again,
This is what I want to accomplish:
Let's say I have two applications developed in vb.net with sql as database namely fire arms registration and vehicle registration respectively.
these two applications centrally reside on the same server. i want to allow authorized user to access these application through a WEB UI.
For example, if I am way from the office location and I need to use any one of these apps, I can simply login to a web interface and perform any operation i so desire as long I have access privilege.
These applications are executable. it can be installed on a client machine as they are being deployed right now.
there is a need to have these apps available through an URL...
I hope that I am a little clearer now and you can have an idea of my train of thought and process.
Thanks a lot.
|
|
|
|