How to check a checkbox in batch file

Hello Guys,
Heres an easy for you guys but nightmare for me question: I'm writing a batch file to login to sharepoint site. But I need to be able to check the "keep me signed" box also. How do I make my batch file to auto check that?
I will attach my codes and site link for you guys to find out what the "checkbox" is called...
Thank You in advance..
The link is http://fwmc.sharepoint.com
Here is my code: 
set WshShell = WScript.CreateObject("WScript.Shell")
call WshShell.Run("http://fwmc.sharepoint.com", 1, false) 
WScript.Sleep 2000
WshShell.SendKeys "[email protected]"
WScript.Sleep 2000
WshShell.SendKeys "{TAB}"
WScript.Sleep 2000
WshShell.SendKeys "userpassword"
WshShell.SendKeys "{TAB}"
WScript.Sleep 2000
WshShell.SendKeys "{ENTER}"
WScript.Quit()

Heres an easy for you guys but nightmare for me question: I'm writing a batch file to login to sharepoint site. But I need to be able to check the "keep me signed" box also. How do I make my batch file to auto check that?
This is a nightmare for you because the SendKeys method cannot be relied upon. Why? Because you can never be sure where the current focus is. While it is possible to place a tick mark by sending a space (instead of ENTER!), you will find that it will work some
of the time and it won't some other times. Any unexpected pop-up will derail your script. If you need robust code then you must avoid SendKeys.

