B
bswenso2
Guest
I'm having VB write a batch file to send to a remote system via psexec.exe later on in the script. When it goes to execute the batch file, it fails due to these junk characters showing up in the beginning of the first line. I'm creating the file like so:
My.Computer.FileSystem.WriteAllText("C:\Program Files\Bob\Bob's Program\add_user.bat", "net localgroup """ & Group & """ /add DOMAIN\" & UserID, True)
Where Group is the local group I'm adding to and UserID is the domain login for the user.
When the script goes to execute it on the remote system, the batch file for some reason shows up as C:\WINDOWS\system32>net localgroup ""Remote Desktop Users"" /add DOMAIN\UserID
Any idea what could be causing this to happen?
Continue reading...
My.Computer.FileSystem.WriteAllText("C:\Program Files\Bob\Bob's Program\add_user.bat", "net localgroup """ & Group & """ /add DOMAIN\" & UserID, True)
Where Group is the local group I'm adding to and UserID is the domain login for the user.
When the script goes to execute it on the remote system, the batch file for some reason shows up as C:\WINDOWS\system32>net localgroup ""Remote Desktop Users"" /add DOMAIN\UserID
Any idea what could be causing this to happen?
Continue reading...