Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Scripting .ocx and registry keys install
Message
De
11/05/2018 00:33:12
 
 
À
10/05/2018 17:00:05
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012 R2
Network:
Windows Server 2012 R2
Database:
Visual FoxPro
Application:
Desktop
Virtual environment:
VMWare
Divers
Thread ID:
01659908
Message ID:
01659918
Vues:
46
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.
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform