Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




Crash Writing Files To Shared XP Folder


My executable is compiled on W2000, I am using the FileSystemObject to create and delete folders and files. Everything works fine on a W2000 box, and even on an XP box, except when that parent folder is shared. I have put On Error Resume Next statements, but the program still crashes out.

Any ideas?




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Copy Files From Shared Folder To The Local C: Folder
Hai
This is Kiran,
I am working with Access 2002 ( XP ).
I have to copy required Excel files from the shared folder to the Local system C: drive for example.
Can any one help me that how can I do it with VBA in MS Access.
Thanks in advance.
Kiran Karnati.

Copy Files Onto Shared Folder
i have a partial Program that Watches a directory tree for a changed
file, once it Flagged changed i need somthing that scans a network
shared Folder for a duplicate name and then once found
then it copies it over ,, can anyone help me

Copy Files On A Remote Shared Folder
I have creat an application to backup folders from a computer to another computer.
My application is installed like NT service with System account.
But system ac**** did not have necessary rights to copy files to a remote shared folder.

My Question is how can i develop on Visual Basic with API use to copy files with user and password like this ?

FileCopy("c: estsigzip.zip","\serversharedigzip.zip","domainuser","password")

Thanks

Req. A Batch File To Copy Files To Shared Folder
Can any one help to create batch file to copy files to a shared folder..

Reading Files From A Folder And Writing To A Single Word Document
hi
I am trying to read files from a folder and writing it to a single document. I need to design COM Compenents for the this using VB. Can anyone tell me how to work this out

Thanx in Advance
Harshad

Shared Folder Creation And User Creation And Accessing Shared Folder Using User Id
hi,

I want to create a shared folder called 'Accounts' as Accounts$ in windows 2000 pro, windows server 2000, windows XP,windows 2003 server?

I want to create a shared folder called 'Accounts' in windows 98 with password protection.

Also I want to create a user called 'AccUser' with password 'AccUser' in windows 2000 pro, windows server 2000, windows XP,windows 2003 server?


How can access the folder 'Accounts' using AccUser userid from VB 6 application?

Regards

S. Muhilan

Create New Folder Into A LAN Shared Folder
Hi, as the tittle says, I need to create a new folder from my PC into other LAN shared folder, I'm using a FileSystemObject to create the folder but this returns the "Access Denied" error # 70. How I can solve this !?

Thanks !!!

Crash On Writing EXE...
I have just upgraded from Windows 98 to Me and installed Visual Basic 6 Professional Edition and my backed-up projects. One of my projects consists of a few forms, a module and uses ADO.

Whenever I attempt to compile it however, VB6 crashes during the "Writing EXE" process, sometimes "in" VB6.exe, sometimes in kernel32.dll. Has anyone got any idea as to why this is?

Writing On A Shared Database
Hi, I really ned help with this.

I am writing a program which will run on multiple machines and use a shared MS Access database on a network. The problem is when two users try to add to the same record in the database. One of the user's record will be added but instead of the other user being locked out of the database, they receive an error message and the program crashes. I know this happens because when using a data control to access the database, Access sets the lock on the database to 'No Lock'. Does anyone know how to fix this.

Thanks

Writing To An Shared Excel Spreadsheet
Hi,

I am very new to using Visual Basic, and after spending much time in this forum, I am very lost.

Basically, I am trying to develope a tool that will allow several excel users to write data onto one shared excel spreadsheet.

I am executing the following code when someone enters in data into checkboxes and hits a button on my excel spreadsheet:

Open "Testfile.xls" For Output As #1
Print #1, varx; vbTab; vary
Close #1

Testfile would be an excel spreadsheet that is in the shared directory. varx and vary would be the data that I have collected from the checkboxes.

This section is fine for writing one line, but I need a way to input a new line of text each time the button is pressed on someone's spreadsheet.

Since the users are all inputing data into the shared spreadsheet, I need something fast because only one person can open the spreadsheet at one time.

Basically, I need a fast way to find where the last entry is on the shared spreadsheet and enter in new data on the next line.

Is there a simple way of using Put and Get commands to get this job done?

Any help would be greatly appreciated.

Writing To An Shared Excel Spreadsheet
Hi,

I am very new to using Visual Basic, and after spending much time in this forum, I am very lost.

Basically, I am trying to develope a tool that will allow several excel users to write data onto one shared excel spreadsheet.

I am executing the following code when someone enters in data into checkboxes and hits a button on my excel spreadsheet:

Open "Testfile.xls" For Output As #1
Print #1, varx; vbTab; vary
Close #1

Testfile would be an excel spreadsheet that is in the shared directory. varx and vary would be the data that I have collected from the checkboxes.

