Add script to run if user clicks x to quit prematurely
I have a little application that writes a flash shared object
to the users pc. If the user clicks x to quit, is there any way I
can get this action to trigger a script that promts the user to
save before quitting with a Yes No box.
no. I assumed you were working from a browser.
I would look into making your projector an AIR application.
The AIR framework gives you a lot more functionality than a Flash
projector does, and allows you to pretty much just drop your
current flash into it working. AIR gives you native file saving
functionality, as well as the ability to make your own window skin,
which would allow you to create your own close button that you can
attach an event listener to.
Otherwise, I know of no way to catch the close button click
in a standard Flash projector.
Similar Messages
-
.msi runs everytime user clicks the desktop icon
We have been working on creating bundles to deploy small apps to our end users. We are on Zen 10.2.2, and have about 1500 users. I have been building apps in Adminstudio, and they deploy correctly. On some users PCs though, when they double click on the desktop icon that is created after the deploy, the .msi progress bar runs across the screen very quickly and then the application opens just fine. Is this normal? It only seems to happen after a restart or logout. If they close the app and reopen it, there is no progress bar. I'm new to creating bundles, so please let me know if you have any ideas. Thank you.
Is their Windows Profile Being Recreated Each Time?
Put some junk on the desktop and verify the profile is not being reset
for some reason.
On 2/1/2011 12:36 PM, bkienzle wrote:
>
> We have been working on creating bundles to deploy small apps to our end
> users. We are on Zen 10.2.2, and have about 1500 users. I have been
> building apps in Adminstudio, and they deploy correctly. On some users
> PCs though, when they double click on the desktop icon that is created
> after the deploy, the .msi progress bar runs across the screen very
> quickly and then the application opens just fine. Is this normal? It
> only seems to happen after a restart or logout. If they close the app
> and reopen it, there is no progress bar. I'm new to creating bundles,
> so please let me know if you have any ideas. Thank you.
>
>
Craig Wilson - MCNE, MCSE, CCNA
Novell Knowledge Partner
Novell does not officially monitor these forums.
Suggestions/Opinions/Statements made by me are solely my own.
These thoughts may not be shared by either Novell or any rational human. -
Run with user privileges but write to restricted folder
In Windows Server 2008 R2 (and in an Active Directory domain), the login and logoff scripts are run with user privileges.
Suppose that I run script1.ps1, when user1 logs in; I need that script1.ps1 is associated to user1, because it will write some informations about that user: it modifies a log file in a folder. Anyway, script1.ps1 will be run with user1 privileges.
I obviously made that file and that folder accessible (readable/writable) to user1: but I actually don't want the user to modify that log file. I would like that
only the script could do it.
Is there a way to work around this problem? Maybe should I run script1.ps1 in a different way?Henry. You can add a subscription to a server that subscribes t event log entries on user computers. Subscribe to the logon/logoff events. Now you have a central repository of logon and logoff events.
There is no way to accomplish what you are asking to do. Any file that can be written to in logon script or during a user session can be changed by the user.
Bil is suggesting a "startup" script that runs when the user logs on and not when the computer starts. A user startup script runs as the user and not system.
Another method is to schedule a script that run at logon. This can run as system and write to a file that the user cannot change.
¯\_(ツ)_/¯ -
Why JSP Script Always Run First...
Hey' i don't understand about this code works, why when i run this page, it always print start in console before i click the button.
This is my code :
<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
<script language="Javascript">
function checkButton(){
<%
/* This declaration will print in console
* every time the page load.
* it suppose to be print after i click the buttonCheck button. */
System.out.println("start");
%>
</script>
</head>
<body>
<form name="myForm">
<input type="button" value="check" onClick="checkButton()" name="buttonCheck">
</form>
</body>
</html>Why my JSP Script always run before i click the button? JSP script must be run after i click my button. is there any explanation about this?
Thanks..
Message was edited by:
hudoqthe jsp scriptlet tag will be execute while compilation.
so all the scriplet tags will be compiled and
executed while loading. This is generally not 100% true. JSP files will be compiled only once in the fresh server start. This also explains the "long loading time" on the 1st view ;) The subsequent views just executes the already compiled JSP. -
How to make a text field required at run time when the user clicks the checkbox ?
I got a form where , there are several checkboxes and text fields associated with that checkboxes.If the use clicks on the check box then the associated
text fields should become required.I have tried the change event and the click event for the checkboxes.It gives error in the onChnage event and I got some weird results in the on click event .Sometimes if the user click the check box , then for the 1st time the field doesnt become required , then the user onclicks the check box and when the user clicks the checkbox for the second time the field becomes required,but if i deselects the highlighted field option and selects it again the field becomes required even if the user onchecks it I am totally confused !!! Adding to it i have also written the wrong code still i achieved the desired result ?? How it can be possible . I am writing the codes below , please help me as i am working under a deadline from the client.
onChange event :
var newVal = this.boundItem(xfa.event.newText);
if(newVal == 0)
xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row4.Purchasecost3_1" ).validate.nullTest = "disabled";
else
xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row4.Purchasecost3_1" ).validate.nullTest = "error";
For the onClick event :
var a = xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row2.CostItemRecovere d_OnlyEnergyCharges").rawValue;
//app.alert(a);
if(a == 0)
xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row4.ComplianceCheck_ L1_1").validate.nullTest = "error";
if(a == 1)
xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row4.ComplianceCheck_ L1_1").validate.nullTest = "disabled";
Please help someone !!!I used the onchange event and wrote the code for it. I got the result . But there is a problem.All these fields are in a table and it's a dynamic table where you can add rows dynamically at the run time .I have other change event for some fields in this table .All are working fine when i add the row.But for this check box the required fields are not validated as required at the run time . I am here giving the code , Please help me .
form1.Subform0.Subform1.Subform9.Subform10.Table48.Row2.CostItemRecovered_OnlyEnergyCharge s::change - (JavaScript, client)
if(this.rawValue == "1")
xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row4.ComplianceCheck_ L1_1").mandatory= "error";
xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row4.ComplianceCheck_ L2_1").mandatory= "error";
xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row5.ComplianceCheck_ L1_2").mandatory= "error";
xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row5.ComplianceCheck_ L2_2").mandatory= "error";
xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row6.ComplianceCheck_ L1_3").mandatory= "error";
xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row6.ComplianceCheck_ L2_3").mandatory= "error";
xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row7.ComplianceCheck_ L1_4").mandatory= "error";
xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row7.ComplianceCheck_ L2_4").mandatory= "error";
xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row8.ComplianceCheck_ L1_5").mandatory= "error";
xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row8.ComplianceCheck_ L2_5").mandatory= "error";
else
xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row4.ComplianceCheck_ L1_1").mandator = "disabled";
xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row4.ComplianceCheck_ L2_1").mandatory = "disabled";
xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row5.ComplianceCheck_ L1_2").mandatory = "disabled";
xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row5.ComplianceCheck_ L2_2").mandatory = "disabled";
xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row6.ComplianceCheck_ L1_3").mandatory = "disabled";
xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row6.ComplianceCheck_ L2_3").mandatory = "disabled";
xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row7.ComplianceCheck_ L1_4").mandatory = "disabled";
xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row7.ComplianceCheck_ L2_4").mandatory = "disabled";
xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row8.ComplianceCheck_ L1_5").mandatory = "disabled";
xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row8.ComplianceCheck_ L2_5").mandatory = "disabled"; -
How to run a Unix Script from a specific user
Hi,
I want to run a GoldenGate related unix script from a super user. I have created crontab enter from that super user. But its still running from root user. As GGSCI cannot be invoked other than super user, the Script is failing.
The Script is running fine on command prompt and from "at" batch job command.
Please give me a way to run the script from a specific user on Cron
Thanks,
SaravanaHi.
can you show:
grep root /etc/passwd
grep <super user> /etc/passwd (It's not clear for me, what you call super user. For me - root is super user. )
ls -la /var/spool/cron/crontabs
Generaly for add cronjobs for any user need:
crontab -e <username>
For more information - man crontab
Reagrds. -
Script to run against ALL AD users in a loop
I am going to do a SharePoint upgrade this weekend from 2010 to 2013.
I need this script to run against every Active Directory user automatically, not just one at a time. How do I get this get this script to do that? I figure I create a pipeline, I just don't know where.
Here is the script:
Param(
[string] $account = $(Read-Host -prompt
"UserAccount")
Add-PSSnapIn Microsoft.SharePoint.PowerShell
foreach ($wa in get-SPWebApplication)
Write-Host "$($wa.Name) | $($wa.UseClaimsAuthentication
#http://technet.microsoft.com/en-us/library/gg251985.aspx
$wa.UseClaimsAuthentication = $true
$wa.Update()
$account = (New-SPClaimsPrincipal -identity
$account -identitytype 1).ToEncodedString()
$zp = $wa.ZonePolicies("Default")
$p = $zp.Add($account,"PSPolicy")
$fc=$wa.PolicyRoles.GetSpecialRole("FullControl")
$p.PolicyRoleBindings.Add($fc)
$wa.Update()
$wa.MigrateUsers($true)
$wa.ProvisionGlobally()
Please help me! Thank you!Hi,
Need to do something like this
$Users=Get-ADUser -filter *
foreach ($User in $Users) {
YOUR SCRIPT
-Identity $Users
YOUR SCRIPT
YOUR SCRIPT
YOUR SCRIPT
Seidl Michael | http://www.techguy.at |
twitter.com/techguyat | facebook.com/techguyat -
Hi Expert,
Explanation:
In the sales quote there is a Submit in the Action Menu, so when a user click on the submit button then sales quote approval process triggers and
sales quote saved with Approval status as "In Approval" .
Requirement: Each time user click on the submit of sales quote then we have to record this action and update our BO for further calculation.
Issue: All BO elements in the ActionValidation-Submit script file are accessible but they are read only so can not be modified.
So when you click on the Submit then immediately after submit action event beforesave gets trigger, so we build logic here but issue is that we are not able to segerate this save even, I mean which SAVE is coming from the EXPLICIT save button on the UI or which save being triggered from Submit Action.
Resolution tried: We found only one script for the submit action ActionValidation-Submit script file so we implemented this script but here all BO elements are read only, we can not modify those elements.
Even we are not able to return any variable on the validation submit script. so only we can return true/false that says validation is success or not.
My Question : How to capture the information in the event before save when user click on the submit on the sales quote.
So other than valiation script file is there any other appraoch by which I can acheive this. even in the global variable "this" I also dont find any varaible that is setting as true/false that refers to action triggers on the sales quote.
Thanks
AsaadThanks Meghana.. Appreciate your input.
We are doing this but the issue we are encountering is after the submit if other user changes sales quote and click on the SAVE button then we dont want this save from SAVE button on UI, so always whenever user click on the submit from action menu in the sale quote then we need to capture user information at the submit click.
Thanks
Asaad -
How do I run a video in one cell of a table when a user clicks a button in another cell?
In other words, I want to put 3 buttons in one cell of a table so that the user can run one of three Flash videos in a cell beside the buttons. How do I do that?
Header 1
Header 2
button 1 runs video 1
button 2 runs video 2
button 3 runs video 3
video 1, 2, or 3 is inserted here when the user clicks the buttonYou will have better luck if you find a Flash Player that uses a playlist. Direct links to FLV files don't work.
http://www.wimpyplayer.com/
http://www.woosterwebdesign.com/flvplayer/
http://www.longtailvideo.com/players/jw-flv-player/
http://flowplayer.org/
Another option is to upload your videos to YouTube.com. You can customize a YouTube player and populate it with videos you specify. Then paste their player embed code into your web page.
http://code.google.com/apis/youtube/getting_started.html
Nancy O.
Alt-Web Design & Publishing
Web | Graphics | Print | Media Specialists
http://alt-web.com/
http://twitter.com/altweb -
How to create a one click apple script to run sudo rm -rf in terminal
Hey Everyone
I have sensitive information on my computer, quite paranoid and would love to have a one click script to run sudo rm -rf in terminal.
I'm quite new to scripts and all that, can someone please explain how to do this as a noob?
would love if I didn't need to enter the password to authorise the wipe.
also is there anything more effective as sudo rm -rf?
and can sudo rm -rf be undone? like can some traces be brought back from the drive if your like a super pro at hard drive data recovery?Welcome to Apple Support Communities
That's not the way to delete everything from the hard drive, because your files can still be recoverable after running that command with special apps.
Instead, if you want to make sure that your data cannot be recovered, start up in OS X Recovery (hold Command and R keys while your Mac is starting up), open Disk Utility and erase your OS X partition by choosing one of the security options you can use to erase your files. See > http://pondini.org/OSX/DU2.html
A better option would be to put that sensitive data onto an encrypted external drive -
Where can I handle Validation When user clicks Add? (User Table Form)
Hi,
Iam not sure as to where is the correct way to validate form info when the user clicks Add, and if a field is blank that it is needed to be filled, how to stop the adding process?
Also, I want to set default values after a successful save has been done, what event can I use to determine this?
Thank you!Hi,
after closing the last questions without rewarding i give you a second chance
you're talking about UserTables Standard Forms ?
catch the et_ITEM_PRESSED event to validate if someone wants to add something
the only tricky thing for a UserTable Form is that you have to compare the oForm.Title to know
which window is open.
so you should do something like
if oForm.Title = "UserTable - Description" and pVal.EventType = et_ITEM_PRESSED and pVal.ItemUID = "1" and
pval.BeforeAction = True then
' check the data and set bubbleevent to false to stop the adding process if you need to
BubbleEvent = False
end if
default Data you set in UserTable very easy - give the field in "manage user fields" window a default value.
if you need more help feel free to ask
lg David -
How to create and add a logon/logoff script to populate last user into the computer field in AD
Hi All,
Bit stuck here,
Not sure what forum to put this is as it involves different subjects,
I work in a Server 2008 RT environment and have access to Active Directory etc.
I saw this a few weeks ago - http://ivan.dretvic.com/2012/10/automatically-generate-description-field-for-computers-in-active-directory/
Now, I'm not particularly sure what to do here, I don't know how to create a group policy etc. How to implement it in a test environment etc. Never done this before.
Can somebody give me a step by step guide on literally everything that would be involved in this?
Or any links that may be able to help?
I basically want the AD to show who was the last user that logged into a specific client when the client named is searched for in the Computers OU, and if possible being able to pull the make/model and serial number from the client aswell.
If possible there should be a way of including this with the existing login script that we already have, how can I do this?
I've tried a few so far and got stuck, I have domain admin priveledges also.
Thanks,
Regards, Max.Hi Max,
Please refer to the following article to learn how to create a logon/logoff script via GPO:
Assign User Logon Scripts
Assign User Logoff Scripts
As for the issues about script, this is the forum to discuss questions about driectory service, better to post your question to the forum for Script:
http://social.msdn.microsoft.com/Forums/en-US/home?forum=scripting
The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or
learn from your interaction with us.
Thank you for your understanding.
Regards,
Lany Zhang -
VB script to run a batch script as admin
I have batch script the I need to run as an administrator, I created a VBscript wrapper that calls a runas and runs my batch file, however the batch file is not being elevated high enough on Windows 7 and Vista, it works fine on XP. The batch script
needs to create a folder in Program files, and copy the necessary files, install several programs, as well as make several registry key changes. If I am logged in as a user with admin rights, right click on the batch file and select "Run as Administrator"
the batch works fine. Using the VBscript to elevate the rights, it installs the programs, but when it comes to creating the folder in Program files\Program data and Registry edits, it fails. Is there any way to script so I can elevate the batch
file to the same level as selecting "Run as Administrator?
Set objShell = WScript.CreateObject("WScript.Shell")
objShell.Run("runas /user:domain\user \\unc\location\Install.bat"), 1, True
WScript.Sleep 100
oShell.Sendkeys "password~"
Another issue, I am having with the script is that it will not send the password, I have to type it manually to test.
The idea is to have the end user be able to click on a link from a webpage and install the program itself, as opposed for our Helpdesk be required to install the program. So psexec is no doable as it is not on any of the PCs and user login scripts
is not an option either, as we don't want the program install on every PC.Evers_Mark,
Here is a VB Script Vall Script that will get around the Password Prompt when "RunAs" is called...
'Start
' To Run other VB Scripts or even Batch Files with Admin Priviliges'
Dim WshShell, objFSO
suser = "[email protected]"
sPass = "YourPassWord"
'Put your Domain Account and Password in between the qoutes, REMEMBER! the Password will be clear text. If this is a standalone just take off the @YourDomain.com
sCommand = "wscript \\UNCServerName\ShareFolder\YourScript.vbs"
'This will be the path were the scripted you want called will be at. Please note you can substitute the ablove for a local directory (Example: C:\Folder\YourScript.vbs)
Set objComputer = CreateObject("Shell.LocalMachine")
Set WshNetwork = CreateObject("WScript.Network")
Set WshShell = CreatObject("WScript.Shell")
Set WshEnv = wshShell.Environment("Process")
WinPath = WshEnv("SystemRoot")&"\System32\runas.exe"
rc = WshShell.Run ("runas /noprofile /user:" & suser & " " $ Chr(34) & sCommand & Chr(34))
WScript.Sleep 900
WshShell. AppActivate(WinPath)
WScript.quit
'End
I've used this myself to call up scripts with admin rights however I've not tested it with the UAC on in either Vista or 7, However works like a peach with 2000 & XP. From this point you can add in the script into Peagus's disabling the UAC Script as
mentioned below. The usual warnings apply on the security, passwords are sent in plain text.
John M. Keller MCP (XP & 2003) | Security + E-Mail : [email protected]
Sorry but this topic has been closed for almost a year.
If you have a script to share feel free to put it in the repository. (link above).
If you have a new question then please start a new topic.
¯\_(ツ)_/¯ -
How to cancelling email submission after user clicks "yes/no" button of message box?
could some one tell me, how can i cancelling the submission event after one user clicks "yes/no" button of message box? The scenario is the following:
After data input in a dynamic form clicks the user send mail button. Before the email submit, the user has to decide going back to the form and validate the input or continuing to submit email.
In case of going back to validate input the submission event must not solve. So, how can i implemente it in java and/or form calc script?
Thanks so much for your help in advance and i am very glad to hearing from you soon!
DjingesHello,
The most easy way to solve your problem is to add two buttons, the first should be regular button and the second is submit by e-mail one. Set the
'presence' property of the second to 'hidden' and add to it your email address. To the first button on 'click' event add the script like this
form1.#subform[0].Button1::click - (JavaScript, client)
var answer = xfa.host.messageBox("Send e-mail?","e-mail",2,1);
if(answer==1){
EmailSubmitButton1.execEvent('click');
Hope this helps. -
Run with User's rights not working as expected
I have a VBscript that runs the Quest Client Profile Updating Utility for migrating Outlook e-mail profiles to a new Exchange Server. For this tool to work it must be run using the User's security context when the user is logged onto the computer.
What I have found is that the script fails to run because SCCM is running the script with elevated privileges. The program is set with 'Only when a user is logged on' and a run mode of 'Run with user's rights'. The advertisement is set to run from
a distribution point and has two mandatory re-occuring schedules (Logon, and at 6:00 a.m. every day).
To test what is happening I created a separate Program that has the same program settings but only runs 'Cmd.exe /k echo' for the command line. If I run this SCCM program as a user who is not a member of the local administrators group
I can execute privileged programs like regedit.exe. If I run the Command Prompt from the Start\Accessories folder and try to run Regedit I receive an 'Access denied' message. It appears SCCM is running with elevated privileges.
Does SCCM run a program with elevated privileges? How can I make a program run without elevated privileges.
thank you for your help.Actually I ran into a similar issue today trying to gather info about mapped network drives and found this thread when trying to troubleshoot it. Here's a summary of what I've done:
I have an SCCM package set up to run a script to dump the users' mapped drives to a text file. The program is set to run only if a user is logged on and to run in the logged on user's context. UAC is enabled. For users who are members of
the local Administrators group, the resulting text file was empty, as if no drives were mapped. Running the script manually (not via SCCM, just double-clicking the script) populated the text file with the expected results. So the script works correctly.
I suspected SCCM was running the package elevated, since drives mapped in the non-elevated context aren't visible to the elevated context.
To test, I created another package & program that runs a command I know requires elevation (ipconfig /registerdns) and pipes the output to a text file. I configured it in the same way, and for users who are in the local admin group, the text file results
indicate that the command ran successfully (which means it ran elevated). If I take the user out of the local admin group, making no changes to the package, then run the package again, the text file results say "This command requires elevation."
So, it appears SCCM is running with the highest elevation level for which the user has rights. I guess this makes sense, and it's not doing anything the user wouldn't normally have rights to do, but it does cause a problem when a program needs to run
under the user's non-elevated token. Any suggestions?
Thanks,
Matt
Maybe you are looking for
-
Creating target field based on input node
Hi all, I'm facing a problem in creating the target node based on input node. See if the input node value is repeated I don't want to create the target field for the second occurrence. <?xml version="1.0" encoding="UTF-8"?> <ns0:MT_temp xmlns:ns0="
-
Jakarta Tomcat error - 'Package MyUtils not found in import.'
Jakarta Tomcat - 'Package MyUtils not found in import.' Can anyone help with this error please? My JSP code P6.jsp contains :- <%@page import="MyUtils.* ,java.util.*"%> But, the package MyUtils with class file NameStore.class is not found. The actual
-
Creating a document & making it accessable on the web using a link.
There is an issue I want to address to the forum. I don't want to clutter up my posted topic with an entire page of information that is rellevent to my topic. How can I create a document that other Apple Discussion members can view it using a link? W
-
CREATE OBJECT h_excel 'EXCEL.APPLICATION'.
hi all! I need know, what method or property i have to use, for set up the filename by default, for the workbook that i created. thank in advance
-
Hi gurus, We just installed CRM 5.0 sandbox. We also installed Java server, TREX and other components. However, we still don't know how to get into the initial web shop page. Can someone send us the Internet Sales cookbook? Or if it's really simple,