Sign in to follow this  
Followers 0
Agent Orange

Issue Running a script from a Novell Drive

11 posts in this topic

I'm having an issue running an autoit script from a Netware drive letter. The script calls another autoit exe with a runasset command. If it runs off that drive it errors out. If I run it off the local drive (as a test) it works just fine. The main script really needs to run off the novell drive letter. Is this just an issue with my script or has others seen general problems running autoit scripts from a Novell drive using a RunAsSet command?

thanks

Share this post


Link to post
Share on other sites



Problem could be that when you use runasset, the workstation disregards the drive mapping from the logged on user. If your script is using mapped drives, then change to UNC names and it should work.


CheersNobby

Share this post


Link to post
Share on other sites

I'm calling UNC paths. Let me explain the flow of this better.

We have a VB program (it resides on and is run from a Netware drive letter) it has a button that when clicked runs a exe complied GUI autoit script from a Windows share. The GUI program asks the user for their username, current password, and new password. The process works up to this point.

When the user click the Change Password button the program uses a RunAsSet command. This command provides the credentials of the account that has the rights to change users passwords on the Active Directory domain. After that it does a Run command and runs the changer.exe autoit script (it reisdes in on the same share as the last script) that actually does the password change. It break right when it tries to process the Run command....giving a "can't find directory" error.

Now, that said. If I run the GUI program by itself or copy it local to my PC, it run fine and changes the password. If I lauch the GUI from the VB program that is on the Netware drive...or if I copy the GUI program to the Netware drive, and try to run it I get that "can't find directory" error.

Share this post


Link to post
Share on other sites

Hey,

Sounds like the user specified in RunAsSet doesn't have rights or can't see the network location. (i.e if i run a script as a local administrator using RunAsSet here at work then i cant access Mapped drives because the Administrator account doesn't have them).

Hope that makes sense.

Cheers,

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Well, I don't believe it is a rights issue. I can manually do the process using that runasset user...Also, as I said, it runs when I take the launcher piece out. If it where a rights issue I shouldn't be able to run it in these situation either. It has something to do with the an issue when either program (the GUI or the VB) is run from a Novell drive. I can't understand why it would, sense all the VB program is doing is running the GUI program from a Windows share.

Edited by Agent Orange

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Have you tried to call the VB script using the UNC path rather than the mapped drive? I had the same problem with runasset.

Also, when the button is clicked, does the VB script use UNC or mapped paths?

Edited by nobby

CheersNobby

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

The VB prog uses a UNC path. It has to be releated to rights...somehow it is using the credential of the Novell user when it is launched from the Novell drive instead of using the RunAsSet credentials. When the same progs are started from the local drive it works.

Here is a snipit of the code that is dying. The error this this RunAsSet command as the issue....but only it the program is launched from aNovell drive.

RunAsSet("user", "ad", "pswd", 2)
Run('"\\server\vol1\TAPC\changer.exe" ' & GUICtrlRead($UserString) & " " & GUICtrlRead($currentpassword) & " " & GUICtrlRead($newpassword))
sleep(100)

RunAsSet()
Msgbox(0,"Status","Password Change Was Successful. Click Ok to Exit")
Edited by Agent Orange

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

I have the same problem, which I am trying to overcome.

Error: Unable to execute the external program.

The network name cannot be found.

I'm trying to figure out if this is a Novell issue, or AutoIt issue... or if there is a work around I'm missing...

By default NCP is enabled on Novell directories. Windows protocols do not talk the same language as NCP, and therefore NCP doesn't know how to deal with any request from Windows. This is where the Novell client comes in, to negotiate and translate.

If I were to go to a DC which doesn't have the novell client, and log in as domain admin - I will have the same issue accessing the UNC path to the Novell Drive: No network provider accepted the given network path.

If I were to set up a CIFS share on Novell, Windows would be able to get access to the share via UNC.

-----

Now, the question is - Novell client is on my machine (client), and I presume it is on yours as well. So why does autoit not communicate correctly?

This is what I am currently looking at.

I will post if I have anything - I would appreciate if you do the same :whistle:

Cheers.

Edited by MrBeatnik

Please correct me if I am wrong in any of my posts. I like learning from my mistakes too.

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

After looking at the situation, the env for the new (runas) user just needs drives mapped.

I am working on a script, and will post when done (tomorrow at least now).

Here is the psuedo basic process - some items need to be clarified, or have special steps.

1) Copy MAP.exe to local drive.

2) RunAS performed for CMD (to create basic test static env).

3) map P U:=SERVER/VOL:FOLDER

4) Enter FQ Netware Username

5) Enter Password.

U drive now mapped as server extension.

I have a script that was already opening a CMD window (hidden) with ControlSendPlus to enter user/pass info. I would prefer NOT to pass through cmd, but I think it's the only way for now.

At least with the drive mapped in the env here, everything should now work.

I'll be back with some more info soon (and a script)... if anyone wants to write one in the mean time, I'm off home!!

Edited by MrBeatnik

Please correct me if I am wrong in any of my posts. I like learning from my mistakes too.

Share this post


Link to post
Share on other sites

Sounds good...I look forward to seeing what you come up with. I look into this on my end as well.

Thanks

Share this post


Link to post
Share on other sites

Sorry for the long delay.

I have a solution that requires a 3rd party tool.

JRBTools from http://www.jrbsoftware.com/ is a suite of tools for Novell networks, allowing better control. It is likely that your IT dept has purchased this already. If not I highly recommend.

This includes JRBCX (a user context switcher more powerful than Novell CX) and is what I use to connect to the Novell network, and get access to drives. The psuedo in my last post is missing the JRBCX connection, and will not work (sorry about that I didn't realise I was using JRBCX at the time!).

Anyway, if you are still interested in my script (you WILL need JRBCX), then let me know and I'll post it up.

I might post it in a new thread anyway, but the autoit side is pretty simple and not really worthy of any notice. The JRBCX does all the control.

On the other hand, if we can examine what JRBCX does - and simulate it in autoit, then I would be interested and that would be note-worthy.

At the moment, my script does what we (I) want with JRBCX, and is therefore complete.

Let me know.

Thanks.


Please correct me if I am wrong in any of my posts. I like learning from my mistakes too.

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