How can i specify current directory path of wsusscn2.cab

SCRIPT:
How can i set current directory file path of wsusscn2.cab where i placed this vbscript, instead of going to c:\wsusscn2.cab.
=======================================================================
Dim fso
Set wshNetwork = CreateObject("WScript.Network")
strUser = wshNetwork.Username
Set fso = WScript.CreateObject("Scripting.Filesystemobject")
Set f = fso.CreateTextFile(".\Missing Patch Details\" & wshNetwork.ComputerName & "_missing_patches.csv", 2)
Set UpdateSession = CreateObject("Microsoft.Update.Session")
Set UpdateServiceManager = CreateObject("Microsoft.Update.ServiceManager")
Set UpdateService = UpdateServiceManager.AddScanPackageService("Offline Sync Service", "c:\wsusscn2.cab")
Set UpdateSearcher = UpdateSession.CreateUpdateSearcher()
WScript.Echo "Searching for updates..." & vbCRLF
UpdateSearcher.ServerSelection = 3 ' ssOthers
UpdateSearcher.ServiceID = UpdateService.ServiceID
Set SearchResult = UpdateSearcher.Search("IsInstalled=0")
Set Updates = SearchResult.Updates
If searchResult.Updates.Count = 0 Then
    WScript.Echo "There are no applicable updates."
    WScript.Quit
End If
WScript.Echo "List of applicable items on the machine when using wssuscan.cab:" & vbCRLF
For I = 0 to searchResult.Updates.Count-1
    Set update = searchResult.Updates.Item(I)
f.WriteLine update.Title
'WScript.Echo I + 1 & "> " & update.Title
Next
WScript.Quit
==========================================================================
prakash

Just remove the c:\ and it will be looked for in the current directory.
If you want the script how get the script path and remove the file name or use the shell
currentFolder = CreateObject("WScript.Shell").CurrentDirectory
¯\_(ツ)_/¯

Similar Messages

  • How can I specify an area path for the work item created on build failure?

    In our department we are working with multiple build definitions for different parts of one Team project. We heavily use the Team Project feature. Teams are defined by area path nodes, so each team can only see it's area path. No one (except the admins)
    can see the root project node.
    When a build breaks, TFS generates a Bug. Unfortunately, this bug is assigned to the area path root node, so nobody can see the generated bug and act on it.
    We would prefer to specify the area path for the generated work item in the build definition (not template, but property of a build definition), as every build belongs exclusively to one team.
    I have found that you can populate fields of the generated work item by filling the "custom fields" of the "create work item" activity. But how do I set the area path as a parameter?
    Guenter

    Hi Cuenter, 
    Thanks for your post.
    You should set the value like below in that activity:
    New
    Dictionary(Of
    String,
    String)
    From {{"Area
    Path",
    "teamprojectname\areaname"}}
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How can I check for directory creation?

    Hi,
    I want to check whether I can create a directory at a particular location.
    Let's say at c:\windows, can create a directory called c:\windows\mydir. But I won't be knowing the parent location (i.e., c:\windows here) at compile time.
    And I would also like to check for creating a directory like c:\windows\mydir1\mydir2 (mydir1 may not even exist).
    What I was doing was, I created the file object for my new directory (i.e., mydir here) and used the canWrite() method on the parent directory. But this method worked only when the parent directory existed. But how can check for a directory path like c:\windows\mydir1\mydir2 where I have to create both mydir1 for mydir2.
    Is there any other methods that I can use to perform this kind of a check.
    Thank you

    I finally figured out a workaround, but i don't know whether this is a good way of checking. :)
    import java.io.File;
    public class TryMKDIRs {
         public static void main(String[] args) {
              File file = new File("c:\\mydir1\\mydir2\\mydir3");
              boolean canICreateDir = false;
              if(false == (canICreateDir = file.canWrite())) {
                   System.out.println(file.getAbsoluteFile() + " cannot be created.");
                   File fileparent = file.getParentFile();
                   while(fileparent != null && (canICreateDir = fileparent.canWrite()) == false) {
                        System.out.println(fileparent.getAbsoluteFile() + " cannot be created.");
                        fileparent = fileparent.getParentFile();
              if(canICreateDir) {
                   file.mkdirs();
                   System.out.println("Directory can be created. . .");
    }

  • How can I specify an SFTP directory path that has spaces in it?

    The directory (path) on my SFTP server has spaces in some of the folder names: e.g. /data/Cisco Products/UC Applications/
    How can I specify this path in the directory field of a remote server definition if I want to upload files from my SFTP server to the CUCM?
    I've tried surrounding the whole path in quotes, %, *, backslash space, point, hash...running out of things to try. Must be possible...surely?!#
    Thank-you
    -Rob.

    I haven't tried this but when i hit tab to auto complete on a linux machine i notice a space and backslash between two words. I can see you tried backslash space. Try space backspace - <word><space><backslash><word>

  • How can I specify the path in Form Builder 9.0

    Hi, everyone,
    could anybody tell me how can I specify the path in Form Buidler 9.0? there is problems when I want to attach library in form builder. thanks to Kuldeep RAwat and Natalia Vidal, I know I should specify the path, but I still don't know how to specify, how can I do?
    besides, when I run a form, sometime there will be a warnig:
    Please acknowledge message
    what's that meaning?
    thank you very much for your great help

    Shay Shmeltzer thank you very much for your so quickly response. I have modified the file and my form can run now!
    but, when I open my form, it always suggest me:
    FRM-10102: Cannot attach PL/SQL library TalbotStandard. This library attachment will be lost if the module is saved.
    so everytime I open my form, I must attach the library manully. I don't know the reason. do you know that or anybody else knows that? thank you very much!
    have a good weekend :-)

  • How can i specify username/password while creating a virtual directory

    Hi,
    i m trying to create a virtual directory in 9iAS on a mapped drive. How can i specify which username password to use to enable to connect to the network mapped drive. Is there any way where we can specify username / password ???
    thanks
    Unmesh

    9iAS R1
    Run the report service as a local account with administrator rights.
    On the target server, create a local account with the same user name and password.
    Now you can use the hidden shares ($) for example:
    &destype=file&desname=\\servername\d$\report_output\report.pdf
    9iAS R2 and 10g
    Pretty much the same thing except by default, the report server runs inline. I have not been able to get the entire service to run as a particular user. To get around this, I created a report server service and do not run the reports in process. It uses the separate service.
    rwserver -install rep90_name
    edit <ORACLE_HOME>\reports\conf\rwservlet.properties file.
    SERVER_IN_PROCESS=NO
    SERVER=rep90_name
    Edit service for rep90_name and change it to run as local administrator user you created on both servers and then start the service.

  • How to get the Current Directory

    Hi,
    I need to tell the system to read a file in my current directory. How do I tell the system what the current Directory Path is
    Thankx in advance...

    It depends on the current working directory from which you start your JVM.
    From DOS or UNIX shell this is the directory where you have come by "cd".
    On Windows you can do the same from Explorer or other file managers: the directory where you are when starting JVM.exe.
    If you define shortcuts - e.g. on the desktop -, you specify it there as the "working directory".
    You can retrieve this directory by
    System.getProperty( "user.dir" )
    Now with File classes:
    Each file name without path will be interpreted as being in this directory.
    Absolute paths are clear.
    But you can't mix this:
    If you specify "test/debug.ini" or "test\\debug.ini" from debug directory: false!
    If you specify "../debug.ini" or "..\\debug.ini" from debug/test directory: false!
    Do it this way:
    Start from debug directory.
    So you can access file debug/test/debug.ini as
    System.getProperty( "user.dir" ) + "/test/debug.ini"
    Works?

  • Specifying current directory in Receiver File Adapter

    Hi Experts,
    I have been configuring a receiver file adapter to place a file onto an FTP server. As per the information provided, as soon as I login to the FTP server, I have to place the file in current logged in directory. In this case, how can I mention this in file adapter as to use the current directory path to place the file? What should I enter in 'Target Directory' in File Access Parameters?
    Thanks,
    Dhawal

    Hi Praveen,
    Since file directory parameter is mandatory, my question is what should I enter in this parameter so that the file adapter will know that the file should be placed in the root directory itself?
    Regards,
    Dhawal

  • How can I retrive current user information in Content Server's presetation template?

    We need to determine current user is the item's created user or not, so we want to know how to do this?
    we can use <pcs:if expr="'Luke' == createdBy">....,but the 'Luke' is static string,
    so, how can I retirve current user name in Content Server's presetation tempalte?

    I don't know that this is possible in a direct fashion. (and, btw - thank you for asking this question. I realized we'll eventually need exactly the same thing so looking at this helps me as well :).
    I'm quoting dev support from another posting on making community comparisons dynamic:
    "This won't work because the pcs: tags are evaluated on the Content Server during the publish operation, resulting in a static HTML file that still contains the raw pt: tags. This same HTML file will be displayed in all of your communities. The pt: tags are evaluated on the portal server right before it returns content to the user, this allows the single HTML file to show a different name in each community. "
    So the gist of things is that content server acts dynamic to you and I through the editing UI, but is really publishing static content. The values at run-time are not directly available to the PCS operators because...well...the PCS stuff is already done. It produced the static HTML showing up in the portlet.
    There appear to be two immediate options:
    Use the transformer tags to publish the user's name at run-time. Have the PCS and Transformer tags write their values into javascript strings and then compare this client-side. My response: "meh" Not for the purist, but I'm so far down the non-purist path at this point it just doesn't matter any more to me. Simple and to the point, but has known risks. Probably the easiest way to go.Publish your page as ASPX or JSP and then use the EDK server-side to manage the comparisons. Definitely more server-centric, but does require you do a quick bit of content server configuration. Just set the publishing target for the portlet to a directory on a web server and then set the publishing file extension to .ASPX or .JSP. I've done this with ASP and it works nicely. :)Not entirely the answer you or I were looking for, but I think it makes sense.
    The PT transformer tags you'll want if you go with option (1) are:
    Get the user's full name
    <pt:userinfo xmlns:pt="http://www.plumtree.com/xmlschemas/ptui/" name="FullName" />
    Get a custom user setting "myUserSetting"
    <pt:userSetting name="myUserSetting" xmlns:pt="http://www.plumtree.com/xmlschemas/ptui/" />
    Plumtree - am I off base on this one?
    Thanks,
    Eric

  • How can I specify...

    How can I specify an exact location for a data file? The program that reads the file has this as a constructor:
    public VocabularyWordRW (String fileName) {
    fname = fileName;
    list = null;
    Whenever I call new VocabularyWordRW ("data1"); (which is the name of the file). I get a "File Not Found"
    message. It usually works on a Unix machine as long as I'm running it from the directory it's in.
    I tried putting the file in both c:\ and c:\englishDrill, which is the location of the program, but it still didn't work.
    Thanks for your help.
    -Chris

    The reason you need to use two backslashes, for exampe "C:\\blah\\datafile", is that the backslash character is a special escape character in Java - you use it to specify special characters. For example "\n" in a string in your source code means the newline character.

  • How can I display current iPhone GPS coordinates using compass app

    How can I display current iPhone GPS coordinates, when traveling overseas with no access of data or wifi
    using "iphone compass app"(Both the latitude and longitude) ??
    if iphone compass app require any sort of data
    what alternative would there be? (to document the coordinates)?

    Hi
    Iphone 5s 16 gb 8.1
    My fone freeze whenever i charge my fone its appear white screen with apple logo.. and as soon as i try to press hold home and power button
    it shows battery drained sign>> i m facing this problem from last one week
    and itunes also not  getting cconnected
    can any1 please help me out
    sorry for poor english

  • How can we specify the Mailbox for Notes?

    In Mail.app, how can we specify the Mailbox for Notes (where the new notes will be resided)? It is now 'On My Mac'. I wish to change to my IMAP Mailbox so it sync with my iPhone by just checking email (not by syncing on iTunes).
    Thanks in advance.
    Message was edited by: Ekapon

    You could use the DecimalFormat or NumberFormat to do the job.
    double number 1234.567;
    DecimalForamt df = new DecimalFormat("###.##");
    String s = df.format(number);or
    double number 1234.567;
    NumberFormat nf = NumberFormat.getNumberInstance();
    nf.setMaximumFractionDigits(2);
    /* if needed.
       nf.setMaximumIntegerDigits(value);
       nf.setMinimumFractionDigits(value);
       nf.setMinimumIntegerDigits(value); */
    String s = nf.format(number);I didn't test the codes but they should work. For more information, please consult the documentations.

  • How Can i specify multiple server names in rwservlet.properties  file?

    How Can i specify multiple server names in rwservlet.properties file without clustering?
    I am using oracle 10g Application server. we have 3 servers Repsvr1, RepSvr2 and RepSvr3. Now i need to configure rwservlet.properties file to point to these servers based on any running report. i got 3 keymap files with reports info.
    Sample entry in the key map file is:
    key1: server=Repsvr1 userid=xxx/yyy@dbname report=D:\Web\path1\path2\reports\Report1.rdf destype=cache desformat=PDF %*
    key2: server=Repsvr2 userid=xxx/yyy@dbname report=D:\Web\path1\path3\reports\Report2.rdf destype=cache desformat=PDF %*
    rwservlet.properties file letting me to enter only one servername. Even though i merged all 3 keymap files into 1, still i have the server name issue. If i leave the server to the default name still i am getting the below error.
    REP-51002: Bind to Reports Server Repsvr1 failed. However, i know the default rep_<servername> would be used incase we dont have SERVER=<value> parameter in the rwservlet.properties file.
    If i specify the servername in the rwservlet.properties file then only Repsvr1 reports are working fine and other 2 server reports are giving the same error like
    REP-51002: Bind to Reports Server <<Server Name>> failed.
    how can i configure the info which will work all 3 reports. 2 Port servers are invoking using oracle forms and report server is invoking using ASP pages.
    If i specify Server name & Key map file in rwservlet.properties one at a time, all the reports are working without any error, whenever i am trying to integrate all 3 to workable i am getting binding error. if i exclude the server from rwservlet.properties still i am getting the same error.

    My RELOAD_KEYMAP setting is YES only.As i said If i specify Server name & Key map file in rwservlet.properties one at a time, all the reports are working without any error.
    keymap file entries
    key1: server=Repsvr1 userid=xxx/yyy@dbname report=D:\Web\path1\path2\reports\Report1.rdf destype=cache desformat=PDF %*
    key2: server=Repsvr2 userid=xxx/yyy@dbname report=D:\Web\path1\path3\reports\Report2.rdf destype=cache desformat=PDF %*
    If i use http://server.domain:port/reports/rwservlet? cmdkey = key1 should bring the report from Repsvr1 and http://server.domain:port/reports/rwservlet? cmdkey = key2 should bring the report from Repsvr2, but i am getting an error from Repsvr2 saying that REP-51002: Bind to Reports Server repsvr2 failed.
    Only Servername Repsvr1 is in rwservlet.properties file. Now what is the best option to by pass the server from rwservlet.properties file and should be from keymap file. if i comment server name in rwservlet.properties file still i am getting REP-51002: Bind to Reports Server <<Server Name>> failed error for both keys.

  • How can I specify the default tab in a CHM Output?

    My company uses CHM-based help for some of its products. We build the CHM files from RoboHelp 9, and while these CHM files don't really have a full Index attached to them, the Index tab shows up in the output anyway. Unfortunately, we are suddenly seeing that when the CHM file is launched from our program, the Index tab is displayed by default. We'd rather have the Contents tab be the default look, especially considering that the Index does not exist.
    I have poked around into how you can specify a default tab for a CHM file, and the only information I have found suggests that using a CHM file creates a file (HH.dat) that specifies which tab should be displayed on a user-by-user basis, and that the last tab displayed when you close the CHM should be the first one displayed when you re-open it. While this is true if you open the CHM independent from the product, when you launch it from our program, it's all Index, all the time.
    So, my question is: How can I specify the default tab for a CHM file? Or, failing that, how can I excise the Index tab from my CHM output.

    Hi there
    This will be something up to your application developer to resolve. When s/he issues the call to open the CHM, there are parameters that may be used to always open with the desired tab "in front".
    Point your developer to the link below and advise that s/he is most likely interested in the section titled: Programming Tips.
    Click here to view
    Cheers... Rick
    Helpful and Handy Links
    RoboHelp Wish Form/Bug Reporting Form
    Begin learning RoboHelp HTML 7, 8 or 9 within the day!
    Adobe Certified RoboHelp HTML Training
    SorcerStone Blog
    RoboHelp eBooks

  • How can i change the default path of installation

    I had creative cloud for a while. Today i changed the default installing folder, from the creative cloud settings/prefferences(can't remember) menu, from C to D. Then i uninstalled all the programs from adobe cs6 to take the new cc programs. When i want to reinstall adobe creative cloud it is installing on D and since there is no operating sistem on D i can't install the creative cloud. It keeps installing on D. How can i change the default path of installation if i uninstalled creative cloud?

    Or how can I change the prefered installation folder that can be changed from creative cloud menu/prefferences when i have uninstalled creative cloud?

Maybe you are looking for

  • FIXED ASSET : Import old asset in SBO ?

    Hi, I'm trying to import old asset in SBO which have been totally amortized for end 1998, and it seems impossible to do it.These assets are used and net to be in the Assets Book with one resdual value equal to 1. Is there any limits for importing old

  • Email Stating Email has exeded Limit

    Hi Would someone clear up this email I got this morning === Dear BT Users, Your E-mail account has exceeded its limit and needs to be verified, if not verified within 24 hours, we shall suspend your account. Clickhereto verify your email account now

  • Org.units structure/hierarchy

    Hi all, I need org.units hierarchy/structure. I think of a table with fields like org.unit id, parent org.unit id. The data should be suitable for building a tree later which will display the org.units hierarchy. I read much in the forum, but I didn'

  • Lost Catalog

    I opened LR4 and got a message saying I could either upgrade or use exisiting catalog, which seemed weird.   I said okay upgrade.  Now my entire 30K image catalog is gone.  All my images are where they should be but keywords, develop settings, and ev

  • Flat file Upload BSP page

    Hi Marc, I am following the July version of how-to. When generating the BSP page, I am told checkbrowser.htm and js.htm are not available. When I create a checkbrowser.htm and point the include to js3.htm, which is one of the page fragment available,