This section is fine for writing one line, but I need a way to input a new line of text each time the button is pressed on someone's spreadsheet.

Since the users are all inputing data into the shared spreadsheet, I need something fast because only one person can open the spreadsheet at one time.

Basically, I need a fast way to find where the last entry is on the shared spreadsheet and enter in new data on the next line.

Is there a simple way of using Put and Get commands to get this job done?

Any help would be greatly appreciated.

Shared Folder?
Hello!

I would like shared a folder in VB?

(WInnt and win98)

How can i do?

THank's !


Cybercool

Shared Folder
Hello!


I would like share a folder in VB source code.
How can i do?

Thank

Cybercool

Shared Folder
Hi
Does anyone know how to unshare a path through API?

Thanks in advance
Washington

Log On To Shared Folder With Api?
Hi,
I need to fetch a file from a shared folder via a vb app.  The app is on win98, and the remote machine will be win98, but may be win2k in the future.  I will use the FileSystemObject to search and find it, then I'll either be doing FileCopy to bring it local or just Open it remotely to read it, but I get an error because I haven't logged onto the shared folder--it is password protected.  How do I use code (some api perhaps?) to log on in code to this folder?
Thanks,
--Jsteph

How To Log Onto A Shared Folder
Greetings guru's!

My problem is that I need to log onto a remote share so that my client apps can see my shared database. At present, I have to log onto the share through explorer. Is there a way to do this in vb? Has anyone done it or seen an article on it? If so, please point me in the right direction.

Thank you all

Connect To A Shared Folder
I would like to access network shares using something like the FileListBox. The FileListBox seems to work for network shares, but not if they are password protected. How can I allow the user to enter in the password to be able to display the folders contents?

Network Shared Folder
For one of my programs (i really have to many in progress!-darn, why do i volanteer), i have to create network shared folders, such as the "Net Share" command through a DOS promt does, the only thing is i dont want to drop loads of batch files to create a share. can anyone point me in the direction for this?

Shared Folder Sessions
In Windows XP, if you right click My Computer, and click manage - then "Shared Folders", and then Sessions - it shows if a user is connected to any of the shares on the local machine...

Is there an API to "grab" this collection of information from VB?

I need to be able to read this collection in my VB application, and I'm not sure if there is an API that does it, or what code I need to do it...

Any help is greatly appreciated!

-Dave

Printer / Folder Shared ?
How to display Printer / Folder is shared on Networking ?

Turnning Off/on A Shared Folder
I do not want the users to see or access the backup folder on the backup computer durning the day.
On the back computer: at 1 am turn on shared folder, then at 5am turn off shared folder.
Durning this time slot the PCs will backup their data.
Any thoughts?
Maybe VB-Script ?

Shared Folder... Permissions! ??
Hi everyone!
I am using JoshT code to share a folder on a computer with 2000 or xp.... and it works really good. Now.. the only thing is that this code gives permissions to everyone... and I need to give permissions only to a determined user.

So here is the code

VB Code:
'THIS CODE IS FOR NT/2000'5-3-2001 by JoshT Option ExplicitOption Base 0 Private Const STYPE_DISKTREE As Long = 0 'disk drivePrivate Const STYPE_PRINTQ As Long = 1 'printerPrivate Const STYPE_DEVICE As Long = 2Private Const STYPE_IPC As Long = 3 Private Type SHARE_INFO_2    shi2_netname As String 'LPWSTR    shi2_type As Long 'DWORD    shi2_remark As String 'LPWSTR    shi2_permissions As Long 'DWORD    shi2_max_uses As Long 'DWORD    shi2_current_uses As Long 'DWORD    shi2_path As String 'LPWSTR    shi2_passwd As String 'LPWSTREnd Type 'NetShareAdd returns 0 if no error''lpwstrServerName As Any, --the computer to create the share on,'                           NULL for local computer,'                           otherwise must begin with "\"'ByVal dwordLevel As Long, -- specifies the type struct that contains the data'       2 for SHARE_INFO_2 Struct'       502 for SHARE_INFO_502 Struct'ByVal lpbyteBuf As Any, -- pointer to the struct who type was specified above'lpdwordParmErr As Long, -- if an error in the struct, the number of the struct's parameter'                            that caused the error (0 is no error) Private Declare Function NetShareAdd Lib "netapi32.dll" _    (lpwstrServerName As Byte, _    ByVal dwordLevel As Long, _    ByVal lpbyteBuf As Long, _    lpdwordParmErr As Long) As Long      Private Sub TestIt()    Dim si2 As SHARE_INFO_2    Dim retval As Long    Dim parmerr As Long    Dim compname() As Byte        parmerr = 0    'compname = vbNullString    compname() = "\COMPUTER7" & vbNullChar        si2.shi2_netname = "Test2C" & vbNullChar 'the name of the share    si2.shi2_type = STYPE_DISKTREE 'the share is on the disk    si2.shi2_remark = "Testing Out NetShareAdd VB API" & vbNullChar 'the comment    si2.shi2_permissions = 0 'this should be ignored    si2.shi2_max_uses = -1 'unlimited connections    si2.shi2_current_uses = 0 'I don't think this is applicable    si2.shi2_path = "C:TEMP" & vbNullChar 'the path to the share    si2.shi2_passwd = vbNullString 'NULL, the password 'this should be ignored    retval = NetShareAdd(compname(0), 2, VarPtr(si2), parmerr)    End Sub Private Sub Form_Load()    TestItEnd Sub


