Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Mapping a drive
Message
De
26/01/2009 15:12:55
 
 
À
26/01/2009 15:11:28
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Divers
Thread ID:
01377112
Message ID:
01377120
Vues:
24
>>A routine that must run is coded to look for a mapped drive "Y" and to enforce the mapping
>>the following code is used
>>
>> 'RUN /N net use Y: \\nn.nn.nn.nn\directory_name'
>>
>>
>>
>>
>>however this flashed the command window black box for an instant.
>>
>>How can we stop the flashing of the black box?
>>
>>Thanks in advance
>
>
>if !directory('y:')
>   wshshell=CREATEOBJECT('wscript.shell')
>   wshnetwork=CREATEOBJECT('wscript.network')
>   wshnetwork.MapNetworkDrive('y:','\\myserver\mypath',.f.,'Username','Password')
>   wshnetwork=.null.
>   release wshnetwork
>Endif
What if y: is mapped but to the wrong share?
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform