
jronex
Members-
Posts
11 -
Joined
-
Last visited
jronex's Achievements

Seeker (1/7)
0
Reputation
-
can you give me an example of how that script wiil look so i'm guessing i would just split my script and add the following code RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run","script2.exre","REG_SZ", @ScriptFullPath);
-
below is the code , ; $Userid = "user" $psw = "password1";fake psw SetAutologon("Off","") ;retrieve parameters $param1="" IF $CmdLine[0] > 0 Then $param1=$CmdLine[1] EndIf ;Act on it Select Case $param1 = "" ;RunAsSet ($Userid, @ComputerName, $psw) ;This calls the first stip of the instllation; IE 6 Installation Run("\\10.140.66.63\production scripts\PFAMcinstallpart1.exe", "\\10.140.66.63\production scripts\") ;I'm using notepad here as a pointer for the program RunWait("notepad.exe step1.txt") SetAutologon("On","step1") Shutdown(6) Case $param1="step1" ;This calls the 2nd step of the installation; Java,dot.net fix, and MSDE Installation Run("\\10.140.66.63\production scripts\PFAMcinstallpart2.exe", "\\10.140.66.63\production scripts\") Runwait("notepad.exe step2.txt") SetAutologon("On","Step2") Shutdown(6) Case $param1="step2" ;This calls the 3rd step of the installation; Mobile Client Installation Run("\\10.140.66.63\production scripts\part3.exe", "\\10.140.66.63\production scripts\") RunWait("notepad.exe step3.txt") SetAutologon("On","step3") Shutdown(6) Case $param1="step3" ;This calls the 4th step of the installation: Mobile Notes Upgrade Installation Run("\\10.140.66.63\production scripts\partiv.exe", "\\10.140.66.63\production scripts\") RunWait("notepad.exe step4.txt") SetAutologon("On","step4") Shutdown(6) Case $param1="step4" ;This calls the 5th step of the installation;Regserv Part Run("\\10.140.66.63\production scripts\partvi.exe", "\\10.140.66.63\production scripts\") RunWait("notepad.exe step5.txt") SetAutologon("On","step5") Shutdown(6) Case $param1="step5" ;This calls the 6th step of the installation;SigPad Installation Run("\\10.140.66.63\production scripts\partvii.exe", "\\10.140.66.63\production scripts\") RunWait("notepad.exe step6.txt") ;just log off Exit EndSelect Func SetAutologon($sw, $step) #comments-start************************************************** This section of the code sets the autologing paramameters. #comments-end**************************************************** if $sw = "On" Then ; set the registry to start this program again after reboot RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run","automationscript","REG_SZ", @ScriptFullPath & "" & $step) ;setting the registry for autoadminlogin key to 1 for true RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Winlogon\", "AutoAdminLogon","REG_SZ","1") ;setting the registry for to default to the local domain name RegWrite("HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\", "DefaultDomainName", "REG_SZ", EnvGet("LOGONSERVER") ;settting the registry for the default user id RegWrite("HKEY_LOCAL_MACHINE\Software\Microsoft\Windows_NT\CurrentVersion\Winlogon\", "DefaultUserName", "REG_SZ", $Userid) ;setting the registry for the default password RegWrite("HKEY_LOCAL_MACHINE\Software\Microsoft\Windows_NT\CurrentVersion\Winlogon\", "DefaultPassword", "REG_SZ", $psw) EndIf ; #comments-start************************************************** This section of the code removes the autologing paramameters. #comments-end**************************************************** If $sw = "Off" Then ;Remove the registrykey to start this program again after reboot RegDelete("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run","automationscript") ;setting the registry for autoadminlogin key to 1 for true RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Winlogon\", "AutoAdminLogon","REG_SZ","") ;settting the registry for the default user id RegWrite("HKEY_LOCAL_MACHINE\Software\Microsoft\Windows_NT\CurrentVersion\Winlogon\", "DefaultUserName", "REG_SZ", "") ;setting the registry for the default password RegWrite("HKEY_LOCAL_MACHINE\Software\Microsoft\Windows_NT\CurrentVersion\Winlogon\", "DefaultPassword", "REG_SZ", "") EndIf EndFunc;
-
ohh i see now, what you mean; it is 2 lines the ; is not affecting the command .. sorry!
-
Not sure what you mean but it's a registry delet command and not a run command??
-
Below is the code that i modified to try to do reboots, but what is happening is that it try's to write to the appropriate step1.txt file and then fails to write file but able to do the reboot and does not continue script after reboot. thanks, ;Main $Userid = "user" $psw = "password"; SetAutologon("Off","") ;retrieve parameters $param1="" IF $CmdLine[0] > 0 Then $param1=$CmdLine[1] EndIf ;Act on it Select Case $param1 = "" ;RunAsSet ($Userid, @ComputerName, $psw) ;This calls the first stip of the instllation; IE 6 Installation Run("\\10.140.66.63\production scripts\PFAMcinstallpart1.exe", "\\10.140.66.63\production scripts\") ;I'm using notepad here as a pointer for the program RunWait("notepad.exe step1.txt") SetAutologon("On","step1") Shutdown(6) Case $param1="step1" ;This calls the 2nd step of the installation; Java,dot.net fix, and MSDE Installation Run("\\10.140.66.63\production scripts\PFAMcinstallpart2.exe", "\\10.140.66.63\production scripts\") Runwait("notepad.exe step2.txt") SetAutologon("On","Step2") Shutdown(6) Case $param1="step2" ;This calls the 3rd step of the installation; Mobile Client Installation Run("\\10.140.66.63\production scripts\part3.exe", "\\10.140.66.63\production scripts\") RunWait("notepad.exe step3.txt") SetAutologon("On","step3") Shutdown(6) Case $param1="step3" ;This calls the 4th step of the installation: Mobile Notes Upgrade Installation Run("\\10.140.66.63\production scripts\partiv.exe", "\\10.140.66.63\production scripts\") RunWait("notepad.exe step4.txt") SetAutologon("On","step4") Shutdown(6) Case $param1="step4" ;This calls the 5th step of the installation;Regserv Part Run("\\10.140.66.63\production scripts\partvi.exe", "\\10.140.66.63\production scripts\") RunWait("notepad.exe step5.txt") SetAutologon("On","step5") Shutdown(6) Case $param1="step5" ;This calls the 6th step of the installation;SigPad Installation Run("\\10.140.66.63\production scripts\partvii.exe", "\\10.140.66.63\production scripts\") RunWait("notepad.exe step6.txt") ;just log off Exit EndSelect Func SetAutologon($sw, $step) if $sw = "On" Then ; set the registry to start this program again after reboot RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run","automationscript","REG_SZ", @ScriptFullPath & "" & $step) ;setting the registry for autoadminlogin key to 1 for true RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Winlogon\", "AutoAdminLogon","REG_SZ","1") ;setting the registry for to default to the local domain name RegWrite("HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\", "DefaultDomainName", "REG_SZ", EnvGet("LOGONSERVER") ;settting the registry for the default user id RegWrite("HKEY_LOCAL_MACHINE\Software\Microsoft\Windows_NT\CurrentVersion\Winlogon\", "DefaultUserName", "REG_SZ", $Userid) ;setting the registry for the default password RegWrite("HKEY_LOCAL_MACHINE\Software\Microsoft\Windows_NT\CurrentVersion\Winlogon\", "DefaultPassword", "REG_SZ", $psw) EndIf ; If $sw = "Off" Then ;Remove the registrykey to start this program again after reboot RegDelete("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run","automationscript") ;setting the registry for autoadminlogin key to 1 for true RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Winlogon\", "AutoAdminLogon","REG_SZ","") ;settting the registry for the default user id RegWrite("HKEY_LOCAL_MACHINE\Software\Microsoft\Windows_NT\CurrentVersion\Winlogon\", "DefaultUserName", "REG_SZ", "") ;setting the registry for the default password RegWrite("HKEY_LOCAL_MACHINE\Software\Microsoft\Windows_NT\CurrentVersion\Winlogon\", "DefaultPassword", "REG_SZ", "") EndIf EndFunc;
-
awwwsooome i will try this..... and gets me pointed in the right direction . Thanks again for your feedback
-
installing MSDE so it requires a reboot for the next part of the installation. otherwise i would do what you suggested and close the other windows
-
Was wondering if there was a good way to continue running a autoit script after reboot. My initial thought was to call and load my script in stages and put it in the startup folder in windows and at the final stage del the script from the startup folder. The application i'm trying to automated the installation for requires for 3 reboots. Any ideas would be appreciated, TIA!!
-
Thanks Valuater!, that may have done the trick. One more question is there a way i can use double quotes in the run command, I have a UNC with spaces. I side step this using a batch file but would like to run it directly from my script. i.e. This is what I thought would work but it does not , my initial thoughts were using some escape char; anyway i want to use a quote within the UNC to call a program. ; Run(""\\sapcrdev\Depot\Mobile notes\OSS 716052 1234\Note716052-sp04-to-SP07.cmd"","\\sapcrdev\Depot\Mobile notes\OSS 716052\") thanks again for you help ,
-
Thanks I think the software is great! still testing it out but so far it's working for me Control ID is right but my problem comes at this first point of the code here: Run("\\sapcrdev\Depot\Mobile notes\OSS 716052\Note716052-sp04-to-SP07.cmd","\\sapcrdev\Depot\Mobile notes\OSS 716052\") WinWaitActive("SAP Mobile Upgrade Deployer - Note716052-SP04-To-SP07.mup"); send("{ENTER}") 'i'm trying to send the enter command to accept the active window screen and i'm guessing it is not accepting enter to close the window; so i'm thinking about using control click , so i use the autoinfo to see all the information on window and i do see anything listed 'contro under mouse' section .
-
I'm trying to send either a mouse click or a key command in order to close a window and i'm not having any luck; TIA .. thanks in advance here is the section of code that this problem occurs; the point of this program is to automate sap installations for an application roll out. Run("\\sapcrdev\Depot\Mobile notes\OSS 716052\Note716052-sp04-to-SP07.cmd","\\sapcrdev\Depot\Mobile notes\OSS 716052\") WinWaitActive("SAP Mobile Upgrade Deployer - Note716052-SP04-To-SP07.mup"); send("{ENTER}") WinWaitActive("SAP Client Upgrade","OK") ControlClick("SAP Client Upgrade","OK",2) ;phase2 -Copying and upgrading MsgBox(0,"***************", "COPYING sfabof.dll,TLFacades.dll" , 5) FileCopy("\\sapcrdev\Depot\Mobile notes\OSS 738761\*.dll","C:\Program Files\SAP\Mobile\bin") MsgBox(0,"*****************", "REGISTERING sfabof.dll,TLFacades.dll" , 5) Run("\\sapcrdev\Depot\Mobile notes\OSS 738761\sfabof.cmd","\\sapcrdev\Depot\Mobile notes\OSS 738761") ControlClick("Regsvr32","OK",2) Run("\\sapcrdev\Depot\Mobile notes\OSS 738761\TLFacades.cmd","\\sapcrdev\Depot\Mobile notes\OSS 738761") ControlClick("Regsvr32","OK",2) DirCreate("D:\Service Orders")