Jump to content

Recommended Posts

Posted

Dear Script Experts,

Please, assist me to make the below code running.. I would like to run some app by logon script from the nearest domain controller, but fail. If I specify a domain cotroller explicitly - it works fine, but this code "@LogonServer & "\NETLOGON\PC\H\go.exe"" does not work... Thanks in advance!!

$UserID = "XXX";

$Password = "XXX";

RunAs ($UserID,@LogonDomain,$Password,0, @LogonServer & "\NETLOGON\PC\H\go.exe");

Posted

Hi and Welcome to the forums!!

Maybe @LogonServer isn't what you think it is? Have you made sure?

You could show it with a MsgBox() or ConsoleWrite() (shows at the bottom of SciTE).

Example:

MsgBox(0, "", @LogonServer & "\NETLOGON\PC\H\go.exe")

Posted

Thanks a lot for your reply!! Yes, this is what I need (verified): \\%logonserver%\NETLOGON\PC\H\go.exe. But the problem remains..

Kind regards,

Sergei

Posted

Does @LogonServer contain a space perhaps?

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
  • 2 weeks later...

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...