I think I need to work around si2.shi2_permissions or si2.si2_permissions.... but I am lost.

PD. Have I told you how MSDN search sucks?

Making A DSN Through FTP Or Shared Web Folder
Guys:
We are developing application which is based on Client server functionality.WE have a database which is built in MS Access that is reside on server side .
I want to create DSN through which I can access this data base remotely at client side .will it be possible through making a DSN through shared web folder(WAN)? or there are any other suggestion to solve this problem.


thxs & regds.
Vikrant

Hidden Shared Folder
Hello All,

I want to do somthing like ... a file which is shared on the LAN and when any client run that shared file then he will redirected to a hidden shared folder with $ on my pc and have read only permission.

Thanks for reading.

Regards,
Hunaid ( munnobhai ).

Creating A Shared Folder In VB6
Hi all!
is there any way to create a network shared directory from VB?
i know how to create a "normal" directory, but how do i "share it" from VB?

WinNT 4 Shared Folder.
Can someone please tell me how can I access a file, any kind of file(data base), from a shared folder in NT4.



Thanks in advance!

Make A Shared Folder
I asked this question yesterday, but i didn't get a very clear answer...

How do i make a directory that is shared in a network??

Make A Shared Folder
How would i create a directory that is shared over a LAN?

Help With Windows Shared Folder
I wanted to connect to a windows shared folder on my local area network using the winsock control in vb6. Is there a possible way of doing that. I cant figure out what port to connect to. There are 8 ports listening on the machine i want to connect to. Thanks Matt

Set Permissions On A Shared Folder
Hi,

Does anyone know any code that will set permissions on a shared folder. I would also need to add groups (i.e. Owner/creator to the permissions list).

If anyone could help it would be cool.

Thanks,

Adam

Create Shared Folder In VB?
HI all,

I was wondwring if it was possible to created a share on a specified folder in VB 6.0. I have looked everywhere for some help but to no sucess.

EG. Directory is C:MY_DEMO

And I want to share it under the name "MY_DEMO", and let only authenticated people have full control.

Is this at all possible or does it have to be done manually?

Regards,



kloner

How To Access To The Shared Folder?(please Help)
LEt say, i got 2 computer, A and B, both are LAN connected. How can i access the shared folded in computer B from computer A using the Visual basic? IS there any method that i can use?
For example, computer A with ip address is 192.168.2.1 while computer B is 192.168.2.2.
i want use visual basic to access computer B, c drive directory, and xxx shared folder in order to copy the file inside the shared folder to computer A. So... can someone teach me... please. Thank

Network Shared Folder
hellow guys...!

is it possible to write a program using vb6 - that scans for a shared folder. Of course we can use windows explorer to find a shared folder, but what i want is how to code that thing...

is it possible?

thnks


¤¤¤(¯`·¸•´¯)¤¤¤])•—› shuryuhen8 ‹—•([¤¤¤(¯`·¸•´¯)¤¤¤
Mÿ Çødë Rðútìñès Crâw£s Øñ ¥ðúr PÇs ߣÓÖÐSTRÈÃM

Access Shared Folder
Hi Friends,
 i am developing an application to execute a file from the shared folder on the remote PC. i want help regarding this.
Thanks,
Suresh

Create Shared Folder
Hi guys,

Can some one help me with setting up a shared folder on a workstation.

Like I want to create a folder on workstation A and then set its property to Shared and then when I go to workstation B I wnat to access it from Workstation B only.


Tnx

Shared Folder Access?
Can I have access to shared folders on Network in VB? If yes then how?

Connect To Non-shared Folder
I know I have read somewhere that one can establish a connection (ado) even to a folder in a remote computer which is not shared, I have tried searching in the forum I cannot find it, I hope someone who knows how to do it will be kind enough to share it with me, a million thanks in advance....

How To Find A Shared Folder?
I need to get list of shared folder on a PC in the network.
In other words I know the PC name and I know that some its drives/folders are shared, but I don't know their names. Is there any way to find those names?
Thank you.

