Run app from a service using CreateProcessAsUser - windows-vista

I'm still trying to run an app calling it from windows service. I tried to use the way described by Scott Allen. It works. But still I can't bring the app to the screen to interact with it. Help me pls.
Even if I'm telling it to run the service using my credentials it doesn't bring the app on my desktop. tell me please how to get the current logged user's desktop token and run the app on that desktop.

Are you setting STARTUPINFO.lpDesktop to something like "winsta0\default" ?

Related

Does an app need to be public for Marketing API use only

I am a developer and to use the marketing API I must have an app. I have this app and it is currently in development mode. Is it necessary to make this app public?
My initial thinking was 'no' and I have been successfully using the API via this app for a while now and have not experienced any limitations until recently. When trying to change the status of an Ad to active I got an error message that suggests the problem could be due to the app being in development mode.
FWIW I am able to successfully change Ad status to paused most of the time, however, more often when I try to activate an Ad, it fails, although it does succeed sometimes. As such, I believe I am using the API correctly. It seems to be more of an Ad state issue, or, perhaps an app state issue. Most of the time the error messages I receive from the API are not helpful. I did get one today that suggests the possibility that my app needs to be public.
Here is the error just in case it helps:
[{"code":400,"body":"{\"error\":{\"message\":\"Invalid parameter\",\"type\":\"OAuthException\",\"code\":100,\"error_data\":{\"blame_field\":\"targeting invalid fbid 141898914497\"},\"error_subcode\":1487133,\"is_transient\":false,\"error_user_title\":\"Can't Set Exclusion Targeting\",\"error_user_msg\":\"You may not be able to select a connection to exclude in your targeting because you're not an admin of this Page or app, or because the app is in developer mode, or the event is in the past. If you want to run your ad with exclusion targeting, please request admin access from the owner of the Page or app or move your app out of developer mode to link it to the ad. If you want to select an event for exclusion targeting, please make sure the event end time is in the future.\",\"fbtrace_id\":\"Dqzily7dOQa\"}}"}]
Thank you for any help or insight into this issue.
Just to resolve this, the answer is no, the app does not have to be public in order to use the API. The problem turned out to be an access permission issue on the account in question.

How to add login credentials to a make command?

Many times (not always) i need to enter my credentials when i run an app. I am using Appcelerator to build mobile apps and whenever a coworker is also using the credentials i get booted out since it does not allow multiple users to be logged in at once. We have a Makefile that automates a lot of the tasks. When we do make run it cleans and runs our apps. However, we do need to enter our login credentials every time we are both developing. How do we make it to where if we are asked to enter our email and password it would automatically be entered?
Auto-login for appcelerator ?
https://www.dalsgaard-data.eu/blog/autologin-to-appcelerator-titanium/
http://johnjardin.ukuvuma.co.za/2013/07/15/appcelerator-tip-have-titanium-auto-login-on-startup/
I don't know if you are looking for that or not.

How to integrate google contacts api in node webkit

I need to integrate google contacts import in my nw.js app. How should I create the google app ? When I create the app as web app, it asks for redirect uri which is not available for desktop apps. I'm not clear about how to implement google integration for desktop apps. Can anyone help me on this. ?
There is an option in OAuth for desktop applications, when instead of http://domain you will redirect to app://something and you application will be started or receive a callback.
To make this, in your application you need to open request token url in new window (new window in your node-webkit app).
Also: google docs and node-webkit github issue and other issue about this.
For me I thought better would be open a default browser, there is a high chance that user already authenticated, and then just need to click "allow". So I start simple webserver inside node-wekit app and redirect to localhost.
You can see implementation in my project https://github.com/Paxa/postbird/blob/90cfb53b1775310eb2f262c8b54c9dba15b5cc0a/app/heroku_client.js#L185
To open default browser I use command "open" (only for mac)
child_process.spawn('open', [url]);
I also try to close browser window when user redirected back, it works but not always.
response.writeHead(200, {"Content-Type": "text/html"});
response.end("<script type='text/javascript'>window.close();</script>");
May be I should also make a window active when receive redirect back (didn't try it yet):
var currentWin = require('gui').Window.get();
currentWin.focus();
If google not allows to make localhost as a callback url, you can try to use some domain (even free) and point it to 127.0.0.1 or use http://readme.localtest.me/

Google Apps Marketplace CustomerLicense returns UNLICENSED even after installation

This ask is related to the release of the "non-admin can install an app on a domain" feature announced here: http://googleforwork.blogspot.com/2014/09/google-apps-marketplace-to.html
I'm seeing that when a non-admin installs our app onto their domain (through the use of a whitelist), the CustomerLicense returned from the "https://www.googleapis.com/appsmarket/v2/customerLicense/" endpoint is still UNLICENSED. When an admin installs the app, the CustomerLicense is set correctly to ACTIVE.
Seems like a bug. If not, can someone from the GAM team help clarify what I should expect here? Thanks!
non-admin installs the app only for himself/herself. Since CustomerLicense api is for querying domain level licensing info, the api correctly returns UNLICENSED.
Try using UserLicense api instead https://developers.google.com/apps-marketplace/v2/reference/userLicense.

API to Login Windows user

I would like to programmatically login another windows user in interactive mode.
I've created new Windows user account and would like to switch system to that account without of user interaction.
Could you please point me to some API commands or MSDN pages?
Thanks
looks like WTSConnectSession is the right direction
If you're not talking about a Terminal Server session, you'll want LogonUser() if you're logging in as that user, or ImpersonateLoggedOnUser() if you're wanting to do something as an already-logged in user. Both can be found in Advapi32.lib.

Resources