Script to automatically enter document metadata

I need to enter document info as metadata into all of my Indesign documents as they are posted on the web as pdf docs so I wanted a script that would automaticaly enter the data once the document has been saved. I only need 3 fields to be filled.
My document is saved as "1234.1234 Document Name_D1" and the 3 fields I need are:
Document Title: only the wording after the code and before the underscore "Document Name"
Author: Is always "Company Name"
Keywords: only the "1234.1234" before the doc name
I'm not sure if this is at all possible so if it can be done automatically using only the whole document name then I'll take that instead.
Thanks,

Dear RinaPatch,
Can you please try the below JS code? May be it will help to you.
var myDocument = app.activeDocument;
with (myDocument.metadataPreferences){
    author = "Adobe";
    copyrightInfoURL = "http://www.adobe.com";
    copyrightNotice = "This document is copyrighted.";
    copyrightStatus = CopyrightStatus.yes;
    description = "Example of xmp metadata scripting in InDesign CS";
    documentTitle = "XMP Example";
    jobName = "XMP_Example_2003";
    keywords = ["animal", "mineral", "vegetable"];
    var myNewContainer = createContainerItem("http://ns.adobe.com/xap/1.0/", "email");
    setProperty("http://ns.adobe.com/xap/1.0/", "email/*[1]", "[email protected]");
Otherwise, please provide the details clearly.
thx,
csm_phil

Similar Messages

  • Scripts to insert metadata automatically to document with paragraph style

    Hello,
    I am trying to find a way to automatically insert  metadata into my document through paragraph style in indesign cs5.5.
    This will be myDocument title, the Author name and myDocument description.
    Is there anyone who can help me with this project?
    Thanks.

    Place the script in the following location: C:\Program Files\Adobe\Adobe InDesign CS6\Scripts\startup scripts
    If you close the document the script will automatically put the metadata in your indesign file (use ctrl+w or menu -> file -> close option to close the file)
    Code:
    #targetengine session
    //if you want to test the script for your active document, comment the below line else copy the script in your startup folder
    app.menuActions.itemByName("Close").eventListeners.add("beforeInvoke", function()
    var myDoc = app.activeDocument;
    var docTitleText="";
    var docDescripText="";
    app.findGrepPreferences = app.changeGrepPreferences = null;
    app.findGrepPreferences.findWhat = '.+';
    found = app.activeDocument.findGrep (true);
    for (j = found.length-1; j >=0 ; j--)
        var foundText = found[j].contents;
        //You can define multiple Paragraph style for Document Title
        if(found[j].texts[0].appliedParagraphStyle.name=="docTitle1")
            docTitleText=found[j].contents;
        else if(found[j].texts[0].appliedParagraphStyle.name=="docTitle2")
            docTitleText=docTitleText + " " + found[j].contents;
        else if(found[j].texts[0].appliedParagraphStyle.name=="docTitle3")
            docTitleText=docTitleText + " " + found[j].contents;
        //You can define multiple Paragraph style for Document Description
        else if(found[j].texts[0].appliedParagraphStyle.name=="docDescription1")
            docDescripText=found[j].contents;
        else if(found[j].texts[0].appliedParagraphStyle.name=="docDescription2")
            docDescripText=docDescripText + " " + found[j].contents;
        else if(found[j].texts[0].appliedParagraphStyle.name=="docDescription3")
            docDescripText=docDescripText + " " + found[j].contents;
    with (myDoc.metadataPreferences){
        author = "My Name";
        documentTitle = docTitleText;
        description = docDescripText;
    Vandy

  • Document Metadata stored as default when I upload the document again

    I uploaded a specific document specifying metadata for it, in a library ages ago, but was not ready and deleted it. Now the document is ready for upload  again, but when I upload it, it shows metadata before I even enter any. Is like remembering what
    I put the first time and automatically put them again. Why does this happen? how can I clear the "document cache"? (I don't know how else to call it)

    hello
    yes, for Office documents metadata is stored both in Sharepoint content database and inside files. It is possible to delete this metadata from files:
    Remove Sharepoint metadata from MS Office documents.
    Blog - http://sadomovalex.blogspot.com
    Dynamic CAML queries via C# - http://camlex.codeplex.com

  • How do I create a text field that automatically enters the same info on proceeding pages

    I know this is a basic question for Acrobat Pro, but I'm a newbie at it.  Basically, I work with pdf forms in education and I would like to figure out a way where if I enter for example someone's birthdate in page 1, and it automatically enters it in pages 2, 3, 4 and so on of the same document.
    Also, along the same lines, is there an easy way to be able to edit multiple pages of a document at once. Example: A lot of the people at my office that use the copy and paste feature in the pdf documents, and often overlook changing the "he" to a "she" and "his" to a "her" and as a result we end up with filled forms that use the incorrect sex.
    I apologize in advance if I'm not being very clear, but is the best way I can describe my problem.
    Thanks

    1. You can duplicate the field. Right-click it using the Select Object Tool and select Duplicate. You can then select the page range.
    Otherwise, you can copy&paste it, or create a new field and give it the same name as the original.
    2. No.

  • VBA script for automatically indexing topics

    A big disadvantage with InDesign's indexing system is that you cannot automatically index all occurences of topics currently in the index.
    Instead, you have to find an occurence of each topic in the document itself and go to the Index menus and then click New Page Reference...Add All, for each index topic individually.
    To get around this, I have been trying to produce a VBA script to automatically index all occurrences in a document of the topics currently in the document index.
    I have been using the MS Excel VBA development environment but find the definitions of the object model in the Excel VBA browser rather inadequate and ambiguous .
    Is there a more thorough reference work for these?
    The plan was to start by taking each individual topic in the index which I tried to access with something along the lines of:
    MyDocument.Index.Topic(1)
    This hasn't worked.
    The plan then was to take each index topic and use it to find an occurence in the document of that topic and then use that occurence to invoke the New Page Reference...Add All option to index all occcurences of that selected term, using something like:
    MyDocument.PageReferences.Add
    Again, without success.
    Any guidance or suggestions would be appreciated.

    Dear Peter,
    Many thanks for your posting, that was very helpful.
    This is the state of the script so far (I have added a large number of MsgBox entries - these aren't needed, they are just for debugging purposes during development):
    'VBA script which tries to work through all of the topics in the index and automatically index each occurence of them in the current text frame:
    main
    Function main()
    Set MyInDesign = CreateObject("InDesign.Application.CS4")
    If MyInDesign.Documents.Count > 0 Then
        Set MyDocument = MyInDesign.ActiveDocument
        Set MyPage = MyDocument.Pages.Item(1)
        Set MyTextFrame = MyPage.TextFrames.Item(1)
        Set MyStory = MyTextFrame.ParentStory
        Set MyIndex = MyDocument.Indexes(1)
        Set MyTopics = MyIndex.AllTopics
        MyIndexesCount = MyDocument.Indexes.Count
        MsgBox "Current indexes Count: " & MyIndexesCount
        MyIndexTopicsCount = MyTopics.Count
        MsgBox "Current index topics Count: " & MyIndexTopicsCount
        For i = 1 To MyTopics.Count Step 1 'work through the topics
    MyIndexTerm=MyTopics(i)
    MsgBox "Current indexes Topic: " & MyIndexTerm
    'search for MyIndexTerm :
            'Clear Find preferences:
            MyInDesign.FindTextPreferences = idNothingEnum.idNothing
            'Set up search paramaters:
            If MyIndexTerm <> "" Then
                MyInDesign.FindTextPreferences.FindWhat = MyIndexTerm
                'Set search options:
                MyInDesign.FindChangeTextOptions.CaseSensitive = False
                MyInDesign.FindChangeTextOptions.IncludeFootnotes = False
                MyInDesign.FindChangeTextOptions.IncludeHiddenLayers = False
                MyInDesign.FindChangeTextOptions.IncludeLockedLayersForFind = False
                MyInDesign.FindChangeTextOptions.IncludeLockedStoriesForFind = False
                MyInDesign.FindChangeTextOptions.IncludeMasterPages = False
                MyInDesign.FindChangeTextOptions.WholeWord = False
                'Search for the string:
                Set MyFoundItems = MyDocument.FindText 'this ought to be limited to the Story, not the Document eg MyStory
             MsgBox "Found index terms:" & MyFoundItems.Count
                For j = MyFoundItems.Count To 1 Step -1
                   MyTopics(i).PageReferences.Add MyFoundItems(j)
                Next
               'Clear preference:
                MyInDesign.FindTextPreferences = idNothingEnum.idNothing
                'Having found it, add page reference:
             'MyDocument.PageReferences.Add
            Else
                MsgBox "No search term specified"
            End If
    Response=MsgBox ("Continue?", vbYesNo)
    If Response = vbNo then
      Exit For
    End If
       Next
    'Set up Index options:
    MyIndex.IndexOptions.Title = "Index"
    MyIndex.IndexOptions(1).TitleStyle="Chapter Head"
    MyIndex.IndexOptions(1).ReplaceExistingIndex = True
    'Generate the index:
    MyIndex.Generate
    Else
        MsgBox ("Please open a document, select an object, and try again.")
    End If
    End Function
    There are a couple of problem areas still:
    1. Index terms appear to be added irrespective of whether or not that particular page reference already exists in the index.
    This can result in duplicate page references under each topic - especially if the script is run several times.
    Is there any way of avoiding these duplicate references?
    2. I haven't yet suceeded in getting the script to generate the index - so far I've had to do it manually after the script has run.
    The problem lies somewhere in the code to set up the index options and then generate the index.
    3. It might be useful to be able to limit the indexing to the curent story rather than the whole document - but I haven't yet got it to do that.
    Best wishes.

  • Material enter document

    What is Material enter document? What lnformation does it contain?

    Dear hansika
    When posting a goods movement in the SAP System, the following documents are created:
    Material document
    In the Inventory Management system, when a goods movement is posted, a material document is generated that serves as proof of the movement and as a source of information for any applications that follow.
    A material document consists of a header and at least one item. The header contains general data about the movement (for example, its date). Each item describes one movement.
    Accounting document
    If the movement is relevant for Financial Accounting (that is, if it leads to an update of the G/L accounts), an accounting document is created parallel to the material document.
    In some cases, several accounting documents are created for a single material document. This might be the case, for example, if you have two material document items with different plants that belong to different company codes.
    The G/L accounts involved in a goods movement are updated through an automatic account assignment.
    For goods receipts for purchase orders, goods movements for stock transport orders and consignment withdrawals, business partners may have different local currencies. Therefore, as well as the local currency, the accounting document must also contain another currency for processing and postings. For this purpose, accounting documents created as a result of these goods movements will automatically be managed in the local currency and in the document currency. You can switch between both currencies by choosing Settings --> Currency display.
    thanks
    G. Lakshmipathi

  • Why does iPhone automatically enter my entire email address when I simply type "gmail" and how to I turn it off?

    Why does my iPhone automatically enter my entire email address when I simply type "gmail" and how to I turn it off?  It also does it whenever I type it in Safari (but not Chrome) and it only does it with one of my email addresses and not any of my other ones (i.e., yahoo, hotmail, etc.). 
    Thanks so much for your help!

    I don't see visible underscores in that login form, but they appear to be entered (that form isn't high enough to show them for me).
    You can verify that in the Scratchpad and use Execute > Display after pasting the below posted code.
    * Firefox/Tools > Web Developer > Scratchpad (Shift+F4)
    <pre><nowiki>document.getElementById("userid").value;</nowiki></pre>

  • I cannot get my e-mail to automatically enter addresses in the "TO:" box. In the past, I would get a list of e-mail recipients to appear when I typed 1 letter. That function no longer works. Do I need to change a setting or what?

    I cannot get my e-mail to automatically enter addresses in the "TO:" box. In the past, I would get a list of e-mail recipients to appear when I typed 1 letter. That function no longer works. Do I need to change a setting or what?

    Settings > Store > Sign Out.
    Sign in with the correct ID.

  • Automatic billing document creation upon saving credit memo request.

    Hi,
    I have a requirment where in :
    When a Credit Memo Request is created(va01) and upon saving the credit memo request an automatic billing document needs to be genereated i.e Credit Memo.
    How can this be achieved.
    Thanks

    Hi Keni
    If a Credit Memo Request is created and after saving the Credit Memo Request  , automatic billing should happen means you should maintain a new sub-routine and assign in the copy control VTFA . In that sub-routine maintain a logic that once the Credit Memo Request is saved automatic billing should happen
    Regards
    Srinath

  • Using script to automatically arrange timeline and sceneline workspaces.

    This is a simple demonstration of using VB Script to adjust panels in PE3.
    In PE3, when you adjust the height of the timeline, the height of the sceneline is also adjusted the same amount, and vice versa. You could use script to automatically adjust the height of the sceneline or the timeline whenever you switch respective modes. The script below does that.
    This is for those who are familiar with script writing and the Windows Script Host. The vb script below includes properties and methods from the AutoItX library (free download).
    Option Explicit
    Dim oAutoit, strWinText, strLastTime, lngX, lngY
    Set oAutoIt = WScript.CreateObject("AutoItX3.Control")
    oAutoit.WinWaitActive "Adobe Premiere Elements -"
    strLastTime = "start"
    Do
    ' Quit the script if mousepointer put in upper left corner (0,0).
    lngX = oAutoIt.MouseGetPosX
    lngY = oAutoIt.MouseGetPosY
    if lngX = 0 and lngY = 0 then
    set oAutoIt = nothing
    Wscript.Echo "Your script has ended."
    Wscript.Quit
    end if
    ' Read the text of the window so we can determine the workspace setup.
    strWinText = oAutoIt.WinGetText("Adobe Premiere Elements -")
    ' If DVD Menu tab selected, then don't do anything, otherwise
    ' check if in Sceneline or Timeline mode.
    if instr(strWinText, "DVD Menu") = 0 then
    if instr(strWinText,"EditTimeControl") <> 0 then
    if strLastTime <> "timeline" then
    ' Reset the Edit Workspace and then adjust the timeline panel height
    oAutoit.Send "{alt}wke"
    oAutoit.Sleep 250
    oAutoit.MouseMove 1078, 646
    oAutoit.MouseDown "left"
    oAutoit.MouseMove 1078,400
    oAutoit.MouseUp "left"
    strLastTime = "timeline"
    end if
    else
    if strLastTime <> "sceneline" then
    ' Reset the Edit Workspace and then adjust the sceneline panel height.
    oAutoit.Send "{alt}wke"
    oAutoit.Sleep 250
    oAutoit.MouseMove 1078, 646
    oAutoit.MouseDown "left"
    oAutoit.MouseMove 1078,762
    oAutoit.MouseUp "left"
    strLastTime = "sceneline"
    end if
    end if
    end if
    WScript.Sleep 2000
    loop
    The script might work as-is if your screen is set for 1280 x 1024 and the Premiere Elements 3 window is maximized. Save the script in a text file with a .VBS extension, and then run it. Afterwards click on the Sceneline or Timeline buttons in PE3. It may take up to 2 seconds before the mouse starts moving on it's own. The screen coordinates were ascertained using the AutoIt Info tool.

    You shouldn't make assumptions about what the names of the volumes are - both the Finder and System Events have terminology to determine if a disk is the startup volume (or a local volume, for that matter), for example:
    tell application "System Events"
      repeat with someDisk in (get disks whose startup is false and local volume is true)
        set someDisk to POSIX path of someDisk
        do shell script "diskutil umount " & quoted form of someDisk & " &> /dev/null &"
      end repeat
    end tell
    Note that if you are unmounting a disk from a standard account you will be prompted for administrator authentication.

  • Script to automate the display language on windows server

    Hi,
    I'm looking for a script which should change the windows display language from non-english to english (vizversa).
    Here is the scenario:
    On windows server 2008 R2 I have two language installed - Japanese and English with the help of MUI packs available on microsoft site. The native language of windows server 2008 R2 is Japanese. Consider there are 10 sys admins only knows
    Japanese but not english. Similarly there are 10 sys admins knowing only English. I  being english administrator, i should each time go to regional setting in the control panel and click on change display language to english. After
    I finish my task I need to set back the language to japanese(native).
    I'm looking for script which can auotmate this process.
    Objective:
    The script should automatical change the language to Japanese when I logoff from the system. 
    Here is the steps to reach "Change Display language" on windows server 2008
    Go to control Panel > Category view (on right side top ) > System and Security > Clock ,Language and Region > Under “Regional Language” > Change display
    language > Go to Tab “Keyboards and Languages” > Look for the dropdown menu “Choose a display language” and choose the appropriate language you prefer from the dropdown list
    Kindly note this menu/option is available for Vista,Windows 7 and Windows Server 2008. This option is also available on Windows XP/Server 2000/2003 provided the LIP/MUI is installed.
    Thanks
    Ezakial

    Hi,
    I'm looking for a script which should change the windows display language from non-english to english (vizversa).
    Here is the scenario:
    On windows server 2008 R2 I have two language installed - Japanese and English...
    Thanks
    Ezakial
    Guys,
    Forgive me, but I think you are making this far too complicated. Using a script to achieve this is, in my view the wrong tool, and a little dangerous. If your logoff script fails to run for any reason, 11 Japanese sysadmins will be waving Samurai swords
    at you :-).
    There is a single Group Policy setting that will do exactly what you want on Vista, W7, W2K8 & R2.
    Create a new Group Policy object ("English_interface", for example.
    Edit the new policy object
    Drill down to "User Configuration, Policies, Administrative Templates, Control Panel, Regional and Language Options"
    Pick the setting "Restricts the UI languages Windows should use for the selected user" and Enable it.
    Drop down the "Restrict users to the following language" and pick "English"
    Click "OK"
    Link your new GPO somewhere in the OU hierarchy that contains the English user
    If other (Japanese?) users are also in the same container, you can filter application of the GPO by security group so that the policy can only be read and applied by the English group.
    That's all you need to do!
    As a point of principle. I ALWAYS install my OS in US English then add languages, and set the locals to use their own language. This is because service packs and hotfixes invariably arrive for US English first, and some hot fixes are NEVER translated.
    I'm just doing this for a single W7 build in English, to be deployed in 6 countries, with 7 different languages and 9 different keyboard layouts. Fun...
    Come back if you need more help. I volunteer to visit and help if you want!
    Richard
    MCSE, MCITP, MCT etc.
    Switzerland
    RS

  • Powershell Script to create "custom" Document Library

    I have a powershell script which creates a Document Library for every user in AD.
    This works, but rather than using the default Document Library I want it use a custom Document Library.  However this isnt working.
    My script to create the default Document Library is this...
    [System.Reflection.Assembly]::Load("Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c")
    $site = new-object Microsoft.SharePoint.SPSite("http://servername/sitename");
    $siteweb = $site.OpenWeb();
    $webs = $siteweb.Webs;
    $strFilter = "(&(objectCategory=User)(name=accountname))"
    $objDomain = New-Object System.DirectoryServices.DirectoryEntry
    $objSearcher = New-Object System.DirectoryServices.DirectorySearcher
    $objSearcher.SearchRoot = $objDomain
    $objSearcher.PageSize = 1000
    $objSearcher.Filter = $strFilter
    $objSearcher.SearchScope = "Subtree"
    $colProplist = "samaccountname"
    foreach ($i in $colPropList){$objSearcher.PropertiesToLoad.Add($i)}
    $colResults = $objSearcher.FindAll()
    foreach ($objResult in $colResults)
    $objItem = $objResult.Properties; $objItem.samaccountname
    $listTemplate = [Microsoft.SharePoint.SPListTemplateType]::DocumentLibrary
    $listId = $siteweb.Lists.Add($objItem.samaccountname, "", $listtemplate);
    $list = $siteweb.Lists.GetList($listId, $true);
    $roleDef = $siteweb.RoleDefinitions.GetByType("Contributor");
    $user = "domain\" + $objItem.samaccountname;
    $rolAssign = new-object Microsoft.SharePoint.SPRoleAssignment($user, "email", "name", "notes");
    $rolAssign.RoleDefinitionBindings.Add($roleDef);
    if(!$list.HasUniqueRoleAssignments)
    {$list.BreakRoleInheritance($true);}
    for ($i = $list.roleAssignments.Count - 1; $i -gt -1; $i--)
    { $list.RoleAssignments.Remove($i) }
    $list.RoleAssignments.Add($rolAssign);
    $list.Update();
    Now I have a custom Document Library named "TESTLIB" so if I substitute the line:
    $listTemplate = [Microsoft.SharePoint.SPListTemplateType]::DocumentLibrary
    with
    $listTemplate = [Microsoft.SharePoint.SPListTemplateType]::TESTLIB
    Then it errors with this...
    How can I script powershell to create a "custom" Document Library?
    Thanks

    The below link should help you in creating custom document library using powershell
    http://blogs.technet.com/b/heyscriptingguy/archive/2010/09/23/use-powershell-cmdlets-to-manage-sharepoint-document-libraries.aspx
    Vinod H
    Thanks for the link but I cant see anything to assist creating a custom library?  Was there something in paticular you saw?

  • How to place tif file through a script in an indesign document?

    how to place tif file through a script in an indesign document?

    Emanuele:
    it works if i just run a script....
    but since i have been using a gui to do some functions, this  place command is not able to place the output tif file back into the  document

  • With Forms Central can I set up a form to send out an automatic PDF document like a quote?

    With Forms Central can I set up a form to send out an automatic PDF document like a quote? In other words when my customer fills out the form and puts their email address on the form it automatically sends them a PDF quote on a piece of merchandise that I have. If not is Form Central compatible with Web Merge?

    Hi;
    At this time FormsCentral does not have the ability to send the PDF in the "Email Reciept", you can set up Email Reciepts to send the form filler a reciept with the form data, but it does not attach a PDF of the form. 
    FormsCentral is not compatible with Web Merge.
    Thanks,
    Josh

  • Using a script to automate UNC definition updates for FEP 2010

    Hi all,
    I tested the script mentioned in this article
    http://blogs.technet.com/b/clientsecurity/archive/2010/09/16/using-a-script-to-automate-unc-definition-updates.aspx with no success. I am getting the following error:
    Line: 11
    Char: 5
    Error: The operation timed out
    Code: 80072EE2
    Source: WinHttp.WinHttpRequest
    the script content is as follows:
    strMSEx86URL = "http://go.microsoft.com/fwlink/?LinkID=121721&clcid=0x409&arch=x86"
    strMSEx86Location = "D:\defs\Updates\x86\mpam-fe.exe" 
    strNISX86URL = "http://go.microsoft.com/fwlink/?LinkId=197095" 
    strNISX86Location = "D:\defs\Updates\x86\nis_full.exe" 
    strMSEx64URL = "http://go.microsoft.com/fwlink/?LinkID=121721&clcid=0x409&arch=x64" 
    strMSEx64Location = "D:\defs\Updates\x64\mpam-fe.exe" 
    strNISX64URL = "http://go.microsoft.com/fwlink/?LinkId=197094" 
    strNISX64Location = "D:\defs\Updates\x64\nis_full.exe"
    Set objWINHTTP = CreateObject("WinHttp.WinHttpRequest.5.1")  
        objWINHTTP.open "GET", strMSEx86URL, false  
        objWINHTTP.send
    If objWINHTTP.Status = 200 Then
    Set objADOStream = CreateObject("ADODB.Stream")
       objADOStream.Open
      objADOStream.Type = 1 'adTypeBinary
    objADOStream.Write objWINHTTP.ResponseBody
    objADOStream.Position = 0 'Set the stream position to the Start
    Set objFSO = Createobject("Scripting.FileSystemObject") 
        'check if file exists if so delete 
        If objFSO.Fileexists(strMSEx86Location) Then objFSO.DeleteFile strMSEx86Location
    objADOStream.SaveToFile strMSEx86Location 
    objADOStream.Close
    end if
    Anybody can help?

    This is the script that I use and it works:
    strMSEx86URL = "http://go.microsoft.com/fwlink/?LinkID=121721&clcid=0x409&arch=x86" 
    strMSEx86Location = "C:\defs\Updates\x86\mpam-fe.exe" 
    strNISX86URL = "http://download.microsoft.com/download/DefinitionUpdates/x86/nis_full.exe" 
    strNISX86Location = "C:\defs\Updates\x86\nis_full.exe" 
    strMSEx64URL = "http://go.microsoft.com/fwlink/?LinkID=121721&clcid=0x409&arch=x64" 
    strMSEx64Location = "C:\defs\Updates\x64\mpam-fe.exe" 
    strNISX64URL = "http://download.microsoft.com/download/DefinitionUpdates/amd64/nis_full.exe" 
    strNISX64Location = "C:\defs\Updates\x64\nis_full.exe"
    Set objWINHTTP = CreateObject("WinHttp.WinHttpRequest.5.1")  
        objWINHTTP.open "GET", strMSEx86URL, false  
        objWINHTTP.send
    If objWINHTTP.Status = 200 Then 
    Set objADOStream = CreateObject("ADODB.Stream") 
        objADOStream.Open 
        objADOStream.Type = 1 'adTypeBinary 
        objADOStream.Write objWINHTTP.ResponseBody 
        objADOStream.Position = 0 'Set the stream position to
    Set objFSO = Createobject("Scripting.FileSystemObject") 
        'check if file exists if so delete 
        If objFSO.Fileexists(strMSEx86Location) Then objFSO.DeleteFile(strMSEx86Location)
    objADOStream.SaveToFile strMSEx86Location 
    objADOStream.Close
    End IF
    Set objWINHTTP = CreateObject("WinHttp.WinHttpRequest.5.1")  
        objWINHTTP.open "GET", strNISx86URL, false  
        objWINHTTP.send
    If objWINHTTP.Status = 200 Then 
    Set objADOStream = CreateObject("ADODB.Stream") 
        objADOStream.Open 
        objADOStream.Type = 1 'adTypeBinary 
        objADOStream.Write objWINHTTP.ResponseBody 
        objADOStream.Position = 0 'Set the stream position to
    Set objFSO = Createobject("Scripting.FileSystemObject") 
        'check if file exists if so delete 
        If objFSO.Fileexists(strNISx86Location) Then objFSO.DeleteFile (strNISx86Location)
    objADOStream.SaveToFile strNISx86Location 
    objADOStream.Close
    END IF
    Set objWINHTTP = CreateObject("WinHttp.WinHttpRequest.5.1")  
        objWINHTTP.open "GET", strNISx64URL, false  
        objWINHTTP.send
    If objWINHTTP.Status = 200 Then 
    Set objADOStream = CreateObject("ADODB.Stream") 
        objADOStream.Open 
        objADOStream.Type = 1 'adTypeBinary 
        objADOStream.Write objWINHTTP.ResponseBody 
        objADOStream.Position = 0 'Set the stream position to
    Set objFSO = Createobject("Scripting.FileSystemObject") 
        'check if file exists if so delete 
        If objFSO.Fileexists(strNISx64Location) Then objFSO.DeleteFile (strNISx64Location)
    objADOStream.SaveToFile strNISx64Location 
    objADOStream.Close
    END IF
    Set objWINHTTP = CreateObject("WinHttp.WinHttpRequest.5.1")  
        objWINHTTP.open "GET", strMSEx64URL, false  
        objWINHTTP.send
    If objWINHTTP.Status = 200 Then 
    Set objADOStream = CreateObject("ADODB.Stream") 
        objADOStream.Open 
        objADOStream.Type = 1 'adTypeBinary 
        objADOStream.Write objWINHTTP.ResponseBody 
        objADOStream.Position = 0 'Set the stream position to
    Set objFSO = Createobject("Scripting.FileSystemObject") 
        'check if file exists if so delete 
        If objFSO.Fileexists(strMSEx64Location) Then objFSO.DeleteFile(strMSEx64Location)
    objADOStream.SaveToFile strMSEx64Location 
    objADOStream.Close
    END IF

Maybe you are looking for

  • Screencapture is no longer working in 10.9.2

    I have updated to 10.9.2 and looks like it has broken my image uploading script.  It starts with a shell command: > screencapture -i /tmp/last_screen.png It should take a picture of selected area. It works well when I type it in console, or when I pr

  • Why don't I receive notifications of anything from Adobe?

    I am set to receive forum notifications. I have nothing from Adobe in junk or trash. I receive nothing. It would be an incredible help if I could actually see the responses I get to questions in a timely manner, but I can't check into Adobe many, man

  • How do get outlined fonts to show up in a PDF

    I have created a document in InDesign CS4 using a placed Illustrator CS4 file that includes a logo created with outlined fonts. I get the warningj message "The preset specifies that some fonts are not embedded. This application always imbeds fonts."

  • Trouble accessing SDM

    A few days ago, the SDM was up and working. However, I was having trouble getting the router to connect to a TFTP server, so I used the SDM to upload a config file to the router. The result was all the data on the flash card becoming corrupted. So I

  • Timeline Freezing when right Click

    Hi, I was working on a simple project on Premiere CS4 and it included 3 movie clips and audio. Everytime I right click a movie clip on the timeline attempting to copy and paste the whole program would freeze on me. Luckily I saved the project prior t