VBscript to modify an existing shortcut.

I need help with a vbscript, that will modify an existing shortcut in the All Users profile Desktop, and the shortcut in the Program files.  It needs to do two things, change the icon and change the name.  The script below allows me to change the
icon, but I am having issue getting the Name to change, as it won't, and my script does not error out, so the script is completing. 
Any Suggestions?
Option Explicit
'On Error Resume Next
'- Set Global Objects and Variables
'Name Variables
Dim WshShell
Dim objShortcut
Dim strDesktopPath
'Set Objects
Set wshShell = CreateObject ("Wscript.Shell")
'- Main Script
strDesktopPath = WshShell.SpecialFolders("AllUsersDesktop")
Set objShortcut = WshShell.CreateShortcut(strDesktopPath & "\Logon.lnk")
objShortcut.IconLocation = "C:\Path\Icon.ico, 0"
objShortcut.Name = "NewLogon.lnk"
objShortcut.Save
Wscript.quit

Use the FileSystemObject object to get the file and change the Name property to rename the file.
-- Bill Stewart [Bill_Stewart]

Similar Messages

  • Modifying an existing form in SAP B1

    Hi everyone,
                      Is there any way to modify an existing form in SAP B1? If so can any one describe the complete procedure of doing that?Will highly appreciate it.

    Hi,
    Its more advisable to do it in the Menu Event rather than the Form_Load event and its got to be done in the Before_Action = False.
    In Menu Event,
    paste this...
    If pVal.BeforeAction = False Then
    Dim objNewItem As SAPbouiCOM.Item
            objItem = objForm.Items.Item("51")
            objNewItem = objForm.Items.Add("cbSQ", SAPbouiCOM.BoFormItemTypes.it_CHECK_BOX)
            objNewItem.Left = objItem.Left + objItem.Width + 10
            objNewItem.Top = objItem.Top
            objNewItem.Width = objItem.Width
            objNewItem.Height = objItem.Height
            objNewItem.FromPane = "5"
            objNewItem.ToPane = "6"
            objCheckBox = objForm.Items.Item("cbSQ").Specific
            objCheckBox.Caption = "Sales Quotation"
            objNewItem.Visible = False
            objCheckBox = objForm.Items.Item("cbSQ").Specific
            objCheckBox.DataBind.SetBound(True, "", "01")
    Endif
    The above is a small snippet for the addition of a checkbox.
    Hope this helps.
    Satish.

  • To modify the existing form of custom invoice into  Proforma Invoice form

    We need to modify thye existing custom invoice form in to proforma invoice form by inputting the below details
    1) Suppling plant details
    2) LST/CST of receiving plant
    3) LST/CST of delivering plant
    Appreciated if any one can kindly let me know the logic and tables for the above scenarios

    We need to modify thye existing custom invoice form in to proforma invoice form by inputting the below details
    1) Suppling plant details
    This details u will get from T001W and adress from ADRC.
    2) LST/CST of receiving plant
    This details u will get from J1ID plant excise details J_1IMOCOMP or if u have created the plant as customer then u will get the same in customer excise details.J_1IMOCUST
    3) LST/CST of delivering plant
    This details u will get from J1ID plant excise details J_1IMOCOMP or if u have created the plant as customer then u will get the same in customer excise details.J_1IMOCUST
    Appreciated if any one can kindly let me know the logic and tables for the above scenarios

  • Is there any method or function to update/modify an existing trip data?

    Hey, ABAP  gurus,
    Is there any method or function to update/modify an existing trip (PR05) receipts data and cost distribution data?
    Thanks in advance!
    Fisher

    Hi Fisher,
    Please try HRTRV_IF_MODIFY_TRIP.
    Regards,
    Dilek

  • SSAS Source - Column selection lost when modifying an existing "Add Item" step

    When developing a Power Query query on an SSAS source, I often need to edit an existing "add items" step in order to add a few columns that I had initially missed out. To do this, I point to the step previously created and click on the small gear
    icon to edit it.
    However, when doing so, the edit dialogue is not initialised with all the columns that I had previously selected. Which means that if I am not careful and do not scrupulously recheck every column that I need, the modification will destroy what I had created
    before.
    Inserting another step rather than modifying an existing one might be a workaround,  but I would rather keep the number of steps to the minimum. Also, if there is an edit button, one should be able to rely on it.
    Has anyone experienced the same issue?
    PQ Version: 2.18.3874.242 - Excel 2013 32bits.

    This is a known issue that will be resolved in an upcoming release.
    A work-around for now when using the UI builder to edit a selection is to expand dimensions that had an attribute added from it before dismissing the dialog.

  • With out loosing view grant access, i can modify the existing vi

    I am using oracle 11g.
    I would like to add few more where condition in my oracle view ,Which has grant permission by different user.
    There is anyway with out loosing view grant access, i can modify the existing view.
    Existing view
    create view abc
    as
    select * from tab1
    where rownum =1 .
    Grant select on abc to read_ro;
    Modifying view
    There is anyway with out loosing view grant access, i can modify the existing view?
    add few more where condition in my oracle view ,Which has grant permission by different user
    please advise.

    create or replace view...
    SQL>  create or replace view y as select object_name from user_objects;
    View created.
    SQL> grant select on y to ads;
    Grant succeeded.
    SQL> select * from user_tab_privs where table_name='Y';
    GRANTEE                        OWNER
    TABLE_NAME                     GRANTOR
    PRIVILEGE                                GRA HIE
    ADS                            BONTRAB1
    Y                              BONTRAB1
    SELECT                                   NO  NO
    SQL> create or replace view y as select object_name,created from user_objects;
    View created.
    SQL>  select * from user_tab_privs where table_name='Y';
    GRANTEE                        OWNER
    TABLE_NAME                     GRANTOR
    PRIVILEGE                                GRA HIE
    ADS                            BONTRAB1
    Y                              BONTRAB1
    SELECT                                   NO  NO
    SQL> desc y
    Name                                      Null?    Type
    OBJECT_NAME                                        VARCHAR2(128)
    CREATED                                            DATE

  • Modify an existing LSMW to include a Z field

    I need to modify an existing LSMW to include a Z field added to material
    sales data. The LSMW uses standard program RMDATIND to upload. I can
    modify (append) the structure BMMH1 to include this field. However how
    to ensure that this field is processed by the standard program and is
    updated in MVKE table?
    Thanks in Advance....

    Hi,
    If I were doing a custom field in the material master I would load thru the
    idoc MATMAS and extend it to include my custom field, populate that field
    thru a user exit in the IDoc processing function then set up my material
    master data load in the LSMW to use the IDoc instead of the custom program.
    For me this would be the easiest way and you don't have to fiddle with the
    standard Direct Input program.
    Reward if found helpfull,
    Cheers,
    Chaitanya.

  • Config tool fails when trying to modify an existing Oracle EPM instance

    I have a single server windows 2008 server environment with Foundation, prlanning, essbase , raframework, and EAL. I also have ODI installed in the same server. I was trying to add Strategic finance to the same envirnment . I downloaded the required files according to oracle install doc.
    The installation was successful without any errors.
    Problems started when I tried to configure it. AsI opened the config tool and chose
    Modify an existing Oracle EPM instance ...
    the config tool gave an error that
    An unexpected error occurred and the application will have to be shut down . Review the error log , correct error condition and re-launch the application .
    Kindly share your thoughts on this issue
    Edited by: Saurav Sarkar on Apr 5, 2012 12:55 PM

    Did you examine the configtool log to see if it has more information on why the configurator shutdown, if you not sure where to find the logs have a look at http://docs.oracle.com/cd/E17236_01/epm.1112/epm_install_troubleshooting_11121/ch03s02s05.html
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Something is modifying my KB shortcut prefs

    this is very weird, and I'm in europe, so I can't take my blackbook to a genius. something is modifying my KB shortcut preferences, so that the dashboard becomes F11 and the F12 key becomes disabled. F9 and F10 are fine. I select "restore default" and it works for about 10 minutes, and then it's back to the old setting. I've trashed my /Users/~Home/Library/Preferences/com.apple.systempreferences.plist file, and that fixed it for a little while, but now it's back. It's driving me crazy that I can't use all 4 KB shortcuts (F9-F12) as they were intended. any ideas? thanks!

    First of all, that's good news. Secondly, no, no, no... The test account for TEST only. Now that we know the problem is in your User we can troubleshoot that.
    Here's the whole litany for thoroughly checking your home folder. It's not as daunting as it looks. And for you, only steps 2 and 4.
    1. Navigate to ~(YourHome/Library/Fonts - drag this folder to the desktop.
    • Restart and test your applications.
    • If they work start adding the fonts back few at a time.
    ( Likely suspects are Times RO & Helvetica Fractions, also if you do not use Classic you can trash the classic fonts.)
    2. Check Preferences Thoroughly;
    • Navigate to ~(YourHome/Library/Preferences drag this folder to the desktop.
    • Restart and test your applications.
    • If this works, save the old preferences folder somewhere else or on disk, name it "old prefs" .
    ** Note: A very important file is the "com.apple.Mail.plist" preference file located in the Preferences folder which contains all email account settings and general mail preferences (hold this one and replace if your problem is not with Mail).
    You'll have to go through some of your System Preferences and apps to set the preferences back to how you like them. (Or if you have the time and inclination, "cherry pick" through until you find the problem one or two.)
    3. Check Permissions Inside Home Folder
    • Navigate to YourHome/Library.
    • Get Info (Command - i) on folders for apps you are having problems with.
    • Open the "Ownership & permissions" disclosure triangle.
    • Make sure you are the owner, with "read and write" access.
    • Click on "apply to all"
    • If this is correct, open the "Applications Support" folder and do the same procedure (Command+I) for the folders with the names of the applications you are having trouble with.
    Note:
    The reason to check this is because repairing permissions with Disk Utility doesn't touch permissions inside your home folder.
    4. Navigate to YourHome/Library/Caches and drag this folder to the trash, then log out and back or restart. There is no need to replace this folder.
    -mj
    [email protected]

  • How Can I Modify an Existing Schedule using the WS-SDK?

    I'm trying to modify the scheduling info of a pre-existing schedule. I've got the schedule details from the database and modifying them, and then called BIPlatform.Schedule with the modified infoObject. However what it does is create a new schedule with the new schedule details, leaving the old one unchanged. Is it possible to modify the old instance, or do I need to delete the old instance andjust create a new one?

    Hiya Adam,
    Thanks for the clarification.
    Cheers,
    Jack

  • How to modify an existing xml file from java code.

    Hi
    I have worked on creating a new xml file from java code using xmlbeans.But if i try to modify an already existing file using java code I am unable to get errorfree xmlfile.
    For example if xml file(studlist.xml) is as below:
    <?xml version="1.0" encoding="UTF-8"?>
    <StudentList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="D:\kchaitanya\xmlprac1\abc\Studlist.xsd">
         <Student>
              <Name>ram</Name>
              <Age>27</Age>
         </Student>
    <Student>
              <Name>sham</Name>
              <Age>26</Age>
         </Student>
    </StudentList>
    Now suppose i have set name to victor using student.setName,
    and set age to 20 using setAge from javacode,
    the new xml file is as follows:
    <?xml version="1.0" encoding="UTF-8"?>
    <StudentList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="D:\kchaitanya\xmlprac1\abc\Studlist.xsd">
         <Student>
              <Name>ram</Name>
              <Age>27</Age>
         </Student>
    <Student>
              <Name>sham</Name>
              <Age>26</Age>
         </Student>
    </StudentList>
    <Student>
              <Name>victor</Name>
              <Age>20</Age>
         </Student>
    As observed this is not a valid xml file.But how can i modify without any errors?

    I know it's an old post, but I found this while doing a google search for something else, and don't like to leave it un-aswered
    Just in case anyone has a similar problem... In this case the new elements have been appended outside of the root element
    What you need to do is first get the root element and then append the new children to that, there are several ways of getting the root element, which depend on what you want to do with the elements you get back here's a simple (incomplete) way.
    // gets the root element of the specified file (code not shown)
    Element rootElement= new SAXReader().read(file).getRootElement();Then just append the new elements as below (this is non-generic code and would need to be modified for your situation)
    // write a new student element
    Element student = document.createElement("Student");  // creates the new student
    rootElement.appendChild(student); // ***appends it to the root element***
    Element name = document.createElement("Name"); // creates the name element
    name.appendChild(document.createTextNode("Fred")); // adds the name text to the name element
    student.appendChild(name); // appends the name to the student
    Element age= document.createElement("Age"); // creates the age element
    age.appendChild(document.createTextNode("26")); // adds the age text to the age element
    student.appendChild(age); // appends the name to the studentThen flush ya buffers or whatever and write the file
    Edited by: Dream-Scourge on Apr 23, 2008 11:10 AM

  • This Question is related to IDOC , that how to modify the existing IDoc

    hi All,
    am getting some problem that ,
    i have created the IDOC for sales orders by using (ORDERS), so i was able to create IDOC,but my requrement is to modify the exising IDOC.
    how i can go through?.
    what are the F.M to use?

    Hi,
    Check the FM being used for inbound posting for your message type. See if there is a user exit available for you to update data contained in the IDoc.
    If there isn't any, then you might have make a copy of the existing inbound processing FM and modify code to address your requirements. This will involve setting up your Z* FM for inbound posting (rather than system's standard FM) through configuration. For more details on how make these settings, take a look at http://www.sapgenie.com/sapgenie/docs/ale_whitepaper.doc.
    Regards

  • Modify an existing form

    I wonder if it is possible to scan in an existing form and modify it for fill in usage.
    IF so what would I need to do to make this happen?
    Tks
    [email protected]
    Gil

    Yes, you can edit the form at anytime. The new field will just be  added as a new column in the response table. Nothing will be lost.
    Randy

  • Modify a Existing Search Query

    Is there a way to modify a query executed in a Look up screen to include Extended fields.
    For Example if I add some extension fields to a material can I modify the Lookup (Search) query on a Sales order to use these new fields when searching for a Product... (Or best situation can i search for relivant data in a Associated BO my Add-on has created)
    I am guessing NO but just wanted to verify.

    If you define a process integration for the extension field of the material and transfer it from the material to the sales order, you will be able to also use it in the query of the sales order.
    This will only work for newly created sales orders of course, but not for sales orders that existed before you extended the material.
    For your own created objects, this might work if you create the extension fields of the material via the SDK, but I am not sure about this. I have never seen extension fields to be available in an associated BO.

  • Is it possible to delete/re-create or edit/modify an existing iCloud email address?

    When I created my iCloud email address I was on my iPhone.  My eyesight not being what it once was coupled with small font size, I inadvertently left out one letter.  Now, I don't see any solution for editing/modifying that email address.  I don't want to create an alias email address - just simply delete and re-create the existing @me address I established.  Is this possible to accomplish?

    Only by abandoning the account (you can't actually delete it, so it will still exist) and opening another one: to do that you will need to use a different email address as the ID, and then you can set up the @me.com address you want.

Maybe you are looking for

  • DMS-Document Distribution Setup

    Hello , I would appreciate if any one can give me some idea's on config part of Document Distribution in Document management system. I maintained recipeint list and in CVI8 i started document distribution which gave me back an internal order number l

  • Flash Player exe file

    Is there a way to download the executable for Flash Player 9, rather than installing it from the browser? If so, how/where?

  • XML Parse Exception

    Hi All, I am trying to parse the xml which is shown below but i am getting following exception, is there any wrong in format of xml. code: <abo:CodeCombinationsResponse xmlns:abo="http://xmlns.oracle.com/ApplicationObjects/Ebiz/Core/ABO/ChartOfAccoun

  • TS2972 HOME SHARING WONT WORK WITH ITUNES 12

    I CANT ANYMORE My OS is Windows 7 My iOS device: iPad 7.1.1 My iTunes Version: 12 AND I've tried by all means to use home sharing with the Remote app, but it doesn't work at all. So please HELP ME

  • Connection to host service 3299 timed out

    Hi all, When SAP tries for logging in to our quality servers SAP is having timed out issue. "Connection to host 204.103.218.70 service 3299 timed out". But our quality ip address is 204.103.218.73. Please help me out as we need to perform critical te