Shared.Local Folder
Is there any way to get the local location of a shared folder, that is the local location on the machine that is serving the folder. So if I looked at the shared folder \ServerFolder I could find that it is located at C:Folder on the server. Now that I think about it, if that is not possible then is there a way that if I put the local address in the comment section of the shared folder that I could get the comment information? Thanks in advance for any help!!

Setup Net Shared Folder With Installshield
Im using installshield devstudio 9 to create a setup program for my Access DB app. During setup, I need to ask the user if the installation is for the "Client/Server" Machine or a "Client Only" Machine.

If "CLIENT/SERVER" is selected, I need to create a shared folder ("C:DBNET") with access permissions for "EVERYONE", copy the Access file there, and setup a registry key with the path.

If "CLIENT ONLY" is selected, I need to open up a "browsefolder" dialog for the network, let the user browse the LAN for the Access file, and write a regkey with the UNC path.

All machines on which the program will be installed are either Win2k or WinXP

I can easily do all of this stuff in VB with API's, but I have no clue how to automate it in INSTALLSHIELD. I was hoping someone has some practical experience with installshield, and could help get me going in the right direction.

Shared Folder (acess Database)
Hallo Hi Everybody...

Is there a way to acess database from the client to the server without sharing the database folder. As we know sharing the folder very dangerous where it easily the hackers to come in the databases folder.

Here is my code to open database:

dim db as database

set db = workspaces(0).OpenDatabase("\serverMyFolderMyData.mdb")

Server : My ServerName
MyFolder : Where MyData.mdb reside (shared)

I cannot acess MyFolder if that folder not shared.

Thanks...

Accessing Shared Folder With Out Using LogonUser()
I have a Vb6 apps need to store file at share folder. any other way to acces shared folder with out using LogonUser()?

Setting Permissions On A Shared Folder.
Greetings to y'all! I'm havnig difficulty in this. I know how to set a folder as shared on a remote computer using NetShareAdd API call. But the problem now is how to set permissions to specific users. I wanted to remove the "Everyone" group and add specific users or groups (preferrably domain users and groups) and set permissions. Is ther any way this can be achieved?
Please help...

Secure Shared Folder Or Drive
Hii

i have created a program to lock the system in vb but if there is a folder that is shared or a drive that is shared then on the network that perticular machine's folder or drive is accessable..
i want is when i run that program to lock the desktop the drives or the folders that are shared should also be locked and there should be no access to those folders or drives until the right password is entered for that desktoplock program..
can someone help me pls its urgent..
thanks

Access A Folder In NT Server Which Is Not Shared
Hi every body!

I would like to access a folder in NT server which is not shared . please help me



regards,


kanaka

Accessing A File In A Shared Folder
Hi,

How can I access a file in a password protected folder? Let's say the password's "abc123".

Basically, there's a file I need to read in a password protected folder that my system administrator insists cannot be shared globally.

Thanks in advance.

Trace Shared Folder User
hi,
i need some guide on how can i develop a simple application to trace users of shared folders in a pc workgroup.

this application will pop up when someone accessing the shared folder and come out with a list of pc information (the accessor) such IP address n computer name if possible.

i have the idea to develop this application for my pre-final project but really dun get d idea on where should i start...i need to do this in a very short period of time..

i can learn fast by refering to d source code...please help

Network Shared Folder Access
Hi!
My computer has Windows 98 and it is member of a Workgroup (NOT a domain, there is no server for the network). OK. So I have a folder shared on my computer. I would like to write a program that can tel me what other computers on the network are currently logged on to my shared folder, at a certain moment.
Can anybody give me any idea on how to do this? Is this possible using some API calls?

I'm thinking of using this function but I don't know how:...
Private Declare Function NetConnectionEnum Lib "netapi32.dll" _
  (ByVal servername As Long, _
   ByVal qualifier As Long, _
   ByVal level As Long, _
   bufptr As Long, _
   ByVal prefmaxlen As Long, _
   entriesread As Long, _
   totalentries As Long, _
   resume_handle As Long) As Long

The problen is that i don't know how to use it. It has something to do with pointers and stuff that I'm not soo familiar with. One more thing: this function is intended to be used mainly under Win2000/NT. It is supported by Win98, but with some changes regarding the declaration and the asociated "Connection_Info_1" type...
  In MSDN, the examples regarding the use of this function are for C++. Nothing for VB6 programmers... This is realy frustrating !!!


Anyone who can help me with this ?!? Please! Thanks!


Hope I've been helpful,
Bogdan Muresan.

How To Locate Shared Folder On My Computer
can you help me how to locate shared folder in my computer using vb6. my os is win98.

Copyright © 2005-08 www.BigResource.com, All rights reserved