Sign in to follow this  
Followers 0
Markdup

Network Folder Shares

4 posts in this topic

#1 ·  Posted (edited)

Ok I have search this forum and found a few threads that sort of explain what to do. But as I am new to programming its a bit over my head.

All I want to do is create a share on a network folder using Autoit.

********

$ShareServiceObj = ObjGet("WinNT://" & strcomputer & "/LanManServer")

$newshare = $ShareServiceObj.create("FileShare",$profileuser & "_p$")

********

Everytime I run this Autoit tells me unknown function name. What am I doing wrong. What have I left out?

Can someone please show me the way.

Edited by Markdup

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

HI,

I don't know whether that is what you want, but .. give it a try :(

Func netUse()
    Run(@ComSpec & ' /c ' & 'net use X: \\servername\freigabename /user:username passwort', "", @SW_HIDE)
EndFunc ;==>netUse

Or use net share ... for the other way round.

Hope that helps.

P.S: untested :think:

So long,

Mega

Edited by th.meger

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Thanks for that. I was being dumb.

but I would still would like to know what I was doing wrong

Edited by Markdup

Share this post


Link to post
Share on other sites

Welcome to the forums.

You need the latest AutoIt beta version for the Obj* functions.

A possible alternative would be the net share commands.

;Examples based on Microsoft's examples
#include <Process.au3>
_RunDOS('net share DataShare=c:\Data /remark:"For department 123."')
_RunDOS('net share DataShare /delete')
_RunDOS('net share list="c:\art lst"')

Hope that helps


Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!

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