Script to connect and rename a drive works on Windows 8.1 but not Windows 7

I have a script to map a drive to a WebDAV share and the staff wanted it so the Drive shows up as Onedrive and not \\http......etc So I added entries to the script
to rename the drive to that. It seems to run and work perfectly on Windows 8.1 but on Win 7 it maps the drive but the rename part doesn't work. Even running the rename section manually in a separate script on Windows 7 does nothing. Is there a different rename
command for VB for a Win 7 OS? 
Jason

Sure thing, Also Ive found the problem is on the ones that aren;t working if I open an app notepad for example and do a save as that drive shows as the name I want it but it doesn't when I just go to My comuter view
Set WshShell = WScript.CreateObject("WScript.Shell") 
Return = WshShell.Run("https://login.microsoftonline.com/login.srf?wa=wsignin1.0&whr=adfs.cr.k12.ia.us&wreply=https://crdistrict-my.sharepoint.com&LoginOptions=1", 1) 
WScript.Sleep 8000
Dim objNetwork
dim objFSO, objShell, objUNC
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objNetwork = WScript.CreateObject("WScript.Network")
Dim strDriveLetter1, strRemotePath1, strNewName
'end of varible declarations
strDriveLetter1 = "W:"
strRemotePath1 = "\\XXXXXXXX-my.sharepoint.com@SSL\DavWWWRoot\Personal\" & objNetwork.UserName & "XXXXXXXXX/documents"
strNewName = "OneDrive"
'end of varible setup
objNetwork.MapNetworkDrive strDriveLetter1, strRemotePath1
'end of map creation code
' Section which actually (re)names the Mapped Drive
Set objShell = CreateObject("Shell.Application")
objShell.NameSpace(strDriveLetter1).Self.Name = strNewName
WScript.Quit
'end of script
Jason

