Using a environment variable that was created during the Task Sequence process - SCCM 2012 R2

Hi,
I'm triyng to use a environment variable that is create in the beginning of the Task Sequence.
1. I'm using a VBScript that get the Exit Code of an application, and create the environment variable "iReturn" with the value of the exit code. (This is working)
2. I add this variable in the CustomSettings.ini, like this "iReturn=%iReturn%
3. After the step that I run the VBScript I put the "Gather" step to get the variables, but looking in the BDD.log the iReturn variable appears the same as the CustomSettings.ini configuration "iReturn=%iReturn%". (But, if I put a "Restart
Computer" step after the VBScript, the BDD.log shows the iReturn variable with the right code.)
Question: How can I update the environment variable of Windonws XP to use in the Task Sequence without restart.
OR
How can I configure autologon in SCCM 2012 (if have no way to update withou restart computer).
I already tried the autologon with registry settings and a specific user, If I starts the process with this user works, but If I starts the process with other user, after the autologon the process doesnt continue, I have to do logoff and login with the user
that I started the process.
PS: All this steps have to be executed before the WinPE phase. 

Environment variables must be explicitly set every time a system boots so unless you have a process to repopulate it after the reboot, it won't persist automatically.
Why not store the value in a task sequence variable so that it persists after a reboot?
Jason | http://blog.configmgrftw.com | @jasonsandys

Similar Messages

  • Installing "Applications" during the task sequence and installation enforcement

    Hello,
    Kind of a weird question here, so it seems like I'm seeing that if you install an application on a system during its OSD task sequence, then you later manually uninstall that application, that SCCM considers that system now out of compliance? 
    And then reinstalls the application as indicated in AppEnforce.log?  Is this true?  If so, how do you get around this behavior?  I guess I thought that this application compliance only took effect when you actually deploy an application to a
    system, through an actual deployment.  I didn't realize that it would enforce compliance even if an application was installed during a task sequence.  So if you have hundreds of systems that were imaged with the same task sequence and you have
    a small handful of machines that can't have application X on it (so you want to uninstall it), which was installed via the task sequence, how do you disable this compliance enforcement and disable its automatic reinstall?
    Thanks for any help you can provide.

    Sorry for the delayed response, thank you both for your input.  To answer both your questions, no these workstations do not have any required deployments for this application directed at them.  I have confirmed that, however, they do have
    the OSD task sequence deployment (that contains this application) constantly "available" to them (via only "media and PXE") as this makes it very easy for our technicians to reimage any machine whenever they need to (love that feature
    by the way).
    I can only assume that because they still have this task sequence deployment pointed at them is why they continue to attempt to reinstall this application when ConfigMgr finds that it's not installed anymore.  In fact it does it at the same day/time
    each week, which I believe is the same day/time of the week that the machines were imaged.  I must have the compliance part of the clients configuration to check every 7 days for stuff like this?  Anyway, that's my conclusion for now. 
    Since even Wally Mead felt that this must be an actual required deployment outside of the task sequence I'm really curious to see if anyone else sees this behavior.  It would be fairly simple to attempt to recreate, image a machine with a task sequence
    that has "application" installs included, where the deployment for it is just "available" and keep the deployment "available" after the machine is reimaged.  Then after that, uninstall one of the apps that was installed
    during the task sequence via an "application" and then see if it reinstalls automatically, it may wait a while (may 7 days by default?).  You can see the evidence of our application reinstalling itself in the "AppEnforce.log".
    Is it even remotely possible that this is a new "feature" or behavior of ConfigMgr 2012 and "Applications"?

  • Does 2012 OSD get around requirements to get to the MP during the task sequence?

    Currently right now I am working in an environment where we are on SCCM 2007, but will be going to 2012 next year. We are in the process of trying to make it so we can build on a secure network that cannot route to any other network. I am prepared to put
    a DP out on this same network, but the problem I am running into is that during the task sequence starting, it downloads the task sequence from the MP, not the DP as it is not associated with the package. The MP is not on the same un-routable network. We will
    need to have about 6 or so of these, so we do not want to setup 6 MP because now you are looking at not only 6 primary site licenses, but 6 SQL installs (Our environment will not let me get away with doing SQL express for support reasons) which adds up quickly.
    Below is a link to exactly what I am speaking about:
    http://blogs.technet.com/b/configurationmgr/archive/2009/04/16/configmgr-2007-primary-site-mp-is-used-for-the-task-sequence-even-when-deploying-osd-images-to-secondary-sites.aspx
    What I am wondering is if SCCM 2012 OSD was structured differently in a way that access to the MP is no longer necessary during the task sequence process (say for example the task sequence xml is replicated to DPs too)?
    Thanks. 

    My apologizes. I was meaning to say Primary, Secondary Sites. Not MPs. I brought this up to give reference to idea about the boundaries that I am going to have to use to prevent these clients from contacting DPs they they can't route to.
    The idea behind getting off the build network and onto a prod is that security requirements from my companies Infosec require that we limit the amount of traffic on production networks. The idea is that the server be built on the build network, disconnected
    and brought into prod. The whole time the MP would be the same, but the DP would switch based on the prod network they were brought into as DP will reside in these prod networks which will get flipped over by the boundary for the prod subnets. Once on the
    prod network they would be able to contact the MP. 
    I would love to do stand-alone media, this is one of the first roads I started looking down as I have done them in the past for offline builds, but I need the machine to auto assign its hostname from a external servers that will script the build. The build
    process we are trying to put into place will be started from an external website. My first thought was to have it add the machines to a collection and add a variable that would be turned into a task sequence variable during the TS and use it for the hostname
    when it attempt to apply the Windows settings. The only way I think I could get this to work would be to write a script that is executed during the task sequence that would match the MAC address of the machine and assign the hostname by calling on another
    share that is written to by the external website with the MAC and hostnames. The only problem that I cannot get around is that this build process needs to be fully automated and this is for both virtual and physical. I have no problems mounting a stand-alone
    build ISO using a script for VMWare, but the problem starts when I look at the physical and limitations of scripting for both iLo and iDRAC for performing this step. iLo can be done, but iDRAC is limited. 
    As for a reverse-proxy I will not be able to look at that. They have specific requirements against using reverse-proxies in only specific situations and this it not allowed. I got turned down on this one. This requirement is created by a federal regulation
    my company has to follow. 

  • Convert an integer value that was created with the Excel DATEVALUE formula to a valid date?

    Hello everyone,
    How can I convert an integer value that was created with the Excel DATEVALUE formula to a valid date in SSIS?
    Is this even possible?
    For example:
    =DATEVALUE("8/22/2008") will format the cell to display 39682.
    Reading the column as a string to get the int value (39682) - how can I turn this into a valid date using SSIS and then importing the real date to sql server?
    Thank you!

    You can use Script component for this and convert your integer values to Date. An example here is following:
    CultureInfo provider = CultureInfo.InvariantCulture;
    string dateString = "08082010";
    string format = "MMddyyyy";
    DateTime result = DateTime.ParseExact(dateString, format, provider);
    Source: http://stackoverflow.com/questions/2441405/converting-8-digit-number-to-datetime-type
    Vikash Kumar Singh || www.singhvikash.in

  • Is there anything that you can do to fix a pdf that was created with the wrong orientation?

    Someone sent me 40-page pdf created from a document with landscape orientation that was output with portrait orientation. The pages are clipped off on the right and left. There is no way that I can see that you can change the orientation in Acrobat Pro and if it is converted into a Word document you can see most of the text, but there is still some missing, especially where there are tables. I don't have access to the original document. I was just curious if there was a way around this?

    Thanks, that is what I figured. Just thought I would ask. Some of the text that was clipped off did appear when the pdf was converted into a word file, but not all of it.
    Mary Jane

  • Is is legal to use Photoshop in India that was bought in the USA?

    We run a photography business, and older versions of Photoshop are cheaper and are available on Amazon and ebay. We need legit copies of the software we run. So we are planning to buy it off ebay or Amazon.
    We will be careful to check the serial number so that we don't get duped. But is it allowed to use Adobe software sold in the US in Inda?
    Thanks
    Richard

    This is confusing.
    Trevor.Dennis wrote:
    ...Give the man a break...
    I'd love an explanation of how I did not give the man a break.
    One can waste $300 on ebay buying a bogus license. And you won't know if you've got a bogus license until you've already paid and are trying to activate.
    Contrary to popular knowledge, one can run a Photography business without Photoshop. There are many free GPL programs that are very competitive to Adobe's products: Darktable, GIMP, RAWTherapee, etc.

  • How can I use my Iphone 5s that was purchased in the US here in the Philippines?

    please let me know

    What do you mean how can you use the phone?  Go out and buy a sim card and put it in the phone to activate it and start using it.

  • Changing Admin user that was created at time of install of OSX to Standard

    I have a Mac with an admin account the one that was created at the time of installing OSX 10.4 and I am trying to change that user to a standard user. I have made another admin and have also another standard user. I evry time I tray to change the admin user and turn off admin rights the box is grayed out.
    What is up with the first user that is created at the time of installing the OS? Is that a user that cannot be changed? How can I change its privileges to standard user?

    I have tested this on a few different Macs. I have found some that I can get the admin right away form the fist Admin the one created at the time of installing the OS. Others I am still puzzled to way I cannot change the fist account to a Standard. In all cases I have 3 accounts 2 admins and one standard. The times that I could change the account I was logged in the standard account.
    Is there a work around to get an admin account to have the same permeations as a standard account when the admin box in users is grayed out?

  • Create Prestaged Media task sequence fail - Failed to mount WIM file (0x80070002) & Failed to create media (0x80070002)

    Hi there
    Experiencing an OSD task sequence failure.
    The failure messages at the end are:
    Failed to mount WIM file (0x80070002)
    Failed to create media (0x80070002)
    Have looked into this, however 0x80070002 appears to be a generic error code which can cover a variety of problems.
    One thing I'm not sure about at all is the CreateTempDirectory process. I'm not sure about this because the Temp Directory it creates is, according to Task32, stored in a cached profile which no longer exists on the machine I'm running the SCCM console from.
    Could this be a problem?
    Looking at the CreateTSmedia.log via task32, these lines are viewable:
    CreateTSMedia
    Requested output path: C:\temp
    CreateTempDirectory
    Temp Directory C:\DOCUME~1\PROFILE~1\LOCALS~1\Temp\_tsmedia_1612 created
    That path cannot exist because that profile is no longer present on the machine - so where exactly is the task sequence storing these temp files??
    Can someone confirm if this Temp Directory path is vital to the task sequence successfully completing or not, and if it IS important how to set the Temp Directory?
    Thank
    John

    Ok, can rule out the issue with Temp Directory path. 
    Uninstalled SCCM admin console, defined new temp and tmp folders in env var, installed SCCM admin console, started another PreStage media job, failed again with same errors.
    Failed to mount WIM file 0x80070002
    Failed to create media 0x80070002
    CreatTSMedia failed with error 0x80070002 details MediaGenerator 
    Can't figure out what 'The system cannot find the file specified' means, the temp files are clearly being created during the media creation process and I have local administrator rights to the machine I am using.
    John

  • I have an ipad mini. From one moment to another a document that was created and used on pages app ( on the ipad mini) does not want to open ( When pressed it states " document cant be opened). How can I make this document open again?

    I have an ipad mini. From one moment to another a document that was created and used on pages app ( on the ipad mini) does not want to open ( When pressed it states " document cant be opened). How can I make this document open again?
    I have tried back ups and  restoring, resetting, and even updating the pages app. And nothing has worked.

    I have an ipad mini. From one moment to another a document that was created and used on pages app ( on the ipad mini) does not want to open ( When pressed it states " document cant be opened). How can I make this document open again?
    I have tried back ups and  restoring, resetting, and even updating the pages app. And nothing has worked.

  • I'm trying an email address i know is mine yet still getting this message:"That Apple ID is already in use.If this Apple ID was created by you, simply sign in with your Apple ID and password.If it does not belong to you, try again using a different name."

    I keep getting this message:  "That Apple ID is already in use.If this Apple ID was created by you, simply sign in with your Apple ID and password.If it does not belong to you, try again using a different name."
    I'm trying to create a new id and e-mail using an e-mail address that is mine and has been mine for over a year - any ideas why this could be happening?

    Trying where? What sort of email address? The following answer is based on a guess as to what you are talking about.
    If you already have an @me.com address, perhaps as a result of having had a MobileMe account, and you are now setting up an iCloud account with an Apple ID you will find you will be asked to create a new @me.com address, and that you can't add your existing one because it is already an Apple ID.
    You can do one of two things:
    1. Sign out at System Preferences; sign in with your existing @me.com address and enable Mail.
    2. Stay signed in with the present ID and add your @me.com address in System Preferences>Mail, Contacts & Calendars.
    If you have further questions, or if your situation is different from what I've assumed, do please post back, but in a suitable forum - this one is specifically about using these Forums.

  • How to get the vendor number that was created using xk01..?

    Suppose i am creating a vendor with all the information by using a bdc program.
    In the same program if i want to go to the XK02 of that particular vendor that was created recently....how it possible..?
    Means how to get that particular vendor number that was created recently...?

    Hi...
    You Can Get the Vendor number after Calling the Transaction 'XK01' as below.
    <b>Declare a table for Collecting messages :</b>
    DATA: T_MSG TYPE TABLE OF BDCMSGCOLL,
              WA_MSG TYPE  BDCMSGCOLL.
    <b>Then Call Transaction Statment:</b>
    CALL TRANSACTION 'XK01'
               USING T_BDCDATA
               MODE 'N'
               MESSAGES INTO t_msg.
    if sy-subrc = 0.
      READ TABLE T_MSG INTO WA_MSG WITH MSGTYP = 'S'.
                                                                    MSGID = 'F2'
                                                                    MSGNR =  '175'.
    <b>Note: Bcoz the XK01 will issue this message</b>
      if sy-subrc = 0.
      write: / WA_MSG-MSGV1.  "This will contrain Vendor Number
    endif.
    endif.
    And you can also Try the Other method i.e. after the Call transaction statement
    <b> GET PARAMETER ID 'LIF' field V_LIFNR.
      WRITE:/ V_LIFNR.</b>
    Reward if Helpful.

  • Why do vector lines appear different in my Photoshop document compared to the PDF that was created using "Scripts Layer Comps to PDF"? And how do I get them to look the same?

    Why do vector lines appear different in my Photoshop document compared to the PDF that was created using "Scripts > Layer Comps to PDF"? And how do I get them to look the same?

    BOILERPLATE TEXT:
    If you give complete and detailed information about your setup and the issue at hand, such as your platform (Mac or Win), exact versions of your OS, of Photoshop and of Bridge, machine specs, what troubleshooting steps you have taken so far, what error message(s) you receive, if having issues opening raw files also the exact camera make and model that generated them, etc., someone may be able to help you.
    Please read this FAQ for advice on how to ask your questions correctly for quicker and better answers:
    http://forums.adobe.com/thread/419981?tstart=0
    Thanks!

  • I have a file that was created in FH 11 and I am using same version.Originator opens file and everything is fine and also earlier version opens it fine.when I open it the links shift 1/8" up and left.Has anybody had this happen to them

    I have a file that was created in FH 11 and I am using same version.Originator opens this file and everything is fine and also an earlier version opens it fine.When I open it it shifts the links 1/8" up and to the left.Has anybody ever had this happen to them?

    What file format(s) are the "links"?
    If raster images, do they contain clipping paths or transparency?
    What is your platform and OS?
    Were the FH documents created on the same platform (Mac or PC) as the one you are currently using?
    Were the linked files created on the same platform (Mac or PC) as the one you are currently using?
    Can you reproduce the problem with a newly created document and the same linked images?
    There was once an issue with transparent 1-bit TIFF images shifting, but I believe that was in a previous version of FH.

  • Issue with using a form saved in ES3 that was created in ES2

    I have a base doc form that was created using ES2 designer.  This file is stitched together with several other documents to create a application pdf.  The file contains javascript, etc.  Everything works correctly when I run the process that stitches the documents together.  When I open the file in ES3 and save it and check it in, the process no longer works.  I get a unable to stich document error.  Any ideas?

    not really, someone else mentioned that it could be done and they said they saw it before.  I've been beating myself up for a while trying to figure out how to get it to happen.   Is there an easy way to get the content of the pdf form into an email body with plain text when pressing a submit by email button?
    Such as...
    <label name>: <txtfield content>
    First name:  <txtfield content>
    ...etc..

Maybe you are looking for

  • Schedule a report with the system date imbeded in the file name

    Hello, Could anyone tell me how I can schedule a crystal report with the system date imbedded in the file name (FileNameYYYYMMDD) through BOE?  When I scheduled the report through BOE, I gave a file name and selected Attach Date Time, but the file na

  • Exchange rate difference not going to the correct GL account

    Hello, In the transaction OB09, I have given the GL account 702000 for exchange rate difference realized loss and gain. I have also maintained the exchange rates in the transaction OB08. In transaction F-44(clear vendor), I give the foreign curreny(E

  • AV Cables Hooked Up - No Output at all

    I don't have any videos on my ipod so I cannot try video output, but when I hook my Ipod up with A/V cables through the 3.5mm jack, I get no output onto my television at all. Yes, my tv is on the right input, and yes I have tried multiple televisions

  • 3G Nano.... Screen went white and now no longer able to turn it on

    Same as some others... Received 3G Nano for xmas. Everything was fine on xmas. Today, I connect it to iTunes and it said my Nano software was out of date. I upgraded it. Everything seemed ok for a while. I then started watching a movie I downloaded f

  • Isopropyl Alcohol got under the screen, should I replace it?

    I was cleaning my commuter yesterday with Isopropyl Alcohol as one of my mom's co-wokers said it was the way to clean he screen. After this happened I read that constant contact causes an LCD screen to become brittle to the extent it cracks. When sho