Running Skypekit as Service - c#

I have developed a Gui-app that uses skypekit which works great. I know have the requirement to make it a service or as "service like" as possible.
I would need the skypekit.exe to run in some shape or form as a service. I was looking into wrapping the exe as a service , but I would need to wrap the gui and skypekit exe as one!.
I only found
http://gocoding.com/page.php?al=servicecontrol,http://gocoding.com/page.php?al=gensvc
Which did not work for. I found a link on the skype fourm here:
http://devforum.skype.com/t5/SkypeKit-API/Windows-Skype-Runtime-as-Windows-Service/m-p/3782/highlight/true#M3306
But no success either.
What I would like to know is how I might go about making 2 exe's into 1 service: if that is possible how?, or any other techniques I might try to achieve the result. There is very little out there in the way of this I can find.

AFAIK to run Skype as a service you need to run it in a virtual machine or isolated desktop environment.
Here is one example:
https://sevabot-skype-bot.readthedocs.org/

Related

Running PowerShell script in a C# Windows Service App

I am really not asking for any specific lines of code here, but more along the lines of someone being able to explain to me the idea of it to help me have a better understanding. I am very new to coding with PowerShell scripts let alone calling them in a C# app. Would anyone be able to explain or even point me in the right direction so I can learn about what I would need to do here. I have a basic "Hello World" script that I would like to call from a C# Windows Service using VS2010. I have seen examples around the internet, but they are very brief and don't really teach the concept behind it.
Any help would be much appreciated!
Thanks!
Here is a pretty good discussion on how to call Powershell from C#: http://www.codeproject.com/Articles/18229/How-to-run-PowerShell-scripts-from-C
I suggest you start with the RunScript function and add it to a VS2010 console application. Main() would then invoke RunScript something like RunScript( "echo 'hello from PS';get-date; get-culture; ").
Windows services have quite a few differences from a normal console application. You can read about how to write a windows service on MSDN, but if you've never coded before, you have a steep learning curve in front of you.
There is a service from an old Resource Kit call srvany.exe (Google it) which would run any console app as a service. However in Windows Vista (and above) services were restricted from accessing the desktop, so srvany could only be successful in Vista and above if you EXE doesn't need keyboard input or need to write to the display. However your EXE could read/write files.
This is what I was able to get to work for me.
I basically followed the information that I found from this post, but changed a couple of things to get it to work for me: Problem with calling a powershell function from c#
For example, for the ps.AddCommand("BatAvg") I just added my own function in my .ps1 file ps.AddCommand("PS1FunctionName") and didn't add any parameters since it was not necessary. The answer was staring me in the face the whole time, I just didn't know where I needed to place it in my windows service. I was able to figure that out and now I am cruising!
Also, don't forget to reference using System.Management.Automation and using System.Management.Automation.Runspaces in your code (for all the future people that may look at this).

Navigating website with application

I'm looking to make a C# application to automate some processes for me. One of which would be navigating a few websites that I frequent, such as grooveshark. I'd like my application to be able to log me into the website and search for/play a song.
I've done some googling on the topic and came across something called selenium. I was wondering if this was the best tool for what I would like to accomplish or if there is another option that would be a suit my needs better?
Thanks in advance!
In order to automate your process , you can use Microsoft Test Manager , who is tool about testing and generating code
On Microsoft Test Manager 2012 , for example you have new functionnality such as Exploratory Test, the process is you explore your application and generate your test.
Link : http://msdn.microsoft.com/en-us/library/vstudio/hh191621.aspx
After creating your tests, you can generate Coded UI Test and include in your build process
Note : you must use Team Foundation Server or Service in order interact with Test Case WorkItem
Selenium will do fine, unless the sites use Flash. If they do, you are pretty much stuck.
https://code.google.com/p/selenium/
http://selenium.googlecode.com/git/docs/api/dotnet/index.html
http://docs.seleniumhq.org/docs/03_webdriver.jsp
I would read up on Selenium and come back when you have a specific problem.
If you have Visual studio Premium or greater I would suggest Coded UI. I would also suggest CUITe http://cuite.codeplex.com/ as it simplifies the code.
It definately depends on what your automation is going to be able to. I don't know Selenium at all. I think it's for recording certain actions on a website in a certain order. Though you will only be able to automate the process as far as the website (the actual client) capabilities offer.
If you'd like to build some different, more advanced behaviour the client doesn't provide yet, you'd need to build your own client. That'd need some backwards engeneering. That'd be the case for e.g. automating browser games. Usually a browser game client doesn't provide scanning certain amounts of players and automatically comparing them to your own player profile, so building this feature on your own would be the only possible solution.

C# 2010: Deploying Multiple Apps..Need Sure Fire Way To Update

