Jump to content

Recommended Posts

Posted (edited)

Hi all,

this is my first call for help.

At the company I'm working at, we are using a tool to perform all Active Directory related tasks. Within this tools we can integrate other tools so our daily tasks can get easier.

I want to create an AutoIt executable that is called by the main tool, a parameter (hostname) is passed to the small utility. The small utility takes the given parameter and will map the remote administrative C$ partition to a drive letter and will start explorer on that drive letter.

I have created the utility that runs fine when started from the command line (map_share.exe host_name) but it doesnt work when called from the main application. The utility gets the hostname as a parameter (I have checked that). I don't know what could be causing/missing. All the help will be apreciated. The code is as follows:

; - Code Start

; Map drive

$strDriveLetter = "T:"

$strNetShare = "\\" & $CmdLine[1] & "\c$"

;MsgBox(4096, "Test", $strNetShare, 10)

DriveMapAdd($strDriveLetter, $strNetShare)

; Explore network share

Run("C:\WINDOWS\EXPLORER.EXE /n," & $strDriveLetter)

Exit

; - Code End

Thanks,

Sarco

Edited by sarco
Posted

Is the tool started under a user context with sufficient rights to do the mapping?

Hi,

You also should post your call from the main application....

;-))

Stefan

Posted

The utility is started under a user account with sufficient permissions.

The main tool is Hyena and the command that is passed is: accc.exe %E%, where %E% is the hostname.

Thanks,

sarco

Posted (edited)

Hi,

do i miss something?

Your exefile with command is map_share.exe host_name

and you call it from hyena with accc.exe %E% ????

Or is map_share.exe called from accc.exe???

If yes, you should proof the calling from accc.exe for map_share.exe.

:D

Stefan

Edited by 99ojo
Posted

Hi,

do i miss something?

Your exefile with command is map_share.exe host_name

and you call it from hyena with accc.exe %E% ????

Or is map_share.exe called from accc.exe???

If yes, you should proof the calling from accc.exe for map_share.exe.

:D

Stefan

map_share.exe was just a bogus name :D Hyena calls directly accc.exe with the command accc.exe %E%

thanks,

Pedro

Posted

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
×
×
  • Create New...