Sign in to follow this  
Followers 0
friends

Can it be done ?

14 posts in this topic

Hi all.

This question may sound silly, but i need to know if it could be done.

I'm running a LAN environment, where all PCs are Windows 2000 and WinXP.

I wonder if a PC-A (Windows 2000) that has no Shared folder at all, can we

create a folder in C:\ of PC-A via accessing it from PC-B (Windows XP) ?

If it is possible... how would it be done ?

Cos I'm writting a script, where I wanted to perform as mentioned above,

if the folder does not exists, the script will create itself.

Thanks... and any suggestion on that ?

Share this post


Link to post
Share on other sites



Hi all.

This question may sound silly, but i need to know if it could be done.

I'm running a LAN environment, where all PCs are Windows 2000 and WinXP.

I wonder if a PC-A (Windows 2000)  that has no Shared folder at all, can we

create a folder in C:\ of PC-A via accessing it from PC-B (Windows XP) ?

If it is possible... how would it be done ?

Cos I'm writting a script, where I wanted to perform as mentioned above,

if the folder does not exists, the script will create itself.

Thanks... and any suggestion on that ?

<{POST_SNAPBACK}>

think it should be possible.

With Psexec from sysinternals you can start a program/Script on PC A from PC B.

The Script can check if the directory exists and Net Share can be used to create the share.


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

I have tested... running my script on PC-A (Win2000), and check if a folder

"POS-Log" exists, it does not work at all. This is due to PC-B (WinXP) has

no sharing at all.... totally no sharing.

in this case... how can we create a folder named "POS-Log" in PC-B from PC-A ?

If as you said Psexec can do that... where can I download it ?

And, are you very sure of that it works even no sharing was done ? :)

Share this post


Link to post
Share on other sites

I have tested... running my script on PC-A (Win2000), and check if a folder

"POS-Log" exists, it does not work at all. This is due to PC-B (WinXP) has

no sharing at all.... totally no sharing.

in this case... how can we create a folder named "POS-Log" in PC-B from PC-A ?

If as you said Psexec can do that... where can I download it ?

And, are you very sure of that it works even no sharing was done ?  :)

<{POST_SNAPBACK}>

psexec is an utility which enables you to upload and run a program to another pc.

You can find it as part of the pstools on www.sysinternals.com .


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

sorry... I still don't see how a folder be created in C:\ of PC-B with this tool.

mind to explain how ?

a) Script run in PC-A, if folder does not exist in PC-B, create the folder

named "POS-Log" under C:\ Drive (No sharing at all of PC-:)

Thanks.... Cos I'm confused how the tool can perform this.... :)

Share this post


Link to post
Share on other sites

sorry... I still don't see how a folder be created in C:\  of PC-B with this tool.

mind to explain how ?

a) Script run in PC-A, if folder does not exist in PC-B, create the folder

    named "POS-Log" under C:\ Drive (No sharing at all of PC-:)

Thanks.... Cos I'm confused how the tool can perform this.... :)

<{POST_SNAPBACK}>

Let look at this in 2 separated tasks:

Task 1

=====

Assume you can run a script on pcB.

That script can check if the directory exists.

If not , create it and do a net share command to create the share.

Agree this is do able ?

Task 2

=====

Now the only challenge left is to get that script loaded onto pcB from pcA.

Thats were psexec comes in.

psexec \\pcB -u Administrator -p psw -c  script.exe

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

I wonder if a PC-A (Windows 2000)  that has no Shared folder at all

Do you mean you disabled the default admin shares? If not, every admin can access the share c$ on the PC and simply create the dir using DirCreate('\\pc-a\c$\newfolder').

Share this post


Link to post
Share on other sites

thanks JdeB amd Sugi....i'll try out u guys suggestions !

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

With simple share enabled (should be by default) on your XP machines, you can always use the admin share which is created automatically for each drive.

Admin share also enabled by default on win2k

\\PC-A\c$

\\PC-A\d$

Include the relevant credential in your script and you can create folders remotely.

Edited by nobby

CheersNobby

Share this post


Link to post
Share on other sites

With simple share enabled (should be by default) on your XP machines, you can always use the admin share which is created automatically for each drive.

Admin share also enabled by default on win2k

\\PC-A\c$

\\PC-A\d$

Include the relevant credential in your script and you can create folders remotely.

<{POST_SNAPBACK}>

I have tested out Sugi suggestion (same as what you said above), I failed

to create a new folder name "POS-Log" on \\PC-B (WinXP) from PC-A (W2K).

Anybody mind to help me out on this by providing sample ?

Note : PC-A (W2K) has 2 profiles, one is Administrator, another is STORE.

I want to remotely create a folder "POS-Log" on PC-B, from PC-A (W2K)

STORE account.

Thanks

Share this post


Link to post
Share on other sites

I have a 2000 computer networked with my xp computer also. The folders have different names, but they are there. On the win 2k computer, mine is listed as "My Documents" directly from the desktop. On my xp computer it is listed as C:\Shared Documents. Instead of creating a new folder, you might want to modify the names of those, so that they both match. The only reason being, that if you have a network, I don't think it will let you delete a shared folder completely, but I could be wrong.

Share this post


Link to post
Share on other sites

Just to test:

From the command line on PC-A, type

net use q: \\PC-B\c$

If you are logged in as an user that has admin rights to PC-B, it should map drive Q to the admin share on PC-B. If you are not logged on as above, you should be prompted for credentials.

If it fails, then you will have to enable simple shares on the PC-B (winXP).

Open an explorer window choose, Tools, Folders Options, View, under advanced settings, the last line.


CheersNobby

Share this post


Link to post
Share on other sites

If it fails, then you will have to enable simple shares on the PC-B (winXP).

Simple file sharing has absolutely nothing to do with accessing shares like c$. It just hides a few options in the explorer.

But like nobby said: try net use * \\pc-b\c$ in the command line and check the error message. If it's system error 53 then the admin shares are disabled. If it tells you that the login failed you'll have to enter an administrative account.

Share this post


Link to post
Share on other sites

ok.... thanks for another ideas !

i'll try it out.... hope this works !

you guys have enlighten me... may be it couldn't be

created due to i'm not logging in PC-B (WinXP) with

Admin rights.... :)

thanks again....

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0