That certainly looks like the sort of stuff I have access to currently, thanks for digging that up.
To clarify....in an AppSense environment you have all sorts of trigger events (Startup, Logon, Process Started/Stopped, etc.) What I am looking for here is a user Process Started trigger that I can use for the user to initiate certain functions. In this exact case, I want them to launch a program which will then allow me to configure the environment for remote support (allowing access to the C: drive, reversing certain policies, etc.) Unfortunately, if I use a pre-existing application (Office, Notepad, whatever) I then have to either deal with the app itself and/or close it down. The idea is, give me an "empty" executable that effectively "does nothing". And then use the Process Started trigger for this app to perform other actions. Reason I can't do it in PS is because the PS executable is obviously used for other things as well, so using PS as a trigger is a non-starter The idea is, if I can use a bit of PS code (or VB or JS) which is native to EM, I can drop this empty executable on any endpoint and create a shortcut to it which then allows me to leverage the exact Process Started trigger. So I know when a user has initiated a request for the precise set of Actions, without having to adjust my application control rules and/or deal with the interface of the application itself. I will see what I can do with the code from that link MBS has sent...others have offered some coding help as well, which I am very appreciative of. Hopefully I can make some progress, I think the article I have in mind for this will do a lot to help AppSense admins the world over get things done more effectively, so I'm keen to find a solution. Cheers for everyone's input, JR On 18 October 2013 17:48, Michael B. Smith <[email protected]> wrote: > Doesn’t really matter.**** > > ** ** > > Now that I understand (I hope), I think that here is the outline of what > you want:**** > > ** ** > > > http://weblogs.asp.net/adweigert/archive/2008/09/29/powershell-oh-happy-days-are-here-compiling-c-code-for-strongly-typed-objects-within-powershell.aspx > **** > > ** ** > > *From:* [email protected] [mailto: > [email protected]] *On Behalf Of *Michael B. Smith > *Sent:* Friday, October 18, 2013 12:42 PM > > *To:* [email protected] > *Subject:* RE: [NTSysADM] More PowerShell**** > > ** ** > > Is the C# source static?**** > > ** ** > > *From:* [email protected] [ > mailto:[email protected] <[email protected]>] *On > Behalf Of *Rankin, James R > *Sent:* Friday, October 18, 2013 12:27 PM > *To:* [email protected] > *Subject:* Re: [NTSysADM] More PowerShell**** > > ** ** > > Not sure of the exact terminology required....basically uses some .Net > functions to create an executable, in the example I have. > > I can run the script as System, so it functions OK with the privilege > required. > > Cheers, > > > JR**** > > Sent from my BlackBerry, which may make me an antiques dealer, but it's > reliable as hell for email delivery :-)**** > ------------------------------ > > *From: *"Michael B. Smith" <[email protected]> **** > > *Sender: *[email protected]**** > > *Date: *Fri, 18 Oct 2013 16:23:29 +0000**** > > *To: *[email protected]<[email protected]>**** > > *ReplyTo: *[email protected] **** > > *Subject: *RE: [NTSysADM] More PowerShell**** > > ** ** > > So you don’t actually mean “compiles an executable”. You mean “compiles a > source file into an executable”. Is that correct?**** > > ** ** > > You are aware that placing the executable in %ProgramFiles% is a high > privilege operation?**** > > ** ** > > *From:* [email protected] [ > mailto:[email protected] <[email protected]>] *On > Behalf Of *James Rankin > *Sent:* Friday, October 18, 2013 9:35 AM > *To:* [email protected] > *Subject:* Re: [NTSysADM] More PowerShell**** > > ** ** > > Just to redefine, then...**** > > ** ** > > I am looking for a script (PowerShell, VB or JScript will do) that creates > an executable in a specified place. The compiled executable code does > nothing but pauses for a second or two and then closes.**** > > ** ** > > The one I currently have does this:-**** > > ** ** > > Compiles an executable that will run for a couple of seconds then exit**** > > Creates the executable file called xxx.exe in %ProgramFiles%\xxx**** > > ** ** > > This is all I actually need it to do - I am using it as a kind of > user-defined trigger for other actions.**** > > ** ** > > On 18 October 2013 14:32, Michael B. Smith <[email protected]> wrote:* > *** > > I'm wondering if I also misunderstood. Would you say more? > > Sent from my Windows Phone**** > ------------------------------ > > *From: *Manuel Santos <[email protected]> > *Sent: *10/18/2013 9:29 AM > *To: *[email protected] > *Subject: *Re: [NTSysADM] More PowerShell**** > > Hi James. I am not quite sure on what you want. Can you please PM me, as I > might have a solution for you. **** > > Thanks**** > > ** ** > > 2013/10/18 James Rankin <[email protected]>**** > > Hmmm, bummer. I thought I was just getting hit by a lot of Google-chaff > because every link I could find simply talks about creating an executable > from a PS script, which is obviously not what I want. Rather frustrating > when you know it's possible because I've got code that works but can't use > it :-(**** > > ** ** > > On 18 October 2013 14:02, Michael B. Smith <[email protected]> wrote:* > *** > > I’ve got 3 different ways of doing this, all work for hire (which means it > can’t be shared). I don’t know of anyone that did this and placed it in the > public domain. If you find one, let me know too. J**** > > **** > > *From:* [email protected] [mailto: > [email protected]] *On Behalf Of *James Rankin > *Sent:* Friday, October 18, 2013 7:09 AM > *To:* [email protected] > *Subject:* [NTSysADM] More PowerShell**** > > **** > > A guy I knew once gave me a bit of PowerShell which would compile an > executable on an endpoint. The executable did nothing except run for a > couple of seconds and then exit, which was exactly what I needed.**** > > **** > > Unfortunately I am now putting together a blog post which utilizes this > handy function but the guy who wrote it is unwilling for me to use his > code, even with a credit. So I thought I'd Google about and try and find my > own way of doing it.....but I can't find anything I can make head or tail > of.**** > > **** > > Can anyone point me in the direction of some PS that can do this sort of > thing, so I can put together my own bit of code for the blog post?**** > > **** > > Cheers,**** > > **** > > > **** > > **** > > -- > *James Rankin* > Technical Consultant (ACA, CCA, MCTS) > http://appsensebigot.blogspot.co.uk**** > > > > **** > > ** ** > > -- > *James Rankin* > Technical Consultant (ACA, CCA, MCTS) > http://appsensebigot.blogspot.co.uk**** > > ** ** > > > > **** > > ** ** > > -- > *James Rankin* > Technical Consultant (ACA, CCA, MCTS) > http://appsensebigot.blogspot.co.uk**** > -- *James Rankin* Technical Consultant (ACA, CCA, MCTS) http://appsensebigot.blogspot.co.uk

