Scripts Parameters

Hello everyone,
I've created a file named grant.sql (on oracle 9i)which contains following query:
grant all on &table to ms23 with grant option;
The problem is after providing input for first time, it doesn't ask for the same in subsequently executions.
can somebody tell me what the problem is ... ???

Not sure why you want to do it. There could be a whole bunch of other solutions, once we know what the problem (business case) ist.
Also you can consider the follwoing approach
grant all on &1 to ms23 with grant option;
then call the script with
@yourScript TableName
@yourScript TableName2
@yourScript TableName3
@yourScript TableName4
@yourScript TableName5

Similar Messages

  • Writing Unicode characters to scripting parameters on Windows

    I am trying to read/write a file path that supports Unicode characters to/from scripting parameters (PIDescriptorParameters) with an Export plug-in. This works fine on OS X by using AliasHandle together with the "typeAlias" resource type in the "aete" section of the plugin resource file.
    On Windows I am having trouble to make Photoshop correctly display paths with Unicode characters. I have tried:
    - Writing null-terminated char* (Windows-1252) in a "typePath" parameter -- this works but obviously does not support Unicode.
    - Writing null-terminated wchar* (UTF-16) in a "typePath" parameter -- this causes the saved path in the Action palette to be truncated to the first character, caused by null bytes in UTF-16. It appears PS does not understand UTF-16 in this case?
    - Creating an alias record with sPSAlias->WinNewAliasFromWidePath and storing in a "typePath" or "typeAlias" parameter -- this causes the Action palette to show "txtu&", which does not make sense to me at all.
    The question is: what is the correct scripting parameter resource type (typePath, typeAlias, ... ?) for file paths on Windows, and how do I write to it in such way that Photoshop will correctly display Unicode characters in the Actions palette?

    Hi
    Skip the first (4 or 6 characters) and you'll get the Unicode value.
    regards
    Bartek

  • How to add batch server group in script parameters

    Hi All,
    Is there any way to incorporate the "background server groups" directly in the script parameters in REDWOOD? There is an option to provide the target server in parameter TARGET_SERVER. But its not working if i maintain a server group. Any help will be appreciated.
    Thanks
    Arun Raghavan

    Hi Blom,
    Thanks for the reply. I am not able to find any parameter with the name TARGET_GROUP. Can I add this explicitly as a new parameter? But i am not sure how it will correlate to the batch server group in SAP. I also tried to import a job with target group defined. But the imported copy doesn't contain any values for it.

  • Read Scripting Parameters within a Filter

    Hello,
    I'd like to have a Plug In which can read Scripting Parameters and run accordignly.
    One of the code samples in the SDK is called "PoorMansTypeTool".
    In its documentation it is said to be able to "Read scripting parameters".
    I look into its code yet I couldn't figure how it does it.
    Let's say I have a script with a variable 'a'.
    The script launches a filter from the filter lists and want to pass the valu of the parameter 'a' to the filter.
    How could that be done?
    Are there any constraints on the parameter type, size, etc?
    Has anyone tried it before?
    If someone could guide me through the plug in code I'd be happy.
    Thank You.

    // make this a function so we can hide these from harness script
    main();
    function main() {
    // Save the current preferences
    var startRulerUnits = preferences.rulerUnits;
    var startTypeUnits = preferences.typeUnits;
    var startDisplayDialogs = displayDialogs;
    // Set Photoshop to use pixels and display no dialogs
    preferences.rulerUnits = Units.PIXELS;
    preferences.typeUnits = TypeUnits.PIXELS;
    displayDialogs = DialogModes.NO;
    // make this stuff controlled by the harness
    var maxTime = 1 * 60;
    var iterations = 5;
    var percIncrease = 20;
    var timeIt = new Timer();
    var tests = 0;
    var errors = 0;
    var eArray = new Array();
    var dissolveLog = new File( "~/Desktop/Dissolve.log" );
    dissolveLog.open( "w", "TEXT", "????" );
    dissolveLog.writeln( "width,\theight,\tdepth,\tpercent,\tdoc create time,\tdissolve time" );
    var maxWidth = 30000;
    var minWidth = 256;
    var incWidth = parseInt( (maxWidth - minWidth) / iterations );
    if ( incWidth == 0 )
              incWidth = 1;
    var maxHeight = 30000;
    var minHeight = 256;
    var incHeight = parseInt( (maxHeight - minHeight) / iterations );
    if ( incHeight == 0 )
              incHeight = 1;
    // start clean
    while (documents.length) {
        activeDocument.close(SaveOptions.DONOTSAVECHANGES);
    var d = BitsPerChannelType.EIGHT;
    for ( var w = minWidth; w < maxWidth; w += incWidth ) {
              for ( var h = minHeight; h < maxHeight; h += incHeight ) {
                        try {
                                  var timeImport = new Timer();
                                  if ( d == BitsPerChannelType.EIGHT )
                                            d = BitsPerChannelType.SIXTEEN;
                                  else
                                            d = BitsPerChannelType.EIGHT;
                                  app.documents.add(UnitValue(w, "px"), UnitValue(h,"px"), undefined, "Dissolve Test", undefined, undefined, undefined, d);
                 timeImport.stop();
                                  if ( activeDocument.width != w )
                    error++; // alert( activeDocument.width + ", " + w );
                                  if ( activeDocument.height != h )
                    error++; // alert( activeDocument.height + ", " + h );
                                  if ( d == 16 && activeDocument.bitsPerChannel != BitsPerChannelType.SIXTEEN )
                    error++; // alert( activeDocument.bitsPerChannel + ", " + d );
                                  if ( d == 8 && activeDocument.bitsPerChannel != BitsPerChannelType.EIGHT )
                    error++; // alert( activeDocument.bitsPerChannel + ", " + d );
                                  if ( activeDocument.bitsPerChannel == BitsPerChannelType.ONE )
                    error++; // alert( activeDocument.bitsPerChannel + ", " + d );
                 FitOnScreen(); // this makes everything really slow
                                  var historyState = activeDocument.activeHistoryState;
                                  for ( var dPerc = 0; dPerc <= 100; dPerc += percIncrease ) {
                                            tests++;
                                            var timeDissolve = new Timer();
                                            Dissolve(dPerc);
                                            timeDissolve.stop();
                                            // WaitForRedraw(); // guess what this does to our slowness ness er
                                            dissolveLog.write(w + ",\t" + h + ",\t" + d + ", " + dPerc );
                                            dissolveLog.writeln(",\t" + timeImport.getTime() + ", " + timeDissolve.getTime() );
                     WaitForRedraw();
                                            activeDocument.activeHistoryState = historyState;
                    if ( timeIt.getElapsed() > maxTime ) {
                        w = maxWidth + 1;
                        h = maxHeight + 1;
                        dPerc = 101;
                        catch(e) {
                            alert(e + ":" + e.line);
                                  if ( e.message.search(/cancel/i) != -1 ) {
                                            w = maxWidth + 1;
                                            h = maxHeight + 1;
                                  eArray[eArray.length] = e;
                                  errors++;
                                  // debugger;
                        } // end catch
              } // end for height
    } // end for width
    dissolveLog.writeln( errors + " errors. " + tests + " tests in " + timeIt.getElapsed() + " seconds. " + tests/timeIt.getElapsed() + " tests/sec.");
    dissolveLog.close();
    dissolveLog.execute();
    // end clean
    while (documents.length) {
        activeDocument.close(SaveOptions.DONOTSAVECHANGES);
    // Reset the application preferences
    preferences.rulerUnits = startRulerUnits;
    preferences.typeUnits = startTypeUnits;
    displayDialogs = startDisplayDialogs;
    //     1) " FAIL" for failures
    //     2) " PASS" for test results OK
    //     3) "  BUG" for known bugs, have the file name give the bug number
    //     4) "ERROR" this comes from the harness if the script barfed/exception,
    return errors == 0 ? ' PASS' : ' FAIL';
    } // end function main
      Function WaitForRedraw
      Usage: Use it to force Photoshop to redraw the screen before continuing
      Example:
           WaitForRedraw();
    function WaitForRedraw() {
              var keyID = charIDToTypeID( "Stte" );
              var desc = new ActionDescriptor();
              desc.putEnumerated( keyID, keyID, charIDToTypeID( "RdCm" ) );
              executeAction( charIDToTypeID( "Wait" ), desc, DialogModes.NO );
    // WaitNSeconds, slow the script down so you can watch and figure out issues
    function WaitNSeconds(seconds) {
       startDate = new Date();
       endDate = new Date();
       while ((endDate.getTime() - startDate.getTime()) < (1000 * seconds))
                        endDate = new Date();
    // FitOnScreen, fits the document and redraws the screen
    function FitOnScreen() {
              var id45 = charIDToTypeID( "slct" );
        var desc7 = new ActionDescriptor();
        var id46 = charIDToTypeID( "null" );
              var ref1 = new ActionReference();
              var id47 = charIDToTypeID( "Mn  " );
              var id48 = charIDToTypeID( "MnIt" );
              var id49 = charIDToTypeID( "FtOn" );
              ref1.putEnumerated( id47, id48, id49 );
              desc7.putReference( id46, ref1 );
              executeAction( id45, desc7, DialogModes.NO );
    // Dissolve, given a percentage
    function Dissolve( dPercent ) {
              var id18 = stringIDToTypeID( "d9543b0c-3c91-11d4-97bc-00b0d0204936" );
        var desc3 = new ActionDescriptor();
        var id19 = charIDToTypeID( "Amnt" );
        var id20 = charIDToTypeID( "#Prc" );
        desc3.putUnitDouble( id19, id20, dPercent );
        var id21 = charIDToTypeID( "disP" );
        var id22 = charIDToTypeID( "mooD" );
        var id23 = charIDToTypeID( "moD1" );
        desc3.putEnumerated( id21, id22, id23 );
              executeAction( id18, desc3, DialogModes.NO );
    // DissolveOld, our old scripting params was this
    // an interesting test would be to see the old plug-in vs the current one
    function DissolveOld( dPercent ) {
        var id12 = charIDToTypeID( "disS" );
        var desc3 = new ActionDescriptor();
        var id13 = charIDToTypeID( "Amnt" );
        var id14 = charIDToTypeID( "#Prc" );
        desc3.putUnitDouble( id13, id14, dPercent );
        var id15 = charIDToTypeID( "disP" );
        var id16 = charIDToTypeID( "mooD" );
        var id17 = charIDToTypeID( "moD1" );
        desc3.putEnumerated( id15, id16, id17 );
        executeAction( id12, desc3, DialogModes.NO );
    // Library for timing things in JavaScript
    function Timer() {
              // member variables
              this.startTime = new Date();
              this.endTime = new Date();
              // member functions
              // reset the start time to now
              this.start = function () { this.startTime = new Date(); }
              // reset the end time to now
              this.stop = function () { this.endTime = new Date(); }
              // get the difference in milliseconds between start and stop
              this.getTime = function () { return (this.endTime.getTime() - this.startTime.getTime()) / 1000; }
              // get the current elapsed time from start to now, this sets the endTime
              this.getElapsed = function () { this.endTime = new Date(); return this.getTime(); }
    // end Dissolve.jsx

  • EventOpen action play results in error when adding scripting parameters

    Hi all,
    I have a setup that involves two plugins:
    A file format plugin which I've made scripting-aware and takes one parameter and,
    An automation plugin that opens a number of files of this format and which passes the parameter to the first plugin.
    For achieving this, I am playing eventOpen via the Action Control Suite, and using the code the Listener plugin from the SDK generates:
    SPErr PlayeventOpen(/*your parameters go here*/void)
         PIActionDescriptor result = NULL;
         DescriptorTypeID runtimeKeyID;
         DescriptorTypeID runtimeTypeID;
         DescriptorTypeID runtimeObjID;
         DescriptorTypeID runtimeEnumID;
         DescriptorTypeID runtimeClassID;
         DescriptorTypeID runtimePropID;
         DescriptorTypeID runtimeUnitID;
         SPErr error = kSPNoError;
         // Move this to the top of the routine!
         PIActionDescriptor desc0000000000000570 = NULL;
         error = sPSActionDescriptor->Make(&desc0000000000000570);
         if (error) goto returnError;
         // Move this to the top of the routine!
         Handle aliasValue = NULL;
         FullPathToAlias("C:\dev\data\test.dat", aliasValue);
         error = sPSActionDescriptor->PutAlias(desc0000000000000570, keyNull, aliasValue);
         if (error) goto returnError;
              // Move this to the top of the routine!
              PIActionDescriptor desc0000000000000578 = NULL;
              error = sPSActionDescriptor->Make(&desc0000000000000578);
              if (error) goto returnError;
              error = sPSActionDescriptor->PutFloat(desc0000000000000578, keyGamma, 2.2);
              if (error) goto returnError;
         error = sPSActionDescriptor->PutObject(desc0000000000000570, keyAs, 'tdfP', desc0000000000000578);
         if (error) goto returnError;
         error = sPSActionControl->Play(&result, eventOpen, desc0000000000000570, plugInDialogSilent);
         if (error) goto returnError;
    returnError:
         if (result != NULL) sPSActionDescriptor->Free(result);
         if (desc0000000000000570 != NULL) sPSActionDescriptor->Free(desc0000000000000570);
         if (aliasValue != NULL) sPSHandle->Dispose(aliasValue);
         if (desc0000000000000578 != NULL) sPSActionDescriptor->Free(desc0000000000000578);
         return error;
    By using this code, the call in line 47 returns an error code -25923 and the error string contains "The parameters for command “Open” are not currently valid.".
    These are some of the things I've tried already:
    Escaping the file path backslashes does not seem to help although it seems necessary.
    Playing the event with no parameter (remove lines 27:36) does work.
    Playing the event thought the Actions tab results in a dialog for browsing a file being open and no parameters are passed to my plugin.
    Changing plugInDialogSilent to plugInDialogDontDisplay in line 43 causes the same effect as the previous point.
    The plugin writes correctly the parameter into the scripting plugin (when provided via its UI) but it seems that somehow it is not able to retrieve it correctly when passed via the host application.
    In case it helps, this is the relevant part of my PiPL resources file:
    resource 'aete' (ResourceID, plugInName " dictionary", purgeable)
      1, 0, english, roman, /* aete version and language specifiers */
           vendorName, /* vendor suite name */
           "", /* optional description */
           plugInSuiteID, /* suite ID */
           1, /* suite code, must be 1 */
           1, /* suite level, must be 1 */
           {}, /* structure for filters */
           {      /* non-filter plug-in class here */
                plugInName,     /* unique class name */
                plugInClassID, /* class ID, must be unique or Suite ID */
                plugInAETEComment, /* optional description */
                {      /* define inheritance */
                     "<Inheritance>", /* must be exactly this */
                     keyInherits, /* must be keyInherits */
                     classFormat, /* parent: Format, Import, Export */
                     "parent class format", /* optional description */
                     flagsSingleProperty, /* if properties, list below */
                    "gamma",
                     keyGamma,
                     typeFloat,
                     "Source data gamma",
                     flagsSingleProperty
                     /* no properties */
                {}, /* elements (not supported) */
                /* class descriptions */
           {}, /* comparison ops (not supported) */
           {} /* any enumerations */
    I'll appreciate any help
    Thanks.

    Hi,
    If anyone come across this issue in the future, I've manged to get it working with what it seems to be a workaround by using the plugin runtime descriptor, replacing line 39 with the following code:
    error = sPSActionDescriptor->StringIDToTypeID("Test Data Plug-In", &runtimeObjOD));
    if (error) goto returnError;
    error = sPSActionDescriptor->PutObject(desc0000000000000570, keyAs, runtimeObjID, desc0000000000000578); 
    I'm not sure if anyone from the dev team can help clarify what's going on here, but seems to be either a bug in the Action Control Suite or the Listener plugin from the SDK not generating the correct output.
    Thanks.

  • Error trap on extraneous script parameters

    I have a script that accepts named parameters at the command line, and I would like to error trap any extraneous parameters, rather than having a malformed shortcut cause an error. I tried just wrapping the Param section at the top of the script in a Try/Catch
    but that doesn't work at all. Is there any mechanism to address this more gracefully, or do i just need to document proper argument syntax and let users see the error if they mess it up?
    Note, I used Try/Catch with and without cmdletbinding, and with camdletbinding in and out of the Try. Some variations caused errors, and some caused all parameters to be ignored, even the ones that where correctly being passed.
    Gordon

    So, basically what I want to do is have two named parameters, one required and one optional, and then catch the error when someone includes a third, or gets a name wrong. It seems like there is no way to catch that, you are just going to get a standard
    PowerShell error. Not the end of the world, but like not being able to natively run a powershell script with no console at all, a little annoying, if in fact it can't be done.
    It sounds like this is what you want (as far as the 1 mandatory and 1 option params go):
    Function Test {
    [cmdletbinding()]
    Param (
    [parameter(Mandatory=$True)]
    [string]$Param1,
    [parameter()]
    [string]$Param1
    #CODE HERE
    Unfortunately, you will not be able to get around the issue of someone attempting to use a 3rd parameter and having an error thrown. This will happen at runtime and can't be caught.
    Boe Prox
    Blog |
    Twitter
    PoshWSUS |
    PoshPAIG | PoshChat |
    PoshEventUI
    PowerShell Deep Dives Book

  • Script parameters

    I have some scripts in the repository that I'm trying to use to build an applications data from. Some include parameters in the where clause of the insert statements such as:
    d.date_due_at_dock_rev >= to_date(:P1_START_DATE,'DD-MON-YY') and
    I keep getting ORA-00904 and ORA-00911 errors when I set the parameters on the parameter page when I try to run them.
    I've checked the manual (chapt 5) and tried using &P1_START_DATE and also #P1_START_DATE# with no luck.
    What is the correct syntax for this???
    Greg

    >
    Ok..
    But , is there another way to send a script to
    DataBase ? Maybe another class that provide to set
    parameter value by name.I'm almost certain there's not in the core API. You might find something from a 3rd party if you're good with google.
    But what are you really trying to do? Why do you need to do it by name?
    Depending on your ultimate goal, you might want to look at an object-relational bridge tool such as [url http://www.hibernate.org]Hibernate.

  • Cube script parameters

    Hello!
    Finally we are starting our huge migration project from 10.2.0.4 to 11.2.0.3. Now we are doing study what to change in our OLAP build scripts. Originally we use DML and now would like to build cubes using "proper" way. My question concerns clearing of variables. Are there any way to setup a parameter for dimension status for clear step in cube script?
    Let's say I would like to define before execution the day I would like to clear from sales cube. How should I accomplish this without DML programming?
    Thanks in advance!
    Regards,
    Kirill

    Kirill,
    Since you are moving from 10golap to 11golap, few points to keep in mind (for you and for others on this forum):
    (1). Convert AW's calc measures logic from olap dml to new OLAP EXPRESSION syntax. http://docs.oracle.com/cd/E11882_01/olap.112/e23381/toc.htm
    (2). If there is any olap dml program to populate an attribute, move that logic to relational side (i.e., in your dimension source view)
    (3). Try to understand, how XML can be used to manage the AW and its objects. There are lot of posts by David Greenfield on this forum.
    (4). Its very important to understand DBMS_CUBE package. Try to understand all its details, since you will use this a lot. http://docs.oracle.com/cd/E11882_01/appdev.112/e16760/d_cube.htm
    (5). It is also important to use as little olap dml as possible, even for calc measures. Use this forum for any help you need with that. There should be only few cases now, where olap dml is necessary. Use the standard cube-aware olap dml statements: http://docs.oracle.com/cd/E11882_01/olap.112/e17122/dml_basics.htm#BABFDBDJ
    (6). Logging is much extensive now. So if you have any code that relied on olapsys.XML_LOAD_LOG that need to be changed also.
    http://docs.oracle.com/cd/E11882_01/appdev.112/e16760/d_cube_log.htm#ARPLS72789
    (7). Use compressed cubes now. See David's post about how much to precompute: Question on cube build / query performance (11.2.0.3)
    (8). If you have a RAC environment, then look at this new functionality where you can Pin dbms_cube.build parallel jobs to specific node on RAC Pin dbms_cube.build parallel jobs to specific node on RAC
    (9). For any write-back to cube, see if you can use this tip: http://oracleolap.blogspot.com/2010/10/cell-level-write-back-via-plsql.html
    (10). If you had any custom work done to improve looping during queries, then keep in mind that it is provided out-of-the-box now by properties like: $LOOP_VAR and $LOOP_DENSE
    http://docs.oracle.com/cd/E11882_01/olap.112/e17122/dml_properties013.htm
    http://docs.oracle.com/cd/E11882_01/olap.112/e17122/dml_properties014.htm
    (11). Better features for handling security through AWM. http://docs.oracle.com/cd/E11882_01/olap.112/e17123/security.htm
    (12). Cube Materialized Views features also available. You may or may not need it.
    http://docs.oracle.com/cd/E11882_01/olap.112/e17123/admin.htm#CHDBCEGB
    (13). OLAP_TABLE function is still fully supported. OBIEE 11.1.1.5 uses OLAP_TABLE to generate queries. So if you like you can continue using OLAP_TABLE, or you can look at the new CUBE_TABLE function: http://docs.oracle.com/cd/E11882_01/server.112/e17118/functions042.htm
    And finally... Go through all David Greenfield's posts. You will find lot of good ideas on how to do things differently in 11gOLAP.
    .

  • Need to Understand 2 Scripting parameters

    Hi, 
    Can someone tell me what this is doing in script of ActiveSync stats:
    $EASDevices = “”
    $AllEASDevices = @()
    The complete script is:
    ####  Get Mailbox
    $EASDevices = “”
    $AllEASDevices = @()
    $EASDevices = “”| select ‘User’,'PrimarySMTPAddress’,'DeviceType’,'DeviceModel’,'DeviceOS’, ‘LastSyncAttemptTime’,'LastSuccessSync’
    $EasMailboxes = Get-Mailbox -ResultSize unlimited
    foreach ($EASUser in $EasMailboxes) {
    $EASDevices.user = $EASUser.displayname
    $EASDevices.PrimarySMTPAddress = $EASUser.PrimarySMTPAddress.tostring()
        foreach ($EASUserDevices in Get-ActiveSyncDevice -Mailbox $EasUser.alias) {
        $EASDeviceStatistics = $EASUserDevices | Get-ActiveSyncDeviceStatistics
        $EASDevices.devicetype = $EASUserDevices.devicetype
        $EASDevices.devicemodel = $EASUserDevices.devicemodel
        $EASDevices.deviceos = $EASUserDevices.deviceos
        $EASDevices.lastsyncattempttime = $EASDeviceStatistics.lastsyncattempttime
        $EASDevices.lastsuccesssync = $EASDeviceStatistics.lastsuccesssync
        $AllEASDevices += $EASDevices | select user,primarysmtpaddress,devicetype,devicemodel,deviceos,lastsyncattempttime,lastsuccesssync
    $AllEASDevices = $AllEASDevices | sort user
    $AllEASDevices
    $AllEASDevices | Export-Csv $exportpath\ActiveSyncReport.csv
    Hasan

    They are just creating empty varibles so that data can be added to them later in the script.
    The first one
    $EASDevices = “”
    creates an empty string.
    the second one
    $AllEASDevices = @()
    creates an empty array.
    DJ Grijalva | MCITP: EMA 2007/2010 SPA 2010 | www.persistentcerebro.com
    Hi DJ, 
    What is the purpose of empty string. 
    Hasan

  • Problem with script parameters

    Hi,
    I want to pass the parameter 'RTE REFERENCE' to a script.
    Here is my script :
    define UTIL = &1
    set serveroutput on
    declare
    UTI VARCHAR2(20);
    begin
    dbms_output.enable(100000);
    UTI := '&UTIL';
    dbms_output.put_line('Valeur passée en paramètre : '||UTI);
    end;
    EXIT;
    I run the script as following :
    sqlplus -S infolig/xxxx@REFI @test.sql 'RTE REFERENCE'
    If I replace 'RTE REFERENCE' by "RTE REFERENCE", I obtain the same result.
    But dbms_output returns RTE instead of RTE REFERENCE.
    What is the problem ?
    Regards,
    Rachel

    or you can simplify it by:
      set serveroutput on
      declare
        UTI VARCHAR2(20) := '&1';;
      begin
        dbms_output.enable(100000); 
        dbms_output.put_line('Valeur passée en paramètre : '||UTI);
      end;
      EXIT;

  • [shellscript] Passing a script with parameters to AT

    Hey everybody,
    I would like to learn shell scripting so I created a script to mount/unmount my truecrypt volume. This is what I have so far:
    #!/bin/bash
    case "$1" in
    start)
    truecrypt -k '' /dev/array/vault /home/<user>/vault
    stop)
    truecrypt -d /home/<user>/vault
    echo "usage: $0 (start|stop)"
    esac
    exit 0
    Now I would like to add another feature. I want it to automatically unmount after 2 hours. I found the "at" command which should be able to do this.
    I would need to do something like:
    start)
    truecrypt -k '' /dev/array/vault /home/<user>/vault
    at -f "$1 stop" now + 2 hours
    However, running just " at -f "./vault.sh start" now + 2 minutes " fails:
    warning: commands will be executed using /bin/sh
    Cannot open input file ./vault.sh start: No such file or directory
    If I can get this working I would like the "stop" code to remove any scheduled stop operations (for when I do it manually).  Also, I would like to include a "keepalive" function that allows me to kill the scheduled stop task and reschedule it again to restart the countdown. This would allow me to keep the volume mounted if I want to use it for a longer period of time.
    Is it possible to execute scripts + parameters with "at"?  Can somebody help me to make this work?
    Thanks a bunch!
    P.S: Truecrypt also keeps asking me this:
    Protect hidden volume (if any)? (y=Yes/n=No) [No]:
    I would like to specify this in the command so that I don't have to hit enter every time. I've looked at the man page but found nothing helpfull. Anyone?

    Make sure that vault.sh exists in the directory that you are executing it from. It may be better to refer to the whole file location rather than just './'. eg use " at -f "~/vault.sh start" now + 2 minutes " rather than just  " at -f "./vault.sh start" now + 2 minutes ".
    Providing thatyou are happy for TrueCrypt to accept the default answer for any questions it asks you can just pipe yes into it:
    yes | truecrypt -k '' /dev/array/vault ~/vault
    Yes will 'press enter' to any questions that TrueCrypt asks.
    Last edited by gadget3000 (2011-07-14 16:46:01)

  • Script privilege errors

    I'm trying to install sharepoint tools to users machines. This requires admin privledges. The script below is in a .bat files and installs the product no problems with admin rights. To be able to apply this to users when they log on is where I'm stuck.
    Ive tried it as a computer startup script in GPO when the computer starts but it doesnt do anything. Its also hard to know as you cant see any messages.
    Any suggestions?
    script below:
    setlocal
    REM *********************************************************************
    REM Environment customization begins here. Modify variables below.
    REM *********************************************************************
    REM Get ProductName from the Office product's core Setup.xml file, and then add "office14." as a prefix.
    set ProductName=Office14.SharePointDesigner
    REM Set DeployServer to a network-accessible location containing the Office source files.
    set DeployServer=\\clientsource\clientSource\Sharepoint
    REM Set ConfigFile to the configuration file to be used for deployment (required)
    set ConfigFile=\\clientsource\clientSource\Sharepoint\SharePointDesigner.WW\config.xml
    REM Set LogLocation to a central directory to collect log files.
    set LogLocation=\\clientsource\clientsource\Sharepoint\log
    REM *********************************************************************
    REM Deployment code begins here. Do not modify anything below this line.
    REM *********************************************************************
    IF NOT "%ProgramFiles(x86)%"=="" (goto ARP64) else (goto ARP86)
    REM Operating system is X64. Check for 32 bit Office in emulated Wow6432 uninstall key
    :ARP64
    reg query HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432NODE\Microsoft\Windows\CurrentVersion\Uninstall\%ProductName%
    if NOT %errorlevel%==1 (goto End)
    REM Check for 32 and 64 bit versions of Office 2010 in regular uninstall key.(Office 64bit would also appear here on a 64bit OS)
    :ARP86
    reg query HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\%ProductName%
    if %errorlevel%==1 (goto DeployOffice) else (goto End)
    REM If 1 returned, the product was not found. Run setup here.
    :DeployOffice
    start /wait %DeployServer%\setup.exe /config %ConfigFile%
    echo %date% %time% Setup ended with error code %errorlevel%. >> %LogLocation%\%computername%.txt
    REM If 0 or other was returned, the product was found or another error occurred. Do nothing.
    :End
    Endlocal

    Hello,
    Have you checked that the script is in a place where it can be run with the local system account of the computer the "default" location of the scripts is \\domain.com\SysVol\domain.com\scripts OR inside the Group Policy.
    Have you checked that the Group policy / script are assigned to the right place (common mistake). If you assign COMPUTER-settings make sure the GP is assigned so that the test computer will get the policy (you can the rcop.msc or GPRESULT /h c:\pathherewhereyouwanttheraport.html
    to make sure the computer really gets the right policy)
    When you have created the group policy and selected: Computer Configuration, Windows settings, Scripts (Startup/Shutdown), Startup. On Scripts-tab selected ADD. please check that the information is
    right
    Script name: MyScript.bat
    Script Parameters (the path where the script is located comes here): \\domain.com\SysVol\domain.com\Policies\{557740FF-AFAE-4300-9BD7-B90555FDA1BE}\Machine\Scripts\Startup

  • Calling powershell script from a batch file

    Hello All,
    I have a batch script that calls a powershell script. Before calling the script I set the execution policy to unrestricted, but when it gets to the line that calls the batch script i still get the confirmation in the command window: "Do you want to
    perform this operation" I then have to press Y for the PS script to run and then my batch script finishes.
    Does anyone know the setting I need to change in order to suppress the confirmation?
    Note: this is Windows 8, see code below
    set THIS_DIR=%~dp0
    powershell Set-ExecutionPolicy unrestricted
    powershell %THIS_DIR%MyScript.ps1 "param1"

    I may sound like a jerk but you really want to look at PowerShell.exe /?
    PowerShell[.exe] [-PSConsoleFile <file> | -Version <version>]
        [-NoLogo] [-NoExit] [-Sta] [-Mta] [-NoProfile] [-NonInteractive]
        [-InputFormat {Text | XML}] [-OutputFormat {Text | XML}]
        [-WindowStyle <style>] [-EncodedCommand <Base64EncodedCommand>]
        [-File <filePath> <args>] [-ExecutionPolicy <ExecutionPolicy>]
        [-Command { - | <script-block> [-args <arg-array>]
                      | <string> [<CommandParameters>] } ]
    PowerShell[.exe] -Help | -? | /?
    -PSConsoleFile
        Loads the specified Windows PowerShell console file. To create a console
        file, use Export-Console in Windows PowerShell.
    -Version
        Starts the specified version of Windows PowerShell.
        Enter a version number with the parameter, such as "-version 2.0".
    -NoLogo
        Hides the copyright banner at startup.
    -NoExit
        Does not exit after running startup commands.
    -Sta
        Starts the shell using a single-threaded apartment.
        Single-threaded apartment (STA) is the default.
    -Mta
        Start the shell using a multithreaded apartment.
    -NoProfile
        Does not load the Windows PowerShell profile.
    -NonInteractive
        Does not present an interactive prompt to the user.
    -InputFormat
        Describes the format of data sent to Windows PowerShell. Valid values are
        "Text" (text strings) or "XML" (serialized CLIXML format).
    -OutputFormat
        Determines how output from Windows PowerShell is formatted. Valid values
        are "Text" (text strings) or "XML" (serialized CLIXML format).
    -WindowStyle
        Sets the window style to Normal, Minimized, Maximized or Hidden.
    -EncodedCommand
        Accepts a base-64-encoded string version of a command. Use this parameter
        to submit commands to Windows PowerShell that require complex quotation
        marks or curly braces.
    -File
        Runs the specified script in the local scope ("dot-sourced"), so that the
        functions and variables that the script creates are available in the
        current session. Enter the script file path and any parameters.
        File must be the last parameter in the command, because all characters
        typed after the File parameter name are interpreted
        as the script file path followed by the script parameters.
    -ExecutionPolicy
        Sets the default execution policy for the current session and saves it
        in the $env:PSExecutionPolicyPreference environment variable.
        This parameter does not change the Windows PowerShell execution policy
        that is set in the registry.
    -Command
        Executes the specified commands (and any parameters) as though they were
        typed at the Windows PowerShell command prompt, and then exits, unless
        NoExit is specified. The value of Command can be "-", a string. or a
        script block.
        If the value of Command is "-", the command text is read from standard
        input.
        If the value of Command is a script block, the script block must be enclosed
        in braces ({}). You can specify a script block only when running PowerShell.exe
        in Windows PowerShell. The results of the script block are returned to the
        parent shell as deserialized XML objects, not live objects.
        If the value of Command is a string, Command must be the last parameter
        in the command , because any characters typed after the command are
        interpreted as the command arguments.
        To write a string that runs a Windows PowerShell command, use the format:
            "& {<command>}"
        where the quotation marks indicate a string and the invoke operator (&)
        causes the command to be executed.
    -Help, -?, /?
        Shows this message. If you are typing a PowerShell.exe command in Windows
        PowerShell, prepend the command parameters with a hyphen (-), not a forward
        slash (/). You can use either a hyphen or forward slash in Cmd.exe.
    Hope that helps! Jason

  • Action Script to add a parent node value to the top node

    I need to add a new parent node value to a hierarchy for the top node.  The action script parameters to add a node is "Add|Version|Hierarchy|Node|Parent Node|Leaf property".  I am at a loss on what to do for the top node since there is no Parent Node above this top level, but the parameters require it.  I have reviewed both the user manual and admin manual, but did not find any assistance.  Can anybody help me?
    Thanks!

    You have the answer with you, don't get confused between Parent Node and Top Node in this context, while Adding a new node your Top Node will become your Parent Node.
    "Add|Version|Hierarchy|Node|Parent Node|Leaf property"
    If you still have confusion, simply do the below,
    1. Right Click on your Top Node and Add a new Leaf or Limb Node manually
    2. Once added, go back to Home -> Script
    3. Select Source Type as Transaction Log and then select the newly added node and Load
    4. In the bottom select Script -> Download -> Download as Action Script.
    5. Open in a Notepad and leverage it to create your new script.

  • Problem with a script

    I can be reached at [email protected]
    I had a question for you to see if you can solve. I have a script below I am trying to run in Oracle 9i SQL+ with SYSTEM/MANAGER privileges. Is the script look complete to you? For some reason I get insufficient privs. even when I log in as Admin and run the script. I am trying to create a Ora Databased called WFCDB with these script parameters. Do you have any advice on how to make this script run so that when I view it in Enterprise Manager, under Schemas, I can see WFCDB? The scripts below:
    CREATE TABLESPACE tkcs1DATAFILE 'C:\oradata\tkcsdb\tkcs1.dbf' SIZE 800Mdefault storage (initial
    1M next 1Mminextents 1 maxextents 1024 pctincrease 0);
    CREATE TABLESPACE tkcs2 DATAFILE 'C:\oradata\tkcsdb\tkcs2.dbf' SIZE 800Mdefault storage (initial
    1M next 1Mminextents 1 maxextents 1024 pctincrease 0);
    CREATE TABLESPACE tkcs3DATAFILE 'C:\oradata\tkcsdb\tkcs3.dbf' SIZE 800Mdefault storage (initial
    1M next 1Mminextents 1 maxextents 1024 pctincrease 0);
    CREATE TABLESPACE tkcs4DATAFILE 'C:\oradata\tkcsdb\tkcs4.dbf' SIZE 800Mdefault storage (initial
    1M next 1minextents 1 maxextents 1024 pctincrease 0);\
    CREATE TABLESPACE tkcs5DATAFILE 'C:\oradata\tkcsdb\tkcs5.dbf' SIZE 800Mdefault storage (initial
    1M next 1minextents 1 maxextents 1024 pctincrease 0);
    CREATE TABLESPACE tkcs6DATAFILE 'C:\oradata\tkcsdb\tkcs6.dbf' SIZE 800Mdefault storage (initial
    1M next 1minextents 1 maxextents 1024 pctincrease 0);
    CREATE TABLESPACE tkcs7DATAFILE 'C:\oradata\tkcsdb\tkcs7.dbf' SIZE 800Mdefault storage (initial
    1M next 1minextents 1 maxextents 1024 pctincrease 0);
    CREATE TABLESPACE tkcs8DATAFILE 'C:\oradata\tkcsdb\tkcs8.dbf' SIZE 50Mdefault storage (initial 1M
    next 1minextents 1 maxextents 1024 pctincrease 0);
    CREATE TEMPORARY TABLESPACE TEMP TEMPFILE 'C:\oradata\tkcsdb\temp01.dbf' SIZE 2048M REUSE
    AUTOEXTEND ON NEXT 1M;
    create role kronosuser;
    create role kronosruser;
    create user suprkron identified by skron96 default tablespace tkcs3 temporary tablespace temp;
    create user kronread identified by kronr96 default tablespace tkcs3 temporary tablespace temp;
    grant create session,unlimited tablespace to kronread;
    grant create session,unlimited tablespace to suprkron;
    grant kronosruser to kronread;
    grant kronosuser to suprkron;
    create user tkcsowner identified by tkcsowner
    default tablespace tkcs3temporary tablespace temp;
    grant connect,resource,drop public synonym,create public synonym to tkcsowner;
    grant create table, unlimited tablespace to suprkron with admin option;
    REM Must be user sys to grant the following REM
    grant select on sys.dba_synonyms to tkcsowner;
    grant select on sys.dba_segments to tkcsowner;
    grant select on sys.dba_tables to tkcsowner;
    grant select on sys.dba_indexes to tkcsowner;
    grant analyze any to tkcsowner;
    grant select on v_$parameter to suprkron;
    grant select on sys.dba_segments to suprkron;
    grant select on sys.dba_tables to suprkron;
    grant select on sys.dba_indexes to suprkron;
    grant select on sys.dba_synonyms to suprkron;
    grant analyze any to suprkron;
    grant select_catalog_role to suprkron;

    Your answer is in a remark in your script:
    REM Must be user sys to grant the following REM
    sys and system are not the same user account. If your system acccount password is manager, then your sys account password is probably change_on_install. These are the defaults for these two accounts.
    Also, I believe that all of these statements are redundant:
    grant select on sys.dba_xxxxxxxxx
    I believe that the statement...
    grant select_catalog_role
    ... encompasses all these privileges. Someone correct me please if I am mistaken.

Maybe you are looking for

  • Error in OIM 9.1.0.1 Installation

    Hi All, I am trying to install OIM using the following configuration: OS: Windows Server 2003 SP2 JDK: Sun jdk 6 update 10 Database: Oracle 10g (10.2.0.1.0) OIM: 9.1.0.1 Applicaton Server: Oracle Weblogic 10.3/JBOSS 4.2.3 (I have tried on both) But i

  • Airprint problem deskjet 3070a, ipad does not find my printer

    I just got a deskjet 3070a and it works fine with all my laptops. When i try to use airprint on my ipad it doesn't find my printer, what can I do? I have tried anything I could found on Internet but I couldn't solve this problem.... Actually i don't

  • What can i do to get my code.

    How do I get my eprinter code.

  • Email closing unexpectedly and safari issue

    Hi I have been using a macbook pro retina version for a year. Recently, my email has been closing unexpectedly. I can't even open it for a few second. It shows me this message when it close: Process:         Mail [2503] Path:            /Applications

  • Create Partner Bank Field in the Layout

    Hi Friends, My requirement is, in the vendor Line item report(FBL1N), I want to add the Partner bank Type field in the layout which is not available. Is there any option we can create our own without the help of ABAPer. Regards, Anil