Similar Messages

  • How to check a checkbox field value in fw9 PDF form

    Hi,
    I got a PDF given form IRS (http://www.irs.gov/pub/irs-pdf/fw9.pdf). While creating a widget to this pdf form to sign it, I merged the custum data to those PDF form fields using API setMergeFields.
    All the data fields are merged fine except the checkboxes. I tried by passing the values to the merge_fields array as 'On', '1', 'checked', 'checkbox(checked)' but no luck
    What is wrong here in checking the chexbox field in this fw9 PDF or How to check a checkbox field in a form?
    Thank you,

    Hi Simon,
    I re-added and edited the fields of fw9 form by pdf printer. While doing so, I made fields as ready only so that, the data cannot be edited in the form through the widget but will be merged the data to fields only be the code. Wherein Im using the widget only for signature but not for form filling.
    Here, Im able to merge my custom data to all fields while creating widget but not to the fields of checkboxes. The checkboxes fields which are made ready-only are not allowing me to merge the value as checked by the API.
    Please help me,
    Thanks you,

  • How to check the element  in xml file by xpath

    hi all,
    * How to check the element in xml file by xpath
    for the following XML file,
    * I want to check whether
    the element (sage) is present or not in the following xml file XPATH expression...
    * I have tried by the following expression ,
    NodeList result = (NodeList) xpath.evaluate("//*:student/*:sage/text()",xml_dom,XPathConstants.STRING);
    System.out.println(result.item(0).getLocalName()); * I want to get the Element sage as String value....
    but i am not able to get the element,why that ??? and How to do that ???
    MyXML File :
    <x:student>
    <x:sname>aaa</x:sname>
    <x:sage>26</x:sage>
    </x:student>
    Thanks,
    JavaImran

    <code>* Thanks for reply....
    * </code><code>In </code>
    <code>x:student element x represents the namespace...thats why i put *:student in my expression....
    "//*[local-name() = 'student']/*[local-name() = 'sage']/text()"* By the above code , i am not able to get the sage as string from
    </code> resul.item(0).getLocalName() method.......?
    * How to get that as string format ?

  • How to pass arguments to a batch file from java code

    Hi
    I have a batch file (marcxml.bat) which has the following excerpt :
    @echo off
    if x==%1x goto howto
    java -cp C:\Downloads\Marcxml\marc4j.jar; C:\Downloads\Marcxml\marcxml.jar; %1 %2 %3
    goto end
    I'm calling this batch file from a java code with the following line of code:
    Process p = Runtime.getRuntime().exec("cmd /c start C:/Downloads/Marcxml/marcxml.bat");
    so ,that invokes the batch file.Till that point its ok.
    since the batch file accpets arguments(%1 %2 %3) how do i pass those arguments to the batch file from my code ...???
    %1 is a classname : for ex: gov.loc.marcxml.MARC21slim2MARC
    %2 is the name of the input file for ex : C:/Downloads/Marcxml/source.xml
    %3 is the name of the output file for ex: C:/Downloads/Marcxml/target.mrc
    could someone help me...
    if i include these parameters too along with the above line of code i.e
    Process p = Runtime.getRuntime().exec("cmd /c start C:/Downloads/Marcxml/marcxml.bat gov.loc.marcxml.MARC21slim2MARC C:\\Downloads\\Marcxml\\source.xml C:\\Downloads\\Marcxml\\target.mrc") ;
    I get the following error :
    Exception in thread main java.lang.Noclassdef foundError: c:Downloads\marcxml\source/xml
    could some one tell me if i'm doing the right way in passing the arguments to the batch file if not what is the right way??
    Message was edited by:
    justunme1

    1 - create a java class (Executer.java) for example:
    import java.lang.reflect.InvocationTargetException;
    import java.lang.reflect.Method;
    public class Executer {
         public static void main(String[] args) {
              try {
                   for (int i = 0; i < args.length; i++) {
                        System.out.println(args);
                   Class<?> c = Class.forName(args[0]);
                   Class[] argTypes = new Class[] { String[].class };
                   Method main = c.getDeclaredMethod("main", argTypes);
                   // String[] mainArgs = Arrays.copyOfRange(args, 1, args.length); //JDK 6
                   //jdk <6
                   String[] mainArgs = new String[args.length - 1];
                   for (int i = 0; i < mainArgs.length; i++) {
                        mainArgs[i] = args[i + 1];
                   main.invoke(null, (Object) mainArgs);
                   // production code should handle these exceptions more gracefully
              } catch (ClassNotFoundException x) {
                   x.printStackTrace();
              } catch (NoSuchMethodException x) {
                   x.printStackTrace();
              } catch (IllegalAccessException x) {
                   x.printStackTrace();
              } catch (InvocationTargetException x) {
                   x.printStackTrace();
              } catch (Exception e) {
                   e.printStackTrace();
    2 - create a .bat file:
    @echo off
    java -cp C:\Downloads\Marcxml\marc4j.jar; C:\Downloads\Marcxml\marcxml.jar; Executer %TARGET_CLASS% %IN_FILE% %OUT_FILE%3 - use set command to pass variable:
    Open MS-DOS, and type the following:
    set TARGET_CLASS=MyTargetClass
    set IN_FILE=in.txt
    set OUT_FILE=out.txt
    Then run your .bat file (in the same ms dos window)
    Hope that Helps

  • How to write sql command in batch file

    hi,
    i m using oracle 9i on windows. i want to know how can i write sql command on batch file. i want to use a batch file to use sql command like shutdowm & startup command and any select command too.
    so plz tell how can i do it ?
    thxs

    superdba wrote:
    thxs u all , i got it at i wanted to do.
    thaks u all for yr precious time.
    thxsYou've 67 questions with 63 UNanswered. Please mark this question as "answered" and give points to the users whose answer you accept as "helpful" or "correct"
    Kamran Agayev A. (10g OCP)
    http://kamranagayev.wordpress.com
    [Step by Step install Oracle on Linux and Automate the installation using Shell Script |http://kamranagayev.wordpress.com/2009/05/01/step-by-step-installing-oracle-database-10g-release-2-on-linux-centos-and-automate-the-installation-using-linux-shell-script/]

  • How to capture Java Exceptions in batch file

    I have a batch file that calls java class. When the java class throws exception, how do I capture the exception as an error message in batch file.
    This is the java program
    import java.io.*;
    public class Test{
           public static void main(String []args) {
         String wantThisToFail=null;
              try {
                   if (wantThisToFail.equals("SomeString") ) {
                        System.out.println("Testing");     
              }catch (Exception e){
                   System.out.println("Exception " + e);
    This is the batch file
    @echo off
    echo Testing
    REM execute the java class
    java Test
    set deployError=%ERRORLEVEL%
    echo %deployError%
    IF NOT %deployError% == 0 (
    echo failed
    )else (
    echo succeeded
    )Since the java class throws NullPointerException, i want the batch file to show "Failed" Message.
    Please Help!!

    Try capturing the return value of the command "java Test". If it succeeds, you should get a '0', otherwise you'll get something else. I admit it's been years since I had to do that, but it rings a bell. If it works, and you're on Java 5 or later, you can use the method Thread.setDefaultUncaughtExeptionHandler ( look at the docs ) and from there use System.exit(<your integer value return code here>) for more control over the return value

  • How to include commandline options in Batch File

    Hi i have following code for batch file now i want to include one more optionas -savemndl
    command is
    loader.bat -savemndl (savedmndl file) (inputmndl file) (output Logfile)
    @echo off
    set JAVAOPTS= -Xms20m -Xmx500m %JAVAOPT%
    set FILE=
    set OPTIONS=
    :loop
      if "%1" == ""             goto break
      if "%1" == "-v"           goto setOptions
      if "%1" == "-print_mndl"  goto setOptions
      if "%1" == "-verbose"     goto setOptions
      if "%1" == "-seed"        goto setJavaOpt
      if "%1" == "-help"        goto help
      goto break
    :setOptions
      set OPTIONS=%OPTIONS% %1
      shift
      goto loop
    :setJavaOpt
      shift
      set JAVAOPTS=%JAVAOPTS% -Drandom.seed=%1
      shift
      goto loop
    :break
    if not exist "%1" goto notFound
    native2ascii %1 > %1.tmp
    set FILE=%1.tmp
    shift
    java %JAVAOPTS% -classpath classes;lib\simcore.jar;lib\loader.jar jp.go.nict.msf.loader.MNDLParser %OPTIONS%  %FILE% %1
    del %FILE%
    goto end
    :help
    echo usage: loader -help
    echo usage: loader [-v] [-seed value] [-print_mndl] filename.mndl [traceLogFile]
    java -classpath classes;lib\simcore.jar;lib\loader.jar jp.go.nict.msf.loader.MNDLParser -help
    goto end
    :notFound
    echo loader: Error "%1" is not found.
    echo usage: loader -help
    echo usage: loader [-v] [-seed value] [-print_mndl] filename.mndl [traceLogFile]
    :end

    And what is the actual quesion then? Because the batch file given above is itself a good example how to use parameters.
    Mike

  • Please help how to run System commands and batch files thru java program

    Sir,
    I want execute OS commands like dir,cls..etc and batch files,.exe filesthru java program.
    I have tried it sofar thru Runtime.getRuntime().exec("execute.bat");
    but it is not working.anybody knows about how to run the system commands thru java please give me the code.
    thank you,
    regards,
    j.mouli

    I've seen other posts with this questions, and answers. Unfortunately I didn't pay much attention. But the basic idea is to exec command.com and pass the specifc batch or command as an argument.

  • How to check a checkbox

    Hello,
    I am using the interapplication communication API classes from my c# program. I read an  previously generated xml and write the data to the live cylce pdf form
    I use the below classes and use the IField.value( myField.Value = xmlcolValue;) to write to the form. It works fine for all the text boxes, But is not writting/selecteing/checking  the checkboxes.
    I have tried using the IFeild.setExportValues(..) but it gives me an error "Security setting prevent me from doing that".Could you please let me know how to solve this issue?
    CAcroAVDoc  
    Thank you
    IAFormApp  IFields   IField

    Hello,
    Still searching for the same issue. Does anyone have a solution/fix for this?
    Thanks

  • How to check whether checkbox is checked or not and to get label if checked

    Hi,
    I've used checkboxgroup, and i'm populating it dynamically using attribute node & attribute value.. like this
    IPrivateTestView.IWelcomNode wNode =wdContext.nodeWelcom();
         IPrivateTestView.IWelcomElement wEl,wE2,wE3;
         wEl=wNode.createWelcomElement();
         wNode.addElement(wEl);
         wEl.setWelValue("Welcome Boards");
         wE2=wNode.createWelcomElement();
         wNode.addElement(wE2);
         wE2.setWelValue("Traditional Welcome");
         wE3=wNode.createWelcomElement();
         wNode.addElement(wE3);
         wE3.setWelValue("Photograph");
    now i want to check whether checkbox is checked and how many checkbox has been checked and then i want that label values of checked boxes.. so pls help me out. if possible give me some sample coding...

    CheckBoxGroup.texts -> Welcom.WelValue
    In controller method (e.g. action handler):
    IWelcomNode node = wdContext.nodeWelcom();
    for (int i = 0; i < node.size(); ++i)
      IWelcomElement e = node.getWelcomElementAt(i);
      if (node.isMultiSelected(i))
        String text = e.getWelValue();
        /* checkbox #i is selected and variable "text" contains the text */
    Armin

  • How to check the checkbox of Adobe Installer with the Aplescript??

    Hi All,
    am trying to Install Adobe Flash Player thru stand alone Installer, I want to check the check box and need to click on Install button,
    Whem am trying to get the entire contents of window thru UIElementInspector, am unable to get the contents of checkbox and Install buttons..
    I just tried myself with the below script to click the checkbox, but did not succeed, error saying unable to get the checkbox.. Pls suggest how to check..
    tell application "System Events"
        tell process "Adobe Flash Player Install Manager"
            set frontmost to true
            click the checkbox "I have read and agree to the terms of the Flash Player License Agreement" of window "Adobe Flash Player 11.5 Installer."
        end tell
    end tell
    Pls check the below link to view the image of the Adobe Flash Player Installer.
    https://docs.google.com/document/d/1yzyBTrvi94QxjlEAlcbudOBpXiTGPEI2LA3D1iEo8Gw/ edit

    I'm working on a similar script, but when I execute the script, I run into this error:
    error "System Events got an error: Can’t make {563, 234} into type list." number -1700 from {563, 234} to list
    Any ideas? Here's the background: I'm trying to click the search box on this page: http://www.alexa.com/siteinfo/payeasenet.com
    Here's my UI Inspector results of said element:
    <AXGroup>
         <AXScrollArea: “”>
          <AXWebArea: “”>
           <AXGroup: “”>
            <AXGroup: “”>
             <AXTextField: “Enter a search query”>
    Attributes:
       AXRole:  “AXTextField”
       AXSubrole:  “AXSearchField”
       AXRoleDescription:  “search text field”
       AXChildren:  “<array of size 0>”
       AXHelp:  “”
       AXParent:  “<AXGroup: “”>”
       AXPosition:  “x=550 y=212”
       AXSize:  “w=214 h=30”
       AXTitle:  “Enter a search query”
       AXDescription:  “”
       AXValue (W):  “”
       AXFocused (W):  “1”
       AXEnabled:  “1”
       AXWindow:  “<AXWindow: “Payeasenet.com Site Info”>”
       AXSelectedTextMarkerRange (W):  “(null)”
       AXStartTextMarker:  “<AXTextMarker 0x60800024af80 [0x7fff758b4eb0]>{length = 24, bytes = 0xbd040000000000006024c514010000000000000001000000}”
       AXEndTextMarker:  “<AXTextMarker 0x600000248a30 [0x7fff758b4eb0]>{length = 24, bytes = 0xbf0400000000000040420c17010000000100000001000000}”
       AXVisited:  “0”
       AXLinkedUIElements:  “(null)”
       AXSelected:  “0”
       AXBlockQuoteLevel:  “0”
       AXTopLevelUIElement:  “<AXWindow: “Payeasenet.com Site Info”>”
       AXNumberOfCharacters:  “0”
       AXSelectedText (W):  “”
       AXSelectedTextRange (W):  “pos=0 len=0”
       AXVisibleCharacterRange (W):  “pos=0 len=0”
       AXInsertionPointLineNumber:  “0”
       AXTitleUIElement:  “(null)”
       AXAccessKey:  “(null)”
       AXRequired:  “0”
       AXInvalid:  “false”
       AXPlaceholderValue:  “”
       AXARIABusy:  “0”
    Actions:
       AXPress - press
       AXShowMenu - show menu
       AXScrollToVisible - AXScrollToVisible

  • How to check the contents of Control file, Log file & Parameter file

    Can anybody help me how i can check the contents of Control file, Log file & Parameter file.
    Arif

    OK ...
    Parameter file:
    It will normally be in the $ORACLE_HOME/dbs directopry. It could be aan init{sid}.ora or a spfile{sid}.ora ... do not edit an SPFILE as yu could corrupt it.
    http://download-east.oracle.com/docs/cd/B19306_01/server.102/b14231/create.htm#sthref434
    If it's an init{sid}.ora, use any editor to see the actual content.
    If it's a spfile{sid}.ora, use one of V$PARAMETER, V$PARAMETER2, V$SYSTEM_PARAMETER, V$SYSTEM_PARAMETER2 as aappropriate (read the Reference manual to get an idea about when each is appropriate)
    Control File:
    You should not edit a control file. It consists of many areas, as described here http://download-east.oracle.com/docs/cd/B19306_01/server.102/b14220/physical.htm#i10135 and each are is interrogated by V$views as given in the reference manual. The following V$views all deal with some aspect of the control file or provide info about the control files or the contents of control files:
    V$ARCHIVE_DEST
    V$ARCHIVED_LOG
    V$BACKUP_ARCHIVELOG_DETAILS
    V$BACKUP_CONTROLFILE_DETAILS
    V$BACKUP_CONTROLFILE_SUMMARY
    V$BACKUP_COPY_DETAILS
    V$BACKUP_COPY_SUMMARY
    V$BACKUP_CORRUPTION
    V$BACKUP_DATAFILE
    V$BACKUP_DATAFILE_DETAILS
    V$BACKUP_FILES
    V$BACKUP_PIECE
    V$BACKUP_REDOLOG
    V$BACKUP_SET
    V$BACKUP_SET_DETAILS
    V$BACKUP_SPFILE
    V$CONTROLFILE
    V$CONTROLFILE_RECORD_SECTION
    V$COPY_CORRUPTION
    V$DATABASE
    V$DATABASE_INCARNATION
    V$DATAFILE
    V$DATAFILE_COPY
    V$DATAFILE_HEADER
    V$DELETED_OBJECT
    V$LOCK
    V$LOG
    V$LOG_HISTORY
    V$LOGHIST
    V$OBSOLETE_BACKUP_FILES
    V$OFFLINE_RANGE
    V$PROXY_COPY_DETAILS
    V$PROXY_COPY_SUMMARY
    V$PROXY_DATAFILE
    V$RMAN_BACKUP_JOB_DETAILS
    V$RMAN_BACKUP_SUBJOB_DETAILS
    V$RMAN_CONFIGURATION
    V$SESSION
    V$TABLESPACE
    V$THREAD
    V$UNUSABLE_BACKUPFILE_DETAILS
    3) Log Files
    The contents of the log files are viewed using LogMiner - read Chapter 11 of the Oracle Utilities manual

  • How to creating concurrent call in batch file

    Hallo,
    I want to write a batch file under windows to call 6 instances concurrently to test whether the program is thread-safe. Below is the shell script for linux to create parallel call, it works. But if I use the same syntax, i.e. "&" to connect "java" call in batch file under windows, it only creates serial call, not concurrent call.
    How can I write a windows script or a batch file under windows to build parallel call.
    Best Regards
    saarxfk
    parallelCall.sh
    # set the classpath
    export CLASSPATH=
    for i in jars/*jar; do export CLASSPATH=$CLASSPATH:$i; done
    java WinsServiceClient morganti.pdf morganti.pdf it &
    java WinsServiceClient alesi.pdf alesi.pdf it &
    java WinsServiceClient morganti2.pdf morganti2.pdf it &
    java WinsServiceClient alesi2.pdf alesi2.pdf it &
    java WinsServiceClient morganti3.pdf morganti3.pdf it &
    java WinsServiceClient alesi3.pdf alesi3.pdf it
    ------------------------------------------------------------------------------------------------

    Hallo,
    I want to write a batch file under windows to call 6
    instances concurrently to test whether the program is
    thread-safe. Below is the shell script for linux to
    create parallel call, it works. But if I use the same
    syntax, i.e. "&" to connect "java" call in batch
    file under windows, it only creates serial call, not
    concurrent call.
    How can I write a windows script or a batch file
    under windows to build parallel call.
    You can't do that in windows from one shell. Open 6 shells and do it manually

  • HOW TO CHECK THE CHECKBOX VALUE WITH SQLCE DATABASE

    Hai All,
       Good Day! I am using VB in Visual Studio 2008. I have a form with check boxes and one button control. If i selected the check box and then click the button, check the database table field and check box text are equal. if both are equal then
    how to check?
     I have tried it. The code is:
    Public Class Form1
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    Dim conn As New SqlCeConnection
    Dim cmd As New SqlCeCommand
    conn.ConnectionString = "DataSource = E:\Vbprojectex\WindowsApplication3\WindowsApplication3\Database1.sdf"
    Try
    cmd.Connection = conn
    conn.Open()
    If CheckBox1.CheckState = 1 Then
    cmd.CommandText = "SELECT Aerator FROM ttabpagelist where Aerator = CheckBox1.Text"
    TextBox1.Text = 1
    End If
    cmd.ExecuteNonQuery()
    Finally
    conn.Close()
    End Try
    End Sub
    End Class
    Thanks & Regards Sasi ................. Go Green

    probably something like (ofc below will never give result since Aerator can't have 2 values, you will have to adjust the second check box column obviously)
    Try
    cmd.Connection = conn
    conn.Open()
    dim strsql as string = "= "SELECT Aerator FROM ttabpagelist "
    Dim whereConcatenator As String = " WHERE "
    Dim Wherestatement As String = String.Empty
    If checkbox1.checked = True Then
    Wherestatement += whereConcatenator
    Wherestatement += "Aerator = " & checkbox1.Text
    whereConcatenator = " AND "
    End If
    If checkbox2.checked = True Then
    Wherestatement += whereConcatenator
    Wherestatement += "Aerator = " & checkbox2.Text
    End If
    cmd.commandtext = strsql & wherestatement
    TextBox1.Text = 1
    End If
    cmd.ExecuteNonQuery()
    Finally
    conn.Close()
    End Try

  • How to call/Execute a dos batch file via LAN

    Hello,
    Can i execute remotely dos batch files?
    I have to execute bat file via LAN ex
    IP\dir\batfile.bat from abap code, is that possible?
    thanks in advance,
    Michal

    Hi,
    Use CL_GUI_FRONTEND_SERVICES=>EXECUTE method to run any application in your case batch file..
    The batch file you are trying to run should be accessible on presentation system i.e. user's machine.
    Regards,
    Vishal

Maybe you are looking for

  • Using " " and " " to compare enum's ordinals ?

    heya, I'm just wondering if it's possible to use the "<" and ">" operators with enum types in Java 1.5, in order to compare ordinal values. Basically, I'm thinking of using this for security levels, as in: public enum SecurityLevel { admin, manager,

  • How can I put a background image into the cell of a table using Dreamweaver CC.

    I want to place an image in a table cell and then be able to place editable HTML in the same cell on top of image. I also have Dreamweaver CS6. I can't get either one to do it using solution I found searching on web. Please help ASAP. What am I doing

  • System Copy from 32 bit to 64 bit

    hi, I have a AS-JAVA System in NW2004s running in 32 bit. Since the current machine is very slow and we could not upgrade it , I am planning to make a system copy of this system to 64 bit Please let me know whether that is possible in SAP. Is there a

  • Is it possible..another RAM question

    I was at OWC site and wanted to upgrade my RAM for my iMac 24" (2007 model). I initially thought that my iMac (2007 iMac 7,1) maximum RAM was 4GB. However, to my surprise, OWC listed as 6GB as max. Curious, I went to my local Fry's electronic and pic

  • How to populate page parameter when 600 entities

    I cant really use omniportlet to populate a page paremeter when I have 600 different physicians. All 600 show up when I try to use OmniPortlet. Using Customization is not acceptable to our company. Can anybody help me populate my page parameter progr