Open a network folder
Open a network folder
I need to navigate to the folder by IP address. To do this, I enter \\IP\myfolder into the address bar of the explorer and press Enter.
Next, the standard "Safety Windows" window opens, offering to enter Login and Password.
I tried to do this via ShellExecute(, 'Open', 'Explorer.exe ', '\\'+IP+'\myfolder',,3), however, nothing happened. What am I wrong about?
Next, the standard "Safety Windows" window opens, offering to enter Login and Password.
I tried to do this via ShellExecute(, 'Open', 'Explorer.exe ', '\\'+IP+'\myfolder',,3), however, nothing happened. What am I wrong about?
Re: Open a network folder
Good morning. See if it helps. use google translate, pls.
Buen día. Vea si ayuda. Utilice el traductor de Google, por favor.
https://fivewin.com.br/index.php?/topic ... -na-pasta/
Regards, saludos.
Buen día. Vea si ayuda. Utilice el traductor de Google, por favor.
https://fivewin.com.br/index.php?/topic ... -na-pasta/
Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Re: Open a network folder
No, that's not it.
Re: Open a network folder
ShellExecute() doesn't seem to work over the network
- Marc Venken
- Posts: 1481
- Joined: Tue Jun 14, 2016 7:51 am
- Location: Belgium
Re: Open a network folder
How will HTML VIEW() help me in this case ? The computer is on the local network, but not in the domain.
I need to open a network folder on another computer. I tried to do this through cmdkey and through net use. It hasn't worked out yet
I need to open a network folder on another computer. I tried to do this through cmdkey and through net use. It hasn't worked out yet
Re: Open a network folder
Natter, see if this example helps. Your question is very confusing.
Natter, vea si este ejemplo ayuda. Tu pregunta es muy confusa.
Regards, saludos.
Natter, vea si este ejemplo ayuda. Tu pregunta es muy confusa.
Code: Select all | Expand
// C:\FWH\SAMPLES\ABRIRPAS.PRG
#include "FiveWin.ch"
STATIC oWnd
FUNCTION Main()
LOCAL oIco, oBar, oBmp
SetBalloon( .T. )
SkinButtons()
DEFINE ICON oIco FILE "..\icons\fax.ico"
DEFINE WINDOW oWnd FROM 1, 5 TO 20, 70 TITLE "Abrir Pastas/Open Folders" ;
MENU BuildMenu() COLOR "B/W" ICON oIco
DEFINE BUTTONBAR oBar _3D SIZE 60, 40 OF oWnd 2007
WITH OBJECT oBar
oBar:nClrText := CLR_HBLUE
oBar:Adjust()
END
DEFINE BUTTON OF oBar FILENAME "..\bitmaps\16x16\Open.bmp" ;
PROMPT "Windows" ;
ACTION AbrePasta( GetWinDir() ) ;
TOOLTIP "Abrir a pasta do Windows" NOBORDER GROUP
DEFINE BUTTON OF oBar FILENAME "..\bitmaps\16x16\floppy.bmp" ;
PROMPT "System" ;
ACTION AbrePasta( GetSysDir() ) ;
TOOLTIP "Abrir a pasta do sistema" NOBORDER GROUP
DEFINE BUTTON OF oBar FILENAME "..\bitmaps\16x16\new.bmp" ;
PROMPT "Select" ;
ACTION AbrePasta( cGetDir() ) ;
TOOLTIP "Abrir uma pasta qualquer do sistema" NOBORDER GROUP
DEFINE BUTTON OF oBar FILENAME "..\bitmaps\16x16\Help.bmp" ;
PROMPT "Source" ;
ACTION AbrePasta( "c:\" ) ;
TOOLTIP "Abrir a pasta C:\" NOBORDER GROUP
DEFINE BUTTON OF oBar FILENAME "..\bitmaps\16x16\Exit.bmp" FLAT ;
ACTION( oWnd:End() ) TOOLTIP "Exit this app" GROUP
SET MESSAGE OF oWnd TO "Abrir pastas/Open Folders" 2007
DEFINE BITMAP oBmp FILENAME "..\bitmaps\visual.bmp"
oWnd:bPainted = {| hDC | BmpTiled( hDC, oWnd, oBmp ) }
ACTIVATE WINDOW oWnd CENTERED
RETURN NIL
FUNCTION BuildMenu()
LOCAL oMenu
MENU oMenu
MENUITEM "Abrir/Open"
MENU
MENUITEM "Pasta do Windows";
ACTION AbrePasta( GetWinDir() ) ;
MESSAGE "Abrir a pasta do Windows"
SEPARATOR
MENUITEM "Pasta de Sistema" ;
ACTION AbrePasta( GetSysDir() ) ;
MESSAGE "Abrir a pasta do sistema"
SEPARATOR
MENUITEM "Pasta selecionada" ;
ACTION AbrePasta( cGetDir() ) ;
MESSAGE "Abrir a pasta uma pasta qualquer"
SEPARATOR
MENUITEM "Unidade C:\ (Raiz)" ;
ACTION AbrePasta( "c:\" ) ;
MESSAGE "Abrir a pasta c:\"
SEPARATOR
MENUITEM "Sair" ;
ACTION oWnd:End() ;
MESSAGE "Finaliza a aplicação"
ENDMENU
ENDMENU
RETURN( oMenu )
FUNCTION AbrePasta( cPath )
LOCAL hFile
LOCAL cCmd := "start " + cPath, cBat := ".\abrir.bat"
IF ( hFile := FCreate( cBat ) ) != -1
FWrite( hFile, cCmd )
FClose( hFile )
MsgRun( "Executando...", "Executando...", {|| Winexec( cBat, 0 ) } )
ENDIF
RETURN NIL
STATIC FUNCTION BmpTiled( hDC, oWnd, oBmp )
LOCAL nWidth := oWnd:nWidth(), nHeight := oWnd:nHeight()
LOCAL nRow := 0, nCol := 0 // , n
LOCAL nBmpWidth := oBmp:nWidth(), nBmpHeight := oBmp:nHeight()
IF oBmp:hBitmap == 0
RETURN NIL
ENDIF
WHILE nRow < nHeight
nCol = 0
WHILE nCol < nWidth
PalBmpDraw( hDC, nRow, nCol, oBmp:hBitmap )
nCol += nBmpWidth
END
nRow += nBmpHeight
END
RETURN NIL
// FIN / END - kapiabafwh@gmail.com
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
- VitalJavier
- Posts: 242
- Joined: Mon Jun 10, 2013 6:40 pm
Re: Open a network folder
A mi me funciona:
ShellExecute(0,"Open","\\192.168.16.237\Win\WinAA\admin.exe","1",,3)
Saludos.
ShellExecute(0,"Open","\\192.168.16.237\Win\WinAA\admin.exe","1",,3)
Saludos.
Re: Open a network folder
Thank you. I did everything through the CMDKEY command. Works fine
Re: Open a network folder
From CMD, this command is executed perfectly.
Is it possible to execute it from FW ?
Code: Select all | Expand
cmdkey /add:\\MyIP\folder\ /user:UserName /pass:"123"
- Antonio Linares
- Site Admin
- Posts: 42259
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: Open a network folder
WaitRun( 'cmdkey /add:\\MyIP\folder\ /user:UserName /pass:"123"' )