View Full Version : Network drive
dufaure2
03-03-2010, 02:54 AM
Hallo, i 'm french so ...
How can i mont a network drive like 'net use ?
I'm search for a long time but i don't find.
Please help me.
Thancks a lot:)
jassing
03-03-2010, 04:55 AM
You can either call the windows api, or just shell out to Net.exe to use.
dufaure2
03-03-2010, 07:09 AM
ok, if i anderstand :
result = Shell.Execute("AutoPlay\\Docs\\net.exe", "open", "use h: \\xxx.xxx.xxx.xxx\utilisat pass /USER:domaine\compte", "", SW_SHOWNORMAL, false);
but it dont work
I know, i'm a very bad programmer :):rolleyes
jassing
03-03-2010, 07:12 AM
That wouldn't work unless you put net.exe into your folder...
File.Run(_SystemFolder.."\\net.exe", "use h \\ip\share /user:usr", "", -1, true);
dufaure2
03-03-2010, 09:26 AM
Good information, Thancks.
but I don't knows how can i ask for argument.
IP= Input.GetText("IP")
Ident = Input.GetText("Ident")
Password = Input.GetText("Password")
File.Run(_SystemFolder.."\\net.exe", "use h \\IP\public Password/user:Ident", "", -1, true);
This code don't work... snif :huh
jassing
03-03-2010, 10:08 AM
You need to RTFM and pick up some basic coding skills. this is very very basic.
cIP =Dialog.Input("Net Use", "Machine name or IP?","",MB_ICONQUESTION)
cUSER =Dialog.Input("Net Use", "User Name?","",MB_ICONQUESTION)
Password = Input.GetText("Password")
File.Run(_SystemFolder.."\\net.exe", "use h \\"..cIP.." /user:"..cUser, "",SH_SHOWNORML, true);
dufaure2
03-04-2010, 04:03 AM
Thancks a lot,
But show my script and help me please.
I want to connect : xxx.xxx.xxx.xxx\utilisat with Password and Ident
but i sea a black dos windows 1/4 s and it don't connect the ressouce.
Wath the 'c' mean in cIP ?:o
cIP= Input.GetText("IP")
cIdent = Input.GetText("Ident")
cPassword = Input.GetText("Password")
File.Run(_SystemFolder.."\\net.exe", "use h \\"..cIP.."\\utilisat "..cPassword.." /user:courrier\\"..cIdent, "",SH_SHOWNORML, true);
dufaure2
03-04-2010, 08:11 AM
on dos the commande line is :
net use h: \\xxx.xxx.xxx.xxx\forder_shared Password /USER:domaine\indent
So in autoplay
args = "use h: \\".."\\"..cIP.."\forder_shared"..cPassword.." /user:domaine\\"..cIdent
but if i extract the commande line :
net use h: \xxx.xxx.xxx.xxx\forder_shared Password/USER:domaine\indent
So, \ for \\ is it the problème and if is it, i don't knows how can i solve it.
I need somme help, please :yes:);)
dufaure2
03-04-2010, 09:04 AM
To solve my problem, I tri to pass the parameter in bat file.
So my argument is IP Ident and Password.
But it should be impossible to do that.
Args=IP.." "..Ident.." "..Password
don't work
So i thick Audioplay media studio is more complexe than dos batch file.
Please help me with variable in Audio play. I don't andertend.
;):eek::o:p
jassing
03-04-2010, 09:22 AM
what is the command you use in dos?
you can then emulate that in ams using File.Run.
In the example 'h' is misisng a colon(H:) and if you don't want to show the results change show_normal to -1
dufaure2
03-05-2010, 02:58 AM
Hallo,
The commande line :
net use h: \\142.47.49.240\utilisat test /USER:dom\alain
How can i translate this in autoplay media studio
I want to ask for IP Ident and password
:huh
jassing
03-05-2010, 03:46 AM
attached -- if that doesn't help you -- I'm out of ideas.
dufaure2
03-05-2010, 09:59 AM
Thancks youpi lol ;);):yes:yes:yes:yes:D:D:D
It's good
Now, i just want to know how can i pass argument to dos.bat file
Bye:yes
Powered by vBulletin™ Version 4.0.6 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.