Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Scripting .ocx and registry keys install
Message
From
11/05/2018 10:16:26
 
 
To
11/05/2018 00:33:12
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012 R2
Network:
Windows Server 2012 R2
Database:
Visual FoxPro
Application:
Desktop
Virtual environment:
VMWare
Miscellaneous
Thread ID:
01659908
Message ID:
01659932
Views:
46
Good to know. Thanks.

>Mapped drives are per user profile. When you RunAs you're using the Administrator profile; that may not have the same drive mappings as the normal user.
>
>On a network it's worth remembering that this Administrator profile is a local administrator, not the Domain administrator for machines on a Windows domain. That account likely has no specific privileges to domain resources. I haven't tested to see if it has access to resources open to "Domain Users" or similar security groups. If you have to access network resources you may have to map them at the start of the batch file with appropriate NET USE commands.
>
>Using UNCs can get around the issue of drive mappings not existing but you might still run into privilege issues. Using NET USE with the optional account/password parameters can work around these.
>
>>Hi Al,
>>
>>Actually that does work - I had a work term student working on this and he said he could not get it working but I thought I should try again. What I found out is that he had the batch file on a mapped drive and it appears that mapped drives do not work once you go to elevated privileges. I noticed that I could not switch to mapped drives from the elevated command prompt so that gave me a clue.
>>
>>Thanks,
>>Albert
>>
>>
>>>
>>>Just a guess, but if you run a batch/CMD file in an elevated CMD prompt (CMD.EXE...Run as administrator) that may give you the privileges you need.
Previous
Reply
Map
View

Click here to load this message in the networking platform