Hi, I'm completely new to scripting and AutoIT was recommended to me.
I’m trying to copy a Logon.vbs script to the Logon scripts folder in Win 7 x64 and add a registry key using AutoIT.
When compiled, the adding of the Reg key works fine but the copying/installing of the reg file to the Scripts\Logon folder will not play ball.
So far, I’ve tried the following two scripts but to no avail. Any ideas?
;Automate copying of .VBS file from local folder to Logon script folder
;Then add a Registry DWORD with a value of 1 to enable Logon Scripts to be run
#RequireAdmin
FileInstall(".\Logon.vbs", "C:\Windows\System32\GroupPolicy\User\Scripts\Logon\")
RegWrite ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System", "EnableLinkedConnections", "REG_DWORD", "00000001")
-------------------------------------------------------
;Automate copying of .VBS file from local folder to Logon script folder
;Then add a Registry DWORD with a value of 1 to enable Logon Scripts to be run
#RequireAdmin
RegWrite ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System", "EnableLinkedConnections", "REG_DWORD", "00000001")
Local $b = True
Local $dest = True
If $b = True & $dest = True Then FileInstall ("C:\Users\Paul\Desktop\ScriptingTools\New folder\Logon.vbs", $dest = @WindowsDir & "\System32\GroupPolicy\User\Scripts\Logon\")
Regards
I’m trying to copy a Logon.vbs script to the Logon scripts folder in Win 7 x64 and add a registry key using AutoIT.
When compiled, the adding of the Reg key works fine but the copying/installing of the reg file to the Scripts\Logon folder will not play ball.
So far, I’ve tried the following two scripts but to no avail. Any ideas?
;Automate copying of .VBS file from local folder to Logon script folder
;Then add a Registry DWORD with a value of 1 to enable Logon Scripts to be run
#RequireAdmin
FileInstall(".\Logon.vbs", "C:\Windows\System32\GroupPolicy\User\Scripts\Logon\")
RegWrite ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System", "EnableLinkedConnections", "REG_DWORD", "00000001")
-------------------------------------------------------
;Automate copying of .VBS file from local folder to Logon script folder
;Then add a Registry DWORD with a value of 1 to enable Logon Scripts to be run
#RequireAdmin
RegWrite ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System", "EnableLinkedConnections", "REG_DWORD", "00000001")
Local $b = True
Local $dest = True
If $b = True & $dest = True Then FileInstall ("C:\Users\Paul\Desktop\ScriptingTools\New folder\Logon.vbs", $dest = @WindowsDir & "\System32\GroupPolicy\User\Scripts\Logon\")
Regards