Similar Messages

  • HI I have an Iphone 3GS and the microphone jack works when I play music but not when making phone calls.   please help as I use it for conference calls

    Hi   I use my phone for conference calls and use the microphone jack to connect to speakers.      It doesnt work when making phone calls but when i play music on the phone the jack works with the external speaker.   

    Happy to have been of help. Hope all goes smoothly.
    BTW, for the sake of others who may help you here, it's usually most polite if you mark the post that answered your question as being the one that "solves" it, not your own post. That's how people get points here, if a questioner marks their post as either "helpful" or "solving". It's not an issue for me, but for those just starting out in the forums it may be important to them. See:
    https://discussions.apple.com/static/apple/tutorial/mark.html
    and
    https://discussions.apple.com/static/apple/tutorial/reputation.html
    Regards.

  • Simple external job works in windows 7 enterprise but not windows 2008 R2 enterprise.

    SQL*Plus: Release 11.2.0.1.0
    widows 7 sp1 and 2008 sp1 enterprise
    The job runs without error on two  windows 7 environments but the job fails on windows 2008 with:
    error 255
    "EXTERNAL_LOG_ID="job_89424_68834",
    ORA-27369: job of type EXECUTABLE failed with exit code: The extended attributes are inconsistent.
    I know it's not the credential as I can replace it with another undefined user and it will tell me that username and/or password is not valid.
    I create a specific directory with the user in question and verified I can read/write to it.
    without any job arguments to cmd.exe I still get the error.
    the joe can run the cmd.exe without issue.
    Is there some slight difference in windows 7 and 2008 server (security?) that would account for this?
    user joe  is a member of the local administrators and ora_dba groups on all servers
    job and credential defined as follows:
    BEGIN
        sys.dbms_scheduler.create_credential(
            username => 'joe',
            password => joespassword,
        database_role => NULL,
        windows_domain => NULL,
        comments => NULL,
        credential_name => '"DBREP"."joe"'
    END;
    BEGIN
        SYS.DBMS_SCHEDULER.CREATE_JOB (
                job_name => '"BLAH"."test"',
                job_type => 'EXECUTABLE',
                job_action => 'C:\Windows\System32\cmd.exe',
                number_of_arguments => 0,
                start_date => NULL,
                repeat_interval => NULL,
                end_date => NULL,
                job_class => '"SYS"."DEFAULT_JOB_CLASS"',
                enabled => FALSE,
                auto_drop => FALSE,
                comments => '',
                credential_name => '"BLAH"."joe"',
                destination_name => NULL);
            SYS.DBMS_SCHEDULER.SET_JOB_ARGUMENT_VALUE(
                 job_name => '"BLAH"."test"',
                 argument_position => 1,
                 argument_value => '/c');
        SYS.DBMS_SCHEDULER.SET_JOB_ARGUMENT_VALUE(
                 job_name => '"BLAH"."test"',
                 argument_position => 2,
                 argument_value => 'dir');
        SYS.DBMS_SCHEDULER.SET_JOB_ARGUMENT_VALUE(
                 job_name => '"BLAH"."test"',
                 argument_position => 3,
                 argument_value => 'c:\temp');
        SYS.DBMS_SCHEDULER.SET_ATTRIBUTE(
                 name => '"BLAH"."test"',
                 attribute => 'logging_level', value => DBMS_SCHEDULER.LOGGING_FULL);
        SYS.DBMS_SCHEDULER.enable(
                 name => '"BLAH"."test"');
    END;

    Hi Andy,
    It seems you're hitting the unpublished bug 12886827. The fix for this bug is included in 11.2.0.3 patch bundle 1.
    Since your version is 11.2.0.1, you'll need to upgrade, which is not a bad thing anyway because 11.2.0.1 has many bugs.

  • My external hard drive worked on my old macbook but not on my new one. Why?

    I have an older macbook (white plastic case) and Just got the newest Macbook Pro (Mid 2014).
    My external hard drive, WD My Passport 1TB, worked just fine on the previous computer but now when I plug it into the new macbook, it doesn't pop up. Additionally, I have gone to disc utility to check if it is there. It is not. I plugged it back into the old mac and it works fine so I don't believe its the external.
    Anyways, I need some help. Please and thank you!

    Good day rad292,
    Thank you for visiting Apple Support Communities.
    It seems like your external hard drive is not recognized by your new MacBook Pro. You've done a good job of isolating this behavior to your new Mac, and I'd recommend going through the following troubleshooting steps.
    First, reset the NVRAM (also called PRAM) and the System Management Controller (SMC) on your MacBook Pro:
    How to Reset NVRAM on your Mac - Apple Support
    Intel-based Macs: Resetting the System Management Controller (SMC) - Apple Support
    Next, try the steps in the "Top troubleshooting tips" section of this article:
    USB and FireWire Quick Assist - Apple Support
    All the best,
    Jeremy

  • My flash drive works on a Mac mini, but not on a MacBook Pro. How do I get it to work?

    Also, when I plug my phone into the computer using the USB drive, the computer does not recognize it. I have not tried my phone on the Mac Mini. They have both worked before on my MBP. What's the problem?

    It may just not be configured to SHOW.
    1. Finder>Preferences.
    2. MISSING FROM DESKTOP: Make sure under "General" for "Show these devices on the desktop" that you have a CHECK mark under "hard disks" as well as "external disks" (if you have a dash that indicates specific items are set to hide and others are not)
    3. MISSING FROM SIDEBAR: Check the same items under the "Sidebar" section if you are missing them from the Sidebar of Finder.
    EE

  • After upgrading to Lion, I can not connect to my NAS drive. I can see it but not connect. Any ideas?

    The drive is a Lacie 4 tb model. 2 (2) tb drives, cofigured raid 0.

    Please follow these instructions:
    Lion: Connecting to legacy (pre-Lion) AFP services - and Mac OS X (server):
    https://discussions.apple.com/thread/3258472

  • WD My Passport drive works on old usb2 Macbook, but not on usb3 Macbook Pro Retina 13" Late 2013

    I have a 1TB WD My Passport drive that will not mount in finder or even appear in Disk Utilities in OSX Mavericks 10.9.1. It does however appear in System Report under the USB heading as My Passport 0748, but shows 480mb/sec speed rather than USB3 speed.
    It works on my old Macbook pro, which is a USB2 machine, perfectly well.
    Has anyone found a workaround to this? I have looked high and low for a solution but none has nailed it. Could it be a problem specifically with the USB 3 driver in OSX? Or maybe even the drive itself?
    Kind Regards
    Phil

    Here is my post on another Forum. My problem with the UI is now solved :
    hi there,
    same problem here. i had a mba 13" 2012 and wanted to switch to rmbp 13 because i need more real estate.
    i sold the mba on ebay, but had a few days to compare my rmbp and mba side by side. both with exactly the same software configuration and OS Mavericks.
    the mba was obviously snappier and i didn't know why.
    after reading tons of threads, exchanging the rmbp one time and being frustrated i discovered this thread.
    so i downloaded RDM, set the resolution to 1680x1050 (non-high-dpi!!!) and there it is, a snappy rmbp with mavericks.
    (for me real estate is more import than a shiny retina thinggy, but also i don't see a bit difference between 1680 hiDPI and 1680 "normal")
    i suspect the os isn't yet optimized, but i am far away from a software expert.
    here is the link for RDM:
    http://www.reddit.com/r/apple/commen..._resolution_to

  • Problem importing video from a DV camera into the new imovie 10.0?  I have a Sony DCR TRV17 connected via Firewire port that worked in 9.0.9 but not under 10.0...

    I have a Sony DCR TRV17 that I used to pass through VCR tape video via Firewire port to my Mac Pro under Imovie 9.0.9 without an issue.   Now under Imovie 10.0 the video shows in the import window, I can start recording yet when I stop recording the recorded clips do not show up anywhere.  The movie file I'm creating still indicates that I still need to import video.   Anyone having similar problems?

    Hey Dave,
    I had this issue only once before but was lucky enought to find it was a specific event causing the import to freeze. It took me some time to isolate the problem though. I would recommend letting it sit there for some time before you try any troubleshooting. Larger libraries can take long periods of time to update.
    This is a good thread for this issue.  I would first try removing the iMovie.plist as elikness mentions.
    1. Open Finder
    2. Click on "Go" in the menu bar.
    3. Click on Go To Folder on the dropdown menu.
    4. Type "~/Library/Preferences/" in the text field and click Go.
    5. Find the com.apple.iMovie(some number).plist file and move it to Trash.
    Quit and relaunch iMovie to see if this took care of the issue before attempting the next step. If you're still having an issue then you can try what I needed to do which is isolating the problem event.
    1. Open Finder.
    2. Go to the Movies folder. You should see iMovie Events here.
    If you have a larger event library I'd recommend renaming the iMovie Events folder to say, "iMovie Events COPY". Then create a new empty folder named “iMovie Events”. When you launch iMovie 9.0.9 all events will be missing at this point. Quit iMovie if it is open. Then you can either drag each event from iMovie Events COPY to iMovie Events or you can select and drag several at a time. Each time you drag an event folder back into the new iMovie Events folder launch iMovie 9.0.9 to see if you are having the same issue. Wash and repeat until either you have found the problem event or you have imported all events.
    If you find the problem event you can reimport the clip from iMovie 9.0.9 by going to File > Import > Movies and navigating to that events iMovie Original Movies folder to find the clip.
    Hope this helps!

  • How do I connect to Net Flix? I put in my user name and password which work fine with my iMac but not on my Apple TV?

    How do I connect to Net Flix? I put in my user name and password which work fine with my iMac but not on my Apple TV?

    Can you give me a screenshot of the User Accounts window in Control Panel?
    Please create a screenshot by following the guide mentioned at [[How do I create a screenshot of my problem?]].
    Once you've done this, attach the saved screenshot file to your forum post by clicking the '''Browse...''' button below the ''Post your reply'' box. You really help us to visualize the problem.

  • Hi, I loaded Windows 7 Pro w/XP mode and iMac USB show working properly in device manager, but i cannot see a USB flash drive, or my Mac Superdrive.  Does anyone have a suggestion?  Thanks!

    Hi, I loaded Windows 7 Pro w/XP mode and iMac USB show working properly in device manager, but i cannot see a USB flash drive, or my Mac Superdrive.  Does anyone have a suggestion?  Thanks!

    MacDrive to provide better HFS support.
    And to acces and write.

  • I have installed itunes and my internet is working however it says I am not connected to internet\

    I have installed itunes and my internet is working however it says I am not connected to internet\

    Hi there,
    You may want to take a look at the troubleshooting steps found in the article below.
    Can't connect to the iTunes Store
    http://support.apple.com/kb/ts1368
    -Griff W.

  • Airport time capsule 2 TB. All is connected and Wi-Fi is working but light still flashes amber rather than solid green. I have tried to reset but this still happens. Is there a way to fix this or do I need to?

    Airport time capsule 2 TB. All is connected and Wi-Fi is working but light still flashes amber rather than solid green. I have tried to reset but this still happens. Is there a way to fix this or do I need to?

    You want to see a green light on the Time Capsule.
    Once you have set up the Time Capsule initially, a flashing amber light indicates that the Time Capsule has a message for you....possibly about a network condition or notice of an update that is available.
    Open Macintosh HD > Applications > Utilities > AirPort Utility
    Click on the amber dot and another window will appear to provide the current status....along with suggested actions to remedy the flashing amber light.

  • Got a new iphone5 and cannot log into iMessages keep getting same message to check network connection and try again.  Tried changing password as suggested but nothing is working

    Got a new iphone5 and cannot log into iMessages keep getting same message to check network connection and try again.  Tried changing password as suggested but nothing is working any suggestions?

    Are you connected to wifi, or doing it over cell signal?

  • My Ipad 2 says its connected to my wifi but when i try to go ontofacebook it says I cannot connect and when i try on safari it says I am not connected to the internet. Yet on settings it says I am. Any help?

    I recently got an IPad 2 and when I first set up the wifi connection the safari and facebook worked but suddenly whenever  I  attempt to get onto facebook it says Unable to connect and whenever I go on safari it says I am not connected to the internet. yet when I go on settings-- Wi-fi The network I should be cnnected with is ticked and it says I have connection, but once i try to go on the internet I have the same problem. Is there a way I can solve this by resetting or do I need to go into the apple shop to get it sorted. Any help? Thanks.

    I recently got an IPad 2 and when I first set up the wifi connection the safari and facebook worked but suddenly whenever  I  attempt to get onto facebook it says Unable to connect and whenever I go on safari it says I am not connected to the internet. yet when I go on settings-- Wi-fi The network I should be cnnected with is ticked and it says I have connection, but once i try to go on the internet I have the same problem. Is there a way I can solve this by resetting or do I need to go into the apple shop to get it sorted. Any help? Thanks.

  • TS1369 I just bought a new laptop and my ipod nano will not stay connected to my computer. When I first connect the ipod it starts to sync on my ipod but not in itunes. At this point my ipod is connected to my computer but when it finishes syncing it's no

    I just bought a new laptop and my ipod nano will not stay connected to my computer. When I first connect the ipod it starts to sync on my ipod but not on itunes. The ipod is initially connected to my computer, I can see it when I look on devices in my computer. However, when it finishes syncing it is no longer detected to my computer. I cannot transfer any of my songs to my new laptop because of this. I have tried to reinstall itunes, reset my ipod and use a different port. None of these things worked. Any ideas?

    rubicon53 wrote:
    I just bought a new laptop and my ipod nano will not stay connected to my computer.
    I cannot transfer any of my songs to my new laptop
    How to use your iPod to move your music to a new computer

Maybe you are looking for

  • Need to sync only address book with exchange 2003 - Snow Leopard

    Hey everybody! M very new to troubleshooting MAC. M a network engineer and have an employee who recently got a new MAC with snow leopard OS. The problem is he would like ONLY his address book to sync with our Exchange 2003 to he could pull out the co

  • Email server problem - failed to connect to server

    Since Friday 27th August I've been having trouble connecting to the email server for my BT Yahoo account. It simply can't find the server, even though none of the account settings have changed and it has worked fine for years. Weirdly, sometimes it w

  • How to turn on my Do Not Track Setting?

    I cant seem to find anything that leads me to these many options you claim to have on my mobile. Can you help?

  • Hi, I have a NI 1409 framegrabber but I can't to connect it to my camera CS 3730, Does somebady can help me?

    This camera CD 3730 DC is a Double speed 50/100 fps progressive scan camera, it have several functional modes, one of then is interlaced or not interlaced mode. I configured it the all forms possible but I have not good luck. I read NI 1409 data shee

  • DEBMAS text mapping

    Hi all, we send DEBMAS-IDocs out of a SAP 4.7 system to XI. The target is a MS SQL db (connected via JDBC), where the segments are mapped into several tables. I have difficulties to map texts from IDoc to SQL-table. In the SQL-DB there is only one ta