Markdup Posted April 18, 2006 Share Posted April 18, 2006 (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 April 18, 2006 by Markdup Link to comment Share on other sites More sharing options...
Xenobiologist Posted April 18, 2006 Share Posted April 18, 2006 (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 So long, Mega Edited April 18, 2006 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 Link to comment Share on other sites More sharing options...
Markdup Posted April 18, 2006 Author Share Posted April 18, 2006 (edited) Thanks for that. I was being dumb. but I would still would like to know what I was doing wrong Edited April 18, 2006 by Markdup Link to comment Share on other sites More sharing options...
CyberSlug Posted April 18, 2006 Share Posted April 18, 2006 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! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now