For starters I have whored myself out to the Internet in general as far as search is concerned. Got nowhere and am pretty Google proficient. Maybe I missed something..Enough of that.
As mentioned above C# 2010 (3.5->4.0 running on Win7x64 but would like the app to be fully compatible with XP/Vista). Dealing with XP(w/SP3) to Vista/7 clients. Working on an app that will allow my company to more easily connect to their local desktops via RDP. My app is awesome as far a usability, but eventually, my programming will catch up to me, bend me over, and do me hard.
I am looking for a sure-fire way to update the main app. I am deploying a secondary app to pull this off (app downloads updateApp from developer website if xml file has newer version, updaterApp updates main app; main app updates the updaterApp--if needed).
Looking for reinforcement or better ways to accomplish this as the app depends on admins + (possible) SQL + AD + SMB + SSH auth.
Things I have run into:
http://themech.net/2008/09/check-for-updates-how-to-download-and-install-a-new-version-of-your-csharp-application/ (at this point, what I like)
http://digitalformula.net/technical/c-self-updating-application-without-clickonce/
http://www.eggheadcafe.com/articles/pfc/selfupdater.asp
So that's what I am looking at. Would love to find the right solution with details/great code/examples. I am MOST WORRIED about admin access in Vista/7 on the 'Program Files' directory look forward to the discussion. Hope all of the info is here. Thank you so much in advance!
What about clickonce?
I read good and bad things about ClickOnce. One of these days I will sit down and figure out how it works. For now I went with update code inside the main application. Its pretty kewl. It starts a new thread to download and run the MSI package. I found it here.
http://themech.net/2008/09/check-for-updates-how-to-download-and-install-a-new-version-of-your-csharp-application/
Hope that helps someone looking to spin your own. I liked this approach because I did not have to create a second program.
Use clickonce
.net has this built in, we use it for our LOB apps, works fine.

Launching C# .Net application from browser. Possible?

The greatest example I can think of is the Google Chrome installation.
I remember one other application launching that same way. Can't remember what it was.
I'm not implying that it was built in C# or even .Net.
It is possible somehow. It's been done. Just wondering how.
I think what you are asking for is ClickOnce deployment.
ClickOnce deployment allows you to publish Windows-based applications to a Web server or network file share for simplified installation
Someone else has already pointed out ClickOnce, and this is probably want you want. Another alternative is Silverlight, where the application runs inside the browser window.
Are you talking about launching an application or installing it? You can launch an application by registering your application has a protocol handler (such as http://) within Windows...different browsers will have different behaviors, but it's possible that way. See this link for information.

Can an exe compiled from C# be integrated into a website?

I'm a beginner in programming. I've just made a program called "Guessing Game". And it seems to work fine. Can I integrate it into a website? The CMS that I'm using is Mambo.
===
additional info's
Thanks for all your suggestions.
I still don't have any background about Silverlight, WPF and Java Script which I think sounds good. I'm using Windows and I programmed my "Guessing Game" from Microsoft Visual Studio 2008 and it's using Window application forms.
Yes I guess, for the moment I let it be and start to learn Silverlight or Java Script so that I can integrate it on my website:-)
Thanks for all your input guys:-)
Cheers
A standalone executable cannot be directly integrated into a website. You have a few choices though:
Allow your users to download the executable and run it locally for themselves
Rewrite your program in JavaScript to have it run directly inside of an HTML page, though this could obviously involve a fair amount of reworking
Use Microsoft's Silverlight technology, which allows you to code in C# and produce a web-based frontend similar to Adobe Flash. Your program logic should remain the same and you should only have to change the UI code. In fact if you're already using WPF for the front end, the transition will be even easier.
There are several questions that you still need to answer.
What is your server running? If its not Windows, your exe will not run at all unless it is compatible with Mono or a similar framework for your server's operating system.
How does your "Guessing game" interact with the user? If it is through a WinForms GUI, it will you will not be able to use that GUI on the web. If your game is a WPF application your easiest route may be to port it to Silverlight and serve it up on a web page.
It is typically not trivial to make a regular windows application run in a web environment since on on the web you are really running in the browser, not on Windows.
Yes - in general, when you're talking about software, anything is possible. The question is, how difficult will it be?
To understand that, you have to give us more details about "Guessing Game" including how it is designed, what it's interfaces are, how readily extensible it is, and how prepared you are to change or extend it.
For example, if it is a Windows Forms GUI app, then it will be diifficult to integrate into a web app. If it is a console app, then it will be a little easier. If you can modify it to run as a Windows Service, then a little easier. If you can modify it to accept input from the network (as opposed to getting input solely from the keyboard + mouse), still easier.
You may be able to use reflection to load your assembly into the web application, but most likely, the answer is no.
Your best solution is probably to re-write the game in javascript.
The short answer to your question is now. I'm presuming that since you're running Mambo you're web environment is a LAMP stack. However, you're "Guessing Game" is most likely a Windows application from the sound of it. For a beginner in programming, there is no integration path you're going to be able to take that will allow you to have your game running on your website.
However, here are avenues you can take, which will require a significant amount of time to learn. I'm not saying you shouldn't take time to learn, by all means you should! I'm simply trying to illustrate the fact that this is not something that is going to be doable in a couple of hours.
Silverlight - allows you to run C# code with a WPF like interface on your client's browser and can integrate with your web site through javascript.
Let your client download it from your website and run it off of their PC. This would actually be fairly trivial and would be your quickest option, but it sounds like it's not the kind of integration you were looking for.

Categories