How does a script know its in a task sequence?

I want to pass a variable back to a task sequence from a script.  This script is in a package, and could be run as an advert or from the TS.  If I try to enable Microsoft.SMS.TSEnvironment and I'm not in a TS, it will generate an error. 
Is there a way I can KNOW that I'm in a TS prior to doing so?

The only definitive test that I know of and use in my code is to try and create the COM object and if it fails, I know the script is not being executed in a TS -- you simply need to handle the COM object creation failure gracefully.
Jason | http://blog.configmgrftw.com

Similar Messages

  • Applications: How does OS X Know Which App to Reference a File to?

    I just got my new Macbook and while installing applications, a question I've had for a while came up again.
    How does OS X know to reference applications to certain file types?
    For example. I have a .avi I downloaded to watch, and downloaded VLC to watch it. I open the .dmg and drag/drop VLC to my Applications folder. Instantly, VLC appears in the "Open With" list for my .avi. How does it know to list it?
    My theories are:
    1. When dragging/dropping VLC, it's not just copying files, it's also doing some background stuff, including VLC telling OS X that it should be referenced for .avi files
    2. When I "Open With" a file, OS X looks at apps in my Applications folder and detects applicable ones in some manner.
    3. It's Voodoo magic.
    How does it work? I hope my question makes sense.
    Thanks!

    From what I understand, the second the .dmg is opened and VLC is seen by OS X as an application, Launch Services asks VLC what filetypes to associate it with, and adds that to the database? Then when I try to "open with" a .avi, it sees that .avi is associated with QuickTime, and now VLC too.
    that's right. inside the VLC application bundle there is a file called info.plist which contains among other things the info about which files VLC can handle. that file is consulted by the Launch services once it becomes aware of VLC being present in the system and that info is recorded in the launch services database. That's how it works with all applications. you can view this file if you want. control-click on VLC in finder and select "show package contents". in the new finder window that opens up go to Contens folder and quicklook the file info.plist.
    Is this correct?
    Thanks.

  • How does the system knows hire action first

    Hi all,
    Iam new to this community, recently i have joined as an SAP HR trainee ,and i am undergoing SAPHR training Programme.
    why can't the system allow us to do promotion action before Hire action?where do we configure this to make it happen, how does the system knows to do the Hire action first, where are the settings for this..
    Swathi

    hai
    there are a number of programmes running in the back groung when u do any application.
    the validations will be written in them
    when u try to do something through the programe running at the back ground does these validations  like the example u have taken when u do the promotion action it checks whether actions exists or not if not then it throws the error written in the program.
    regards
    nalla

  • How does the system knows age or seniority is crossed for so and so... EE

    Hi Experts,
    In my project we have configured some Health plans based on ages and seniority,
    Employee can enroll in to the plan when they reach the age or seniority,
    my question is how does the system knows  age or seniority is crossed for so and so... EE, where exactly we do this setups
    Pleae let me know your valuable answers
    Regards
    Sreeni

    hr_entry_date and you can use various
    fm to calculate this, It reads 0019, 0041 or Hdate feature
    3QP8                           Time related calculation function mod.
    HR_AUPBS_SENIORITY             Calculate the whole length of service of employee
    3RP3A                          Leave schem proration modules
    SGPS_LS_SENIORITY_CALCULATION  Function for seniority calculation for Singapore Leave Scheme
    HRDO
    HR_DE_PBS_SENIORITY_PERIODS
    HRFPBS4AV0
    HR_PSF_AV_ANC_INPUT_SENIORITY
    HRF_METADATA_IT
    HRF_READ_SENIORITY_IT

  • CSS: How does DNS Scripted Keepalive (ap-kal-dns) work?

    Hello everyone,
    I have a question about how does DNS Scripted Keepalive (ap-kal-dns) work on CSS 11503.
    According to the "Using the CSS Scripting Language",
    http://www.cisco.com/en/US/partner/docs/app_ntwk_services/data_center_app_services/css11500series/v7.50/configuration/administration/guide/Scripts.html
    it says
    Since we just want to see if the DNS server is alive we will send a simple DNS Query.  This query is hard coded in hexadecimal and sent raw to the DNS server.
    and
    Receive some unexplained response. We don't care what it is because an unstable DNS server or a non-existent one would probably not send ! us any data back at all.
    but it also says
    Failure Upon: 1. Not resolving the host's IP from the domain name
    And according to the "How to Configure the CSS to Load Balance DNS Servers and Use the DNS Scripted Keepalives",
    http://www.cisco.com/en/US/partner/products/hw/contnetw/ps789/products_configuration_example09186a00801d015a.shtml
    it says
    The script is hard-coded to resolve www.cisco.com.  It does not matter if the DNS server can resolve this address or not, as long as a DNS response comes back that the service is alive. This keepalive is only testing if a DNS server can respond to a query, not if it can resolve a specific name. The script queries from the CSS to DNS internal servers keep track of the availability of the DNS servers.
    but it also says
    Access to Internet Domain Name System Root Servers is required for successful implementation of DNS scripted keepalives.
    So I am confused whether DNS server has to resolve the host's IP address correctly for DNS query received from CSS or just needs to reply any response but not need to resolve it.
    I would like to recap about my question.
    Q1: Does DNS Scripted Keepalive (ap-kal-dns) send DNS query with cisco.com as DNS name by default?
    Q2: Does DNS server has to resolve IP address of  cisco.com or just need to respond for DNS query with any response but not need to resolve IP address of cisco.com?
    I understand I should get capture data and see how DNS scripted keepalive works, but I can not prepare lab environment to do it at the present.
    Your information would be appreciated.
    Best regards,
    Shinichi

    yes the query is for www.cisco.com and the script expect a reponse that contains the word cisco.
    Gilles.

  • How does Media Manager handle Motion Projects within the Sequence being cop

    How does Media Manager handle Motion Projects within the Sequence being copied?
    I've highlighted my sequence, opened Media Manager, and copied it to another drive. When I open up the sequence in it's new project, the rendered Motion Project plays within my sequence but it won't let me go back into this Motion Project to make changes. I tried starting over. This time I highlighted the actual motion sequence and clip that is created within FCP after sending something to Motion and copied those to the new drive. When I went into the newly created 'media' folder and double clicked on the motion project it launched. It looked liked it was going to play but while my crops moves and borders were there, the filmed material is shown as a freeze frame for the duration of the motion project.
    I did this with and without 'including master clips within selection'. Any advice would be appreciated. Thanks.

    Is there anyone who knows the answer to this? Thanks.

  • How does a RemoteObject find its destination?

    I am new to Flex. I am a long time Java/C++/C developer so my head won't explode if we get technical.
    I am trying to figure out how a RemoteObject finds it's destination with just a simple reference as "SomeDestId" configured on BlazeDS the app server.
    From the client side I am used to getting a reference to some Registry like JNDI or whatever by stating which host and port to use or a URI or something more absolute. I am aware that the flash player has a sandbox so we can dispense with the host, we know what it has to be. But my question is. How does the swf file or the context of the flex app know where my BlazeDS is rooted in my J2EE app server if I don't tell it?
    What am I missing? I have looked at the example code and have read the developer pdf but nobody talks about this.
    Does BlazeDS start listing on a well known port other than the application server's port?
    If not how is my flex program supposed to know what port BlazeDS is on?
    Anyone know how this automagic works? Because I can't find it in the docs.
    Does my SWF file need to be deployed from within the BlazeDS deployment if so I have missed where in the documentation this is stated.

    Ok folks, I am aware of the channel sets and end points. These are configured in BlazeDS, the server side of this client/server arrangement. Everybody fixates on this server config. I got that.
    But the client side is what I am fixated on.
    Let us view the flash player as a virtual machine. More importantly a virtual machine that is not the same virtual machine that BlazeDS is running in which is running in a J2EE app server somewhere in the universe (hopefully in the same domain) but elsewhere in that domain EXACT location unknown to the client VM. Unless somebody has told the CLIENT where BlazeDS (the server) is somehow or some where.
    From everybody's perspective there seems to be no separation in terms of Client/Server because all I get is its done on the server side config.
    The client is asking it's virtual machine to return a reference to a RemoteObject at destination="LahDeeDah" not LahDeeDah@somehost:someport:somepath or what ever syntax you would care to use. This implies that "LahDeeDah" is registered in some kind of hashing registry that knows something about where BlazeDS is located and that it even exists.
    How does the CLIENT swf program find this registry if I compile it in some IDE like Eclipse that is not aware that BlazeDS even exists somewhere? Remember, Channels and EndPoints are all configured on the server not in the CLIENT.
    You folks keep talking about how to configure the server side. I want to know what mechanism allows the client to get access to this server side configuration. Remember this conf.xml is on the server not in my IDE or in the src that creates my SWF file.
    As to an earlier post someone eluded to BlazeDS compiling the SWF file. No where in the docs did I see anything that said you MUST compile your src with BlazeDS and NOT some IDE like Flex Builder 3 which is what I am using.
    Did I miss this somewhere? Or was this info supposed to be handed down through divine revalation?
    Oh I give up! I'll just tear into the src and figure it out myself. It should be in the RemoteObject hierarchy.

  • How does Goods Issue know which Batches to deallocate from A/R Credit Memo?

    Hi,
    I am creating an addon that runs after a A/R Credit Memo is created.  It creates a Goods Issue, and enters the Item Code and the Quantity from the line items on the Credit Memo into the Goods Issue.
    After it writes the Goods Issue to SAP, I open up the document it created and see that the line items are in there correctly, and that somehow the batches assigned to those line items are also in there.
    There is nothing in the code that does anything with the Batches, but somehow SAP knows which batches to work with.
    I haven't been able to find any info about it.  Can you please help us understand what is happening?  How does SAP know and make assignments to batches in line items in Goods Issues?
    Thank you,
    Mike

    Hi Michael and Gordon,
    Sorry Gordon, I'm quite sure you misunderstood Michael original question. Michael asked how the add-on he created could link corresponding batch number from an A/R Credit Memo document could be selected by Goods Issue document which generated by the add-on, while he actually never wrote a code to select any batches numbers which available in the system.
    Maybe a little bit of illustration:
    1. Item A, qty 10 - (batch A qty 5, batch B qty 3, batch C qty 2)
    2. A/R Credit Memo occurred, return of Item A with 3 qty (batch A qty 1, batch B qty 1, batch D qty 1). Therefore, item A latest position should be (batch A qty 6, batch B qty 4, batch C qty 2, batch D qty 1). This A/R Credit Memo created by add-on.
    3. Goods Issue document triggered by add-on. The problem is, Michael never write any code to select any batch numbers, and somehow the system choose batch number precisely as occurred in number 2 (A/R Credit Memo document), which is (batch A qty 1, batch B qty 1, batch D qty 1). Therefore the stock position for Item A back to as being displayed in number 1.
    I believe this shouldn't be possible at all. Unless, there is a certain mechanism in SAP that automatically choose batch number to used in Goods Issue document using LIFO (Last In First Out), which is, as far as I know never exist in any SAP B1 version. Yes you could automatically choose batch numbers according to available batch, but you could do this when system prompt you when you tried to issue certain document using SAP application itself, not using add-on.
    And of course, you could write a code to choose certain batches based on certain A/R Credit Memo, but still, you need to write a code, you can't do this without a code, selection of batches is compulsory when you tried to add a goods issue document which consist of items that managed using batches.
    In my opinion, I think it is better for you to re-write those codes and relate batches you want to attach with your Goods Issue document based on corresponding A/R Credit Memo. It is much safer, and the error message you encountered won't happen again in the future.
    Best Regards,
    Hendry Wijaya

  • How does AnyConnect client calculate its Link Speed? (Windows 7)

    I'm curious about how the AnyConnect client determines what its default Link Speed is, upon initialization?  
    For example, from behind my home firewall, if I have a client that's physically connected to a 1Gbps uplink, when I launch the AnyConnect client, Windows Task Manager shows me a Link Speed of 9 Mbps for my AnyConnect connection.
    However, if I also launch an AnyConnect connection from another machine on my home LAN, connected via 300Mbps WiFi, Windows Task Manager will only show me around a 1 Mbps Link Speed.
    How does the AnyConnect client calculate its Link Speed upon connection?   Does it take a percentage of the available upstream bandwidth?
    My home ISP bandwidth is 50Mbps down/12 Mbps up.   My corporate ISP (where the ASA I'm connecting to resides) it 50Mbps bi-directional.

    For PHP, if you want to handle data in UTF8, NLS_LANG must be set to
    "<language>_<territory>.UTF8", where <language> and <territory> are your
    preference. There is few difference between ODBC and OCI called by PHP
    in this case as both need to set NLS_LANG to UTF8. If you are familiar
    with OCI and expect better performance, you can do so. But if you want
    to make the application be portable in terms of data source, ODBC is an
    appropriate choice.
    Data source doesn't matter the encoding of client. The character set of
    client is determined by how client calls ODBC functions SQLBindParameter
    or SQLBindCol. If the client specifies SQL_C_WCHAR, data is exchanged in
    UTF-16 independent from NLS_LANG. If it is SQL_C_CHAR, data is in
    NLS_LANG encoding. Unicode ODBC client binds data with SQL_C_WCHAR, that
    is exactly the case of MS Access 2000. On the other hand, because PHP
    binds data with SQL_C_CHAR, NLS_LANG is taken as the encoding for data
    manipulations

  • How does a switch learn its route

    Hi
    I have a cisco switch and somehow it finds the best route through different routers, I tested this with traceroute from the switch. How does the switch learn these routes?
    Thanks
    Dan

    Hi Rick
    Thanks for the info. My switch is a 3500 layer 2 switch. Here's the config for my switch:
    Current configuration:
    ! Last configuration change at 16:04:28 GMT Wed Mar 15 2006
    ! NVRAM config last updated at 09:49:35 GMT Wed Apr 27 2005
    version 12.0
    no service pad
    service timestamps debug uptime
    service timestamps log uptime
    service password-encryption
    hostname switch1
    enable secret 5 ttttttttttt
    clock timezone GMT 1
    ip subnet-zero
    ip name-server 10.11.10.2
    ip name-server 10.11.10.1
    cluster enable l3 0
    cluster member 1 mac-address 0007.ebc9.9380
    cluster member 2 mac-address 0007.ebc9.94c0
    cluster member 3 mac-address 0007.853f.6d00
    interface FastEthernet0/1
    switchport access vlan 102
    interface FastEthernet0/2
    duplex full
    speed 100
    port monitor FastEthernet0/8
    switchport access vlan 110
    interface FastEthernet0/3
    switchport access vlan 102
    interface FastEthernet0/4
    switchport access vlan 102
    interface FastEthernet0/5
    port monitor FastEthernet0/19
    port monitor FastEthernet0/22
    switchport access vlan 100
    interface FastEthernet0/6
    switchport access vlan 101
    interface FastEthernet0/7
    duplex full
    speed 100
    switchport access vlan 102
    interface FastEthernet0/8
    duplex full
    speed 100
    switchport access vlan 110
    interface FastEthernet0/9
    duplex full
    speed 100
    switchport access vlan 102
    interface FastEthernet0/10
    duplex full
    speed 100
    switchport access vlan 102
    interface FastEthernet0/11
    duplex full
    speed 100
    switchport access vlan 102
    interface FastEthernet0/12
    switchport access vlan 101
    interface FastEthernet0/13
    switchport access vlan 102
    interface FastEthernet0/14
    duplex full
    speed 100
    port monitor FastEthernet0/23
    switchport access vlan 102
    interface FastEthernet0/15
    duplex full
    speed 100
    switchport access vlan 102
    interface FastEthernet0/16
    duplex full
    speed 100
    switchport access vlan 108
    interface FastEthernet0/17
    duplex full
    speed 100
    switchport access vlan 108
    interface FastEthernet0/18
    duplex full
    speed 100
    switchport access vlan 102
    interface FastEthernet0/19
    duplex full
    speed 100
    switchport access vlan 100
    interface FastEthernet0/20
    duplex full
    speed 100
    switchport access vlan 108
    switchport trunk encapsulation dot1q
    switchport trunk native vlan 108
    switchport mode trunk
    interface FastEthernet0/21
    duplex full
    speed 100
    port monitor FastEthernet0/7
    switchport access vlan 102
    interface FastEthernet0/22
    switchport access vlan 100
    interface FastEthernet0/23
    duplex full
    speed 100
    switchport access vlan 102
    no cdp enable
    interface FastEthernet0/24
    switchport access vlan 102
    interface GigabitEthernet0/1
    switchport trunk encapsulation dot1q
    switchport trunk native vlan 102
    switchport mode trunk
    interface GigabitEthernet0/2
    switchport trunk encapsulation dot1q
    switchport trunk native vlan 102
    switchport mode trunk
    interface VLAN1
    no ip address
    no ip directed-broadcast
    ip nat outside
    shutdown
    interface VLAN102
    ip address 10.11.8.21 255.255.248.0
    no ip directed-broadcast
    ip nat outside
    ip nat inside source list 199 interface VLAN102 overload
    logging facility local6
    logging 10.11.9.21
    logging 10.24.21.1
    access-list 199 dynamic Cluster-NAT permit ip any any
    banner motd ^C
    Switch 1
    ^C
    line con 0
    password 7 xxxxxxxx
    transport input none
    stopbits 1
    line vty 0 4
    exec-timeout 35000 0
    password 7 xxxxxxxx
    login
    line vty 5 15
    password 7 xxxxxxxx
    login
    ntp clock-period 11259714
    ntp server 10.11.9.21
    end
    I haven't got a default gateway, any idea how its finding its route?
    Thanks again
    Dan

  • How does warehouse/accounting knows when to follow up on an SO?

    Let say a sales person create 3 SO today for customers.
    How does?
    - the warehouse aware that they need to ship 3 SOs today?
    - accounting aware that they need to create invoice for 3 SOs today?
    Will SBO send a message to each user in warehouse/accounting? Or this sales person must actually call and notify warehouse/accounting that he just created 3 SOs thus they must follow up with it.

    James,
    There are two ways to handle this,  one the warehouse and the accounting users can look at eh Open Items list Report found under Sales A/R > Sales Reports
    and select Sales Orders / Deliveries as per the preceding stages document.
    Another route would be to create an Alert and send it internally to the respective user
    Suda

  • How does the scrollbar know which field it lands on?

    Hi all
    I'm looking at components at the moment. Not how to use them
    but how to create them yourself to increase your workflow.
    When dragging a scroll component on to a dynamic textfield it
    automatically determines which field it land on, and populate the
    targetInstanceName variable in the property inspector.
    How does it do that? I guess it's a jsfl file being run, but
    I can't figure out how to run a jsfl file the moment the user let
    go on the component.
    Thanks in advance,
    Jakob

    Hi Antony,
    There is no need of Sender Agreement and hence sender communication channel. Sender Agreement identifies three things,
    Namespace, Software component version and Outbound Interface. In Idoc communcation there is no need of Sender agreement as we can identify above things without Sender Agreement itself like namespace - Idocs have standard namespace and can be accessed across the sofwatware component versionsn and the idoc type it self specifies the interface name.
    You cannot define a sender IDOC channel in Integration Directory due to fact dat IDOC adapter does not run in J2EE AF but is an 'built in" adapter.
    Thanks,
    Vijay Kumar T.

  • Run a powershell script with domain credentials during task sequence

    I have a powershell script that adds the computer it is run on to a security group.  If I log onto the computer with a domain account it works perfectly.  However, if it is run while logged on as the local admin account it fails with an error message
    that says the domain either doesn't exist or cannot be reached.
    This is a problem because when a computer is being imaged the process runs with the local admin account.  Is there a way to run this script with domain credentials in the task sequence?
    Thanks,
    Andy

    How are you running the Powershell script? If you use a Run Command Line step, you can specify an account to run as. Something like "powershell %scriptroot%\psscript.ps1" where the psscript.ps1 is located in your Scripts folder in your deployment
    share.
    -Nick O.

  • How does the app know image folder (non class files) wrapped in jar file?

    Hi,
    I created an jar file, client.jar, which wrap all necessary files, including packaged class files ( in a hierarachy structure), image folder, properties folder, and ext folder (containing other jar files used). When I run the jar file, like
    java -classpath c:\tmp\client.jar -jar client.jar
    the app does not know where the images go and could not get the properties files. Actually the image and properties files are contained in the same file: client.jar. How can I fix this. I don't want to extract the jar file back to several separated folders and then run it.
    Appreciate the help.

    Unfortunately you have to make some changes in your code.. to find the pictures you need to replace:
    ImageIcon pic = new ImageIcon("pic.gif");
    with
    URL url = MyClass.class.getResource("pic.gif");
    ImageIcon pic = new ImageIcon(url);
    where MyClass is the class which needs to load the resource.
    I hope this helped you! /Pingu

  • How does XI system know the related CMS hostname?

    Hi mates,
    We ran into an issue using CMS. We are in the process of upgrade to PI 7.0.
    We had the CMS on our DEV system and the CMS Tracks page has the following details.
    <b>CMS on Dev</b>
    <i>DEV URL: DEV
    QA URL: QA
    PRD URL: PRD</i>
    In this process of upgrade, we copied our DEV system along with CMS on to EVAL. Before we upgrade DEV box, we tested the CMS that is copied on to EVAL. So we set the following on EVAL CMS
    <b>CMS on EVAL</b>
    <i>DEV URL: EVAL
    QA URL: DEV
    PRD URL: <NONE></i>
    We made sure that CMS service user & pwd are correct and exported a namespace from EVAL. Expectedly, it landed in DEV system. It worked fine.
    Now, we had an emergency transport to be sent to PRD, so we have to do it using DEV CMS as PRD is specified there only. Before we did this, we removed the settings from EVAL CMS.(QA URL: DEV)
    But, when we export the namespace from DEV, the transport goes in to status 'Waiting for Export' and doesnt appear in the consolidation tab of DEV CMS.
    We tried to click on the button 'Update CMS', but it did not work. We are wondering if DEV system still assuming that it is linked to EVAL CMS. Do we explicitly specify the CMS hostname for an XI environment (in exchange profile or somewhere else)? Or, does the XI system determine it at runtime?
    Please help me in understanding this flow logic between CMS & XI. I highly appreciate your inputs.
    Hope I'm clear, let me know if you have questions.
    The last thing we want to do is restore the DEV box using the back-up copy.
    thx in adv
    praveen

    Rama Krishna,
    > it doesn't make any meaning if we install XI and ask
    > to USE CMS of different HOSTNAME.(like specifying CMS
    > DEV as "QUALITY").
    As I said earlier, not all the XI systems in the landscape have a "separate" CMS. They all are connected to one CMS...it can either be on the same box as XI DEV or XI QA or PRD or Soln. Mngr. Hope you understand this.
    Now, my question is...for an XI box should I "explicitly" specify the host name of the CMS?
    eg. in my case, I've the CMS on the same box as XI DEV. Now, do I need to explicitly specify the CMS hostname (i.e. hostname of XI DEV) in exchange profile of XI QA & XI PRD?
    Coming to the DEV URL, QA URL & PRD URL, I'm talking about setting these values in the 'Tracks' tab. Please refer to pg 31 of <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f85ff411-0d01-0010-0096-ba14e5db6306">How To Transport XI Content Using CMS</a>
    > XI implictly takes local HostName for CMS.
    if this is the case, that means XI DEV, XI QA & XI PRD will have separate CMS...sicne each one uses the CMS on the localbox as you say.
    Somehow each XI box is told the CMS hostname.
    Am I clear?
    praveen

Maybe you are looking for

  • Programmatically add folder to classpath

    How can I programmatically add a folder (either on the local filesystem or through a URL across a network) to the classpath? If I'm trying to load a file test.properties, and I do a ResourceBundle.getInstance("test"), I'd like the folder that I add t

  • Reservation Of Raw material

    Guru My Client want to resver the raw material aganist the Plan order & the production oreder Is it possible If yes what is Trax Code&  Customasation & configration required Pl Advise Me Thanks Sudhir Bilwar

  • Adaptive RFC Model vs. Adaptive Web Services Model

    Hi All, I would like to compare Adaptive RFC Model and Adaptive Web Services Model What are pros and cons ? What kind of data can be transferred in both models? Is there any literature out there (I don't mean tutorials on usage, I've seen those)? Tha

  • Can not start INTEL iMac from external drive

    I have a backup drive that has been cloned (Carbon Copy Cloner) from my iMac hard drive.  I can not restart from it using the iMac. (I can use it to restart my Mac Air with out any problem.)  When I hold down OPTION during restart the drive does not

  • Vanishing Point to After Effects

    photoshop cs3 10.0.1, mac osx 10.5.3, 8 core, 16Gb ram. I have an image open, pull down to vanishing point, make my grids, and pull down the flyout menu to export, but only see "Render to Photoshop", no "Export to After Effects" or Export to DXF. any