Sign in to follow this  
Followers 0
plgii

Running logon script

2 posts in this topic

I currently have all users authenticate to Linux box and run their logon script that is located on the Linux box this way:

XP Group Policy under logon scripts I have: \\servername\netlogon\joe.bat

works fine, but now I want to do this via Autoit script. example

dim $username = " "

$username = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon", "DefaultUserName")

$username1 = StringLower($username)

Runwait("\\servername\netlogon\$username1" & ".bat", "", @SW_HIDE)

this would make it so I only need one script, but for some reason it will not run the script, but if I just put the users name (i.e. joe.bat) in the Runwait it works fine.

What am I missing?

Share this post


Link to post
Share on other sites



Try RunWait("\\servername\netlogon\" & $username1 & ".bat", "", @SW_HIDE)

I currently have all users authenticate to Linux box and run their logon script that is located on the Linux box this way:

XP Group Policy under logon scripts I have: \\servername\netlogon\joe.bat

works fine, but now I want to do this via Autoit script. example

dim $username = " "

$username = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon", "DefaultUserName")

$username1 = StringLower($username)

Runwait("\\servername\netlogon\$username1" & ".bat", "", @SW_HIDE)

this would make it so I only need one script, but for some reason it will not run the script, but if I just put the users name (i.e. joe.bat) in the Runwait it works fine.

What am I missing?

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