Completing Setup after “The Computer Restarted unexpectedly or encountered an unexpected error”

When Windows Setup hits an error and restarts (like if it panics or if you reset it because it appears to have hung), you just get the dreaded “The Computer Restarted unexpectedly or encountered an unexpected error” dialog box which you cannot recover from. Until now:

http://answers.microsoft.com/en-us/windows/forum/windows_7-system/error-message-the-computer-restarted-unexpectedly/b770f14d-e345-e011-90b6-1cc1de79d2e2

Run RegEdit in the machine (after Shift-F10 to get the CMD window).

HKLM/SYSTEM/SETUP/STATUS/ChildCompletion

Check for setup.exe on the right, and if the value is 1 change it to 3. Then close RegEdit and click the button to reboot again. This may allow Setup tom complete and get you a more functional Windows than you can get from Shift-F10.

Related:

  • No Related Posts

How to not allow a particular user to create a batch using scanplus

Hi Experts,

I have a query, we have a need to not allow some set of users from creating batched.

Im doing this validation in ScanPlus as soon as the batch creation starts.

Im able to show the validation message saying you cannot create a batch. But unable to kick the user out of the batch screen. User still gets the finish button.

How to forcefully delete the batch and bring the user back to the PRocess Selection page?

How do i get the details of the method to be overwritten? Can I have some sample code?

I tried BeforeBatchClose from IScanPlusTaskEvents but seems like thats not getting invoked.

Regards

Sleeba

Related:

  • No Related Posts

Windows 10 1803 Update Symantec must be manually uninstalled.

I do not need a solution (just sharing information)

This is going to be a long post.  it is to fix issues with Windows 10 1803 getting notification that Symantec must be manually uninstalled.

First you have to be at SEP Client 14.0.3 for Windows 10 1803 update of this to work. My version is 14.0.3929.1200.105 on server and most of my clients.

Script is saved as .txt and attached (I think) on this post,

Bottom of post has the text of the powershell script.

Some suggested fixes that did not work:

Cleanwipe will not resolve this issue, I tried that.

Re-installing windows also will not work unless you delete everything on the drive or format the drive during install.

Causes:

Essentially, what happened is that Symantec install is sent by a zipped package that has the executables in it.

Once you unzip the package, the executables that Windows update looks for is found in the install folder.

Windows 1803 update does not look everywhere, but will look anywhere that the system can access.

So if you are deploying with SCCM, there is an install package in ccmcache from the last install.

If you contacted support on a previous version and they sent you a 7zip exe to extract, then the exe’s are somewhere else.

If you deployed using SCCM then the exe’s will be in a subdirectory under the c:windowsccmcache directory.

If you deployed using a single exe, then it extracted somewhere and you may have the exe’s there.

I called support for a script to fix this.  Got nowhere.  That is anothe story, best left out.

My Solution

I made a powershell script to find and rename the 2 executables if they are outside of Program Files or Program Files (x86)

For SCCM to be able to use this, the .ps1 probably needs to be signed.

Attached is a sample of the script.

<#
This Script is to look for any Symantec Endpoint Protection files that prevent Windows 10 Update to 1803
If a computer has any install folder for an older version these files will exist in the install folder.  Windows update checks the version.
ccsvchst.exe Version 13.3.1.14
smc.exe Version 14.0.3929.1200
Windows Update to 1803 gives error that 2 Symantecs must be uninstalled, 1 for each file.
To find the offending file names look in this folder (after the update has failed or they will not be listed.)
C:$WINDOWS.~BTSourcesPanthersetupact.log
Search for ‘Manual uninstall required’ (no tick marks.)
References:
https://www.symantec.com/connect/forums/solved-windows-10-1709-cant-update-and-clean-wipe-cant-full-remove-endpoint-protection

Point of contact, Brian VanTassel
Agency for Persons with Disabilities, Florida.

Notes:  This has to be signed to run through SCCM
Built for deployment through SCCM Task Sequence.

#>

Script renames either ccsvchst.exe Version 13.3.1.14 or smc.exe Version 14.0.3929.1200 if version is less than what is shown

In this script, change ‘SomeServerName’ in the line to your share path.  Create the folders for the path.  The script writes results to the file.  The results are attempted.  Depending on system rights, it may not be the case.  This indicates the steps ran, but you should test it.

$outfile=”\SomeServerNameDeployLogsSymantecWin10-1803RenameFixWin10-FilesRenam_Status-Apps.txt

This is where the accumulated log is written to.  Domain users and Domain Computers will need read and write to this share.

You will also need a share for deploy files.  This will need to be read for domain users and domain computers.

Sign the script using a code signing certificate (another story there.)

Example of results shows Computer name, path to file, version information and what was attempted:

ComputerName-10;;C:Program Files (x86)SymantecSymantec Endpoint Protection14.0.3929.1200.105BinccSvcHst.exe;13.3.1.14;Not Modified
ComputerName-10;;C:Program Files (x86)SymantecSymantec Endpoint Protection14.0.3929.1200.105BinSmc.exe;14.0.3929.1200;Not Modified
ComputerName-10;;C:Program Files (x86)SymantecSymantec Endpoint ProtectionSmc.exe;14.0.3929.1200;Not Modified
ComputerName-10;;C:ProgramDataSymantecSymantec Endpoint Protection14.0.3929.1200.105DataCached InstallsProgram FilesSymantecNameVersionBinccSvcHst.exe;13.3.1.14;Not Modified
ComputerName-10;;C:ProgramDataSymantecSymantec Endpoint Protection14.0.3929.1200.105DataCached InstallsProgram FilesSymantecNameVersionBinSmc.exe;14.0.3929.1200;Not Modified
ComputerName-10;;C:ProgramDataSymantecSymantec Endpoint ProtectionCurrentVersionDataCached InstallsProgram FilesSymantecNameVersionBinccSvcHst.exe;13.3.1.14;Not Modified
ComputerName-10;;C:ProgramDataSymantecSymantec Endpoint ProtectionCurrentVersionDataCached InstallsProgram FilesSymantecNameVersionBinSmc.exe;14.0.3929.1200;Not Modified
ComputerName-10;;C:UsersAll UsersSymantecSymantec Endpoint Protection14.0.3929.1200.105DataCached InstallsProgram FilesSymantecNameVersionBinccSvcHst.exe;13.3.1.14;Not Modified
ComputerName-10;;C:UsersAll UsersSymantecSymantec Endpoint Protection14.0.3929.1200.105DataCached InstallsProgram FilesSymantecNameVersionBinSmc.exe;14.0.3929.1200;Not Modified
ComputerName-10;;C:UsersAll UsersSymantecSymantec Endpoint ProtectionCurrentVersionDataCached InstallsProgram FilesSymantecNameVersionBinccSvcHst.exe;13.3.1.14;Not Modified
ComputerName-10;;C:UsersAll UsersSymantecSymantec Endpoint ProtectionCurrentVersionDataCached InstallsProgram FilesSymantecNameVersionBinSmc.exe;14.0.3929.1200;Not Modified

To deploy the script in SCCM I used a Task Sequence, with 2 run command steps.

it will probably work with one step, but I copy the script to a folder I use on the computers for local install logs.

Most of my Task Sequences create this folder if it does not exist:  “C:ProgramDataCM_Install_logs”

Copy Command line: 

cmd.exe /c copy /y “\ServerNameDeploy File ShareScriptsWin101803SymFileRenamFix.ps1″ “C:ProgramDataCM_Install_logs”

Run powershell cmd:

cmd.exe /c PowerShell.exe -executionpolicy unrestricted -file “C:ProgramDataCM_Install_logsWin101803SymFileRenamFix.ps1”

Powershell Script (was named Win101803SymFileRenamFix.ps1) Start below this line

<#
This Script is to look for any Symantec Endpoint Protection files that prevent Windows 10 Update to 1803
If a computer has any install folder for an older version these files will exist in the install folder.  Windows update checks the version.
ccsvchst.exe Version 13.3.1.14
smc.exe Version 14.0.3929.1200
Windows Update to 1803 gives error that 2 Symantecs must be uninstalled, 1 for each file.
To find the offending file names look in this folder (after the update has failed or they will not be listed.)
C:$WINDOWS.~BTSourcesPanthersetupact.log
Search for ‘Manual uninstall required’ (no tick marks.)
References:
https://www.symantec.com/connect/forums/solved-windows-10-1709-cant-update-and-clean-wipe-cant-full-remove-endpoint-protection

Point of contact, Brian VanTassel
Agency for Persons with Disabilities, Florida.

Notes:  This has to be signed to run through SCCM
Built for deployment through SCCM Task Sequence.

#>
$outfile=”\SomeServerNameDeployLogsSymantecWin10-1803RenameFixWin10-FilesRenam_Status-Apps.txt

#$env:COMPUTERNAME
#Get-Childitem –Path C: -Include ccsvchst.exe,smc.exe -File -Recurse –force -ErrorAction SilentlyContinue | Select *
#$Paths2Files = Get-Childitem –Path “C:” -Include ccsvchst.exe,smc.exe -File -Recurse –force -ErrorAction SilentlyContinue | Select name,Fullname
$Paths2Files = Get-Childitem –Path “C:” -Include ccsvchst.exe,smc.exe -File -Recurse -ErrorAction SilentlyContinue | Select name,Fullname
foreach ($file in $Paths2Files){

$VersionInfo = (Get-Item $file.fullname).VersionInfo
    $FileVersion = (“{0}.{1}.{2}.{3}” -f $VersionInfo.FileMajorPart,
    $VersionInfo.FileMinorPart,
    $VersionInfo.FileBuildPart,
    $VersionInfo.FilePrivatePart)

#Write-Host $file.fullname $fileversion

If ($file.fullname -like “*Program Files*SymantecSymantec Endpoint Protection*”) {$action=”ProgramFiles Not Modified”}
ElseIf ($file.name -eq “ccsvchst.exe”) {
If ($FileVersion -lt “13.3.1.14”) {$action=”renamed”
Rename-Item -Path $file.fullname -NewName “ccsvchst.ex_”}
ElseIf ($FileVersion -eq “13.3.1.14”) {$action=”Not Modified”}
}

ElseIf ($file.name -eq “smc.exe”) {
If ($FileVersion -lt “14.0.3929.1200”) {$action=”renamed”
Rename-Item -Path $file.fullname -NewName “smc.ex_”}
ElseIf ($FileVersion -eq “14.0.3929.1200”) {$action=”Not Modified”}
}

Write-Host $file.fullname $fileversion $action
$out2file=$env:COMPUTERNAME+”;”+$date+”;”+$file.fullname+”;”+$fileversion+”;”+$action
$out2file | out-file -filepath $outfile -append
}

# SIGNATURE BLOCK WAS HERE
# End signature block WAS HERE

End of script above this line

    File Attachments:
    0

    Related:

    • No Related Posts

    7015122: How to use Dumpcap to capture a rolling packet trace

    This document (7015122) is provided subject to the disclaimer at the end of this document.

    Environment

    Novell Client 2 SP3 for Windows

    Situation

    For intermittent problems, it can be impossible to predict when and where the problem may next occur.

    Need to gather LAN packet trace information over a long period of time.

    Resolution

    The Wireshark command line utility called ‘dumpcap.exe’ can be used to capture LAN traffic over an extended period of time. Wireshark itself can also be used, but dumpcap does not significantly utilize the computer’s memory while capturing for long periods of time. By configuring dumpcap to use a ring buffer, you can capture a large number of packets over a long period of time without adversely impacting the performance of the workstation running dumpcap.

    Dumpcap can be run on a machine which might experience the problem, or on a second machine. If on a second machine, it is necessary to place the machine running dumpcap in the collision domain of the target workstation. This will require a dumb hub or a visible / mirrored port on a switch.

    Note: Choose the “Run as Administrator” option when launching the CMD.EXE session which will run Dumpcap.exe.

    A typical syntax is:

    c:”Program Files”Wiresharkdumpcap.exe -i <interface> -s 1518 -w <somename>.cap -b filesize:16384 -b files:256 -f “host xxx.xxx.xxx.xxx”


    This command will create a series of 256 files (-b files:), each size 16384 KB (-b size:), with packets truncated at 1518 bytes (-s 1518). The files will follow the naming convention and be located in the path designed after the -w parameter. If you just have one interface, the -i <interface> switch can be omitted. You can see a list of your interfaces (1, 2, 3, etc.) by running dumpcap with the -D parameter. The -f parameter is used only if tracing from a second machine. Substitute the IP address of the machine seeing the problem.

    For example:
    c:”Program Files”Wiresharkdumpcap.exe -i 1 -s 1518 -w c:tracesSR12345678.cap -b filesize:16384 -b files:256 -f “host 192.168.1.1”
    This command will capture packets on interface 1 (as displayed in “dumpcap.exe -D”) and will create a series of 256 files, each of size 16384 KB, with packets truncated at 1518 bytes. The files will follow the naming convention “SR12345678” and be located in the c:traces directory. The packets will be filtered to include traffic on 192.168.1.1.
    See dumpcap.html in the Wireshark download package (available from wireshark.org) for additional information about dumpcap and its command line parameters.

    Additional Information

    See also TID 3892415, “How to use Wireshark to capture a packet trace.”

    Disclaimer

    This Support Knowledgebase provides a valuable tool for NetIQ/Novell/SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented “AS IS” WITHOUT WARRANTY OF ANY KIND.

    Related:

    • No Related Posts

    7022850: How to remove the Microsoft VBA installed by Reflection Desktop 16

    The Microsoft VBA can be removed by a Windows Installer (msiecec.exe) command line. Many versions of Reflection contain the same build of the VBA code, so the same msiexec command line can be used for multiple versions. To find the uninstall command line requires the manual inspection of the Microsoft Windows registry keys found at:

    HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionInstallerUserDataS-1-5-18Products

    Open and expand each registry key and examine the “InstallProperties” for the “UninstallString” key to determine the appropriate msiexec /X {GUID} command

    For example:

    Product: Microsoft Visual Basic for Applications 7.1 (x86) English

    Msiexec Command: MsiExec.exe /x {BAB89D31-4C55-472B-8909-6CBE2CC276B1}

    Here is a batch file that can be used to remove many versions of the VBA modules installed by the Reflection software:

    echo off

    echo This Batch file will remove all versions of VBA installed by Reflection

    :: This only works with the English language install of VBA

    pause

    :: this information can be found in the HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionInstallerUserDataS-1-5-18Products keys

    :: remove VBA for Reflection 2011

    :: remove VBA core

    msiexec /x {FB97C283-1F3C-42D4-AE01-ADC1DC12F774}

    msiexec /x {A13D16C5-38A9-4D96-9647-59FCCAB12A85}

    :: remove English language

    msiexec /x {179D679D-047F-491D-8783-D4BE596D2242}

    :: remove VBA for Reflection R2014

    :: remove VBA core

    msiexec /x {74170BFD-A50C-46D9-8AF2-AF0A0CE017DD}

    :: remove English language

    msiexec /x {A13D16C5-38A9-4D96-9647-59FCCAB12A85}

    :: remove VBA for Reflection Desktop v16

    :: remove VBA core

    msiexec /x {90120000-0070-0000-0000-4000000FF1CE}

    :: remove English language

    msiexec /x {BAB89D31-4C55-472B-8909-6CBE2CC276B1}

    :: pause to see output before exit

    echo Reflection VBA removal complete

    pause

    As you run the batch commands above, you will receive Windows User Access Control (UAC) prompts when the msiexec commands find an installed product.

    Prompts to uninstall products (which should be answered in the affirmative) will also appear as shown below:

    and

    Since the batch file contains many msiexec commands to uninstall products that may not exist on your PC, be prepared for the display of the following error message which is appropriate and expected and shown below:

    Related:

    • No Related Posts

    7022896: Unable to use PackageModel or ActivateModel commands

    This document (7022896) is provided subject to the disclaimer at the end of this document.

    Environment

    Verastream Host Integrator 5.5 or higher

    Situation

    • Windows Server – any version
    • Verastream Host Integrator (VHI) is installed to a non-C: location, for example, D:Program FilesAttachmateVerastream
    • After including the location of VHI utilites PackageModel and ActivateModel in the system’s PATH, attempting to use these commands in a command-prompt console results in the message: ‘D:Program’ is not recognized as an internal or external command, operable program or batch file.

    Resolution

    Install VHI to a location on D: that does not have a folder name with spaces.

    Cause

    By default, 8.3 file and folder name generation is not enabled for secondary drives in Windows. These VHI commands use an environment variable set at install time, VHI_ROOT. If 8.3 names are not enabled, this variable will contain spaces in the install-location of VHI, which will cause this issues with its use in .bat files. When VHI is installed to C:, where 8.3 names are usually enabled, the 8.3 folder name is assigned to VHI_ROOT.

    Disclaimer

    This Support Knowledgebase provides a valuable tool for NetIQ/Novell/SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented “AS IS” WITHOUT WARRANTY OF ANY KIND.

    Related:

    • No Related Posts

    Receiver (4.9|4.10|4.11) installation stuck at setintegritylevel.exe while installing it through Non interactive desktop of a Admin user.

    Please review the User access rights management and ensure that the user has following rights:

    1) Logon as batch

    2) Logon as Service

    If above steps doesn’t help, the only work around available is to install the Receiver under system context using psexec:

    reg add HKCUSoftwareSysinternalsPsExec /V EulaAccepted /T REG_DWORD /D 1 /F

    psexec -s -i -h CitrixReceiver.exe /EnableCEIP=false /noreboot /silent SELFSERVICEMODE=False ALLOWADDSTORE=N /includeSSON /ENABLE_SSON=Yes /AutoUpdateCheck=disabled ADDLOCAL=ReceiverInside,ICA_Client,SSON,AM,SELFSERVICE,USB,DesktopViewer,Flash,Vd3d,Webhelper

    Related:

    • No Related Posts

    7021931: Automating SSH, SFTP, and SCP with Windows Scheduled Tasks

    Automating SSH, SFTP, and SCP connections using the Windows Scheduled Tasks utility and the command line requires the following steps:

    Note: If the Windows account that is used to run the task is a member of the Administrative group, skip both Step 3 and Step 4. There is no need to add privileges to the Administrative account. However, if your company security policy prohibits running a task with an account that is part of the Administrator’s group, follow Step 3 and Step 4 to amend the account permissions.

    Step 1: Configure Public Key Authentication with a Blank Passphrase

    1. Launch the Reflection FTP client.
    2. Under “Connect to FTP Site,” click New.
    3. Enter the name of the host you will be connecting to. Click Next
    4. Under “Login Information,” click the Security button.
    5. Click the “Secure Shell” tab.
    6. If “Use Reflection Secure Shell” check box is not already checked, select it.
    7. Click Configure.
    8. On the User Keys tab, click Generate.
    9. Select the key type and length required to satisfy your corporate security policy. Select the No passphrase check box, and then click Create. Click Save. The new private key appears in the User Keys list.
    10. Verify that the new key is selected (a check mark is displayed in the Use column).
    11. Click Upload, and follow the prompts to upload the public key to the remote host. You will most likely be prompted for a password during this process.
    12. Once the upload process has completed, click OK.
    13. Click OK to close the “Security Properties” dialog box.
    14. In the Login Information dialog box, click Next.
    15. In the User name field, enter the user name that should be used for the automated transfers. Click Next.
    16. Click Finish. By default, we will try to connect to the remote SFTP server using the new key we have generated from above.

    If connection is successful, key authentication is now configured for all SSH, SFTP, and SCP connections from the Windows account you are logged in with, to the specified host, using the specified host account. This includes both Windows-based clients and command line clients.

    If a banner requiring user interaction is normally displayed when you connect to the host, on the General tab, change the Logging Level to Quiet. This step is not necessary if you do not have a login banner, or if you are using the command line client, as no user interaction is required in those scenarios.

    Note: If public key upload was successful but public key authentication fails, it is possible that the remote SFTP server stores the user’s keys in a none default location. Please contact the remote administrator and have the key relocated to the correct folder.

    Step 2: Create a Batch File with Connection Commands

    Create a Windows batch (.bat) file that contains the connection commands appropriate for your task. For a complete list of SFTP, SCP, and SSH, syntax and commands, open a Windows command prompt and enter <command> -? , where command is SFTP, SCP, or SSH.

    Batch file examples:

    "C:Program FilesAttachmateRSecuresftp.exe" -B "C:pathbatch_file.txt" user@host

    "C:Program FilesAttachmateRSecurescp.exe" user@host:file "C:pathfile"

    cmd /c ""C:Program FilesAttachmateRSecuressh.exe" user@host ls > "C:pathfile.txt""

    Before proceeding, run each batch file manually to ensure it works correctly.

    If the batch file is not working, you can collect error and debug logging information for troubleshooting using syntax such as:

    "C:Program FilesAttachmateRSecuresftp.exe" -vvv -B "C:pathbatch_file.txt" user@host 1> "C:pathdebug.txt" 2> "C:patherrors.txt"

    Note the following:

    • If you prefer not to create a batch file for the required tasks, you can configure the task to run the appropriate product executable instead (sftp.exe, scp.exe, or ssh.exe). In this case, after creating the task in “Step 5: Configure Windows Schedules Tasks to Run the Batch Files,” edit the task to include the appropriate command syntax, as shown in the examples in Step 2. (This customization is done in the Run field of the Task tab.)
    • If you need to run the batch file or executable with a Windows account other than the one configured for public key authentication, you can use the –k switch to point to the .ssh directory of the configured account, which contains the required keys and configuration file (named config).

    Step 3: Assign “Log on as a Batch Job” Permissions

    For tasks to be run by the Task Scheduler, Windows requires that the account running the task be logged on to Windows or have “Log on as a batch job” permissions. These permissions are automatically assigned:

    • To members of the Administrator’s group.
    • In Windows XP, if you are a member of the Users group and you create a scheduled task.

    Note: When a task is created, these permissions are not automatically added for members of the User’s group in Windows 7 or Windows Server 2008.

    If the account you plan to use does not have “Log on as a batch job” permissions, follow the steps below to add these permissions to the account.

    Warning: For security reasons, we recommend that you only grant these additional privileges to the required user or users.

    1. Login to the Windows system with an account that is part of the Administrator’s group.
    2. Click Start > Run; in the Open field, enter secpol.msc, and then click OK.
    3. Double-click Local Policies > User Rights Assignment.
    4. Double-click Log on as a batch job.
    1. Click Add User or Group, and add the user or group.
    2. Click OK to save the change and exit the properties window.

    Step 4: Assign Account Permissions to the Reflection SSH Com Server

    If a scheduled task is configured to run sftp.exe, scp.exe, or ssh.exe, and both of the following are true, the task will fail due to insufficient privileges:

    • The user account used to generate the public keys and to schedule the task does not belong to the Administrator’s group, and
    • The user is currently logged out of Windows.

    When this occurs, the Last Results column (Last Run Results in Windows 7 and Windows Server 2008) in Scheduled Tasks displays 0x57. This code indicates that additional privileges are required to run the Reflection SSH COM server (rssh.exe) when the user is not logged in to Windows.

    The privileges required to run the executable are Local Launch and Local Activation. These permissions are automatically assigned to members of the Administrator’s group. If the public key was generated by, and the scheduled task belongs to, a user who is part of the Administrative group, you can skip this section. Otherwise, follow the steps below to add these specific permissions to the user account used to generate the key and run the scheduled task.

    Warning: For security reasons, we recommend that you only grant these additional privileges to the required user or users.

    1. Login to the Windows system with an account that is part of the Administrator’s group.
    2. Click Start > Run, in the Open field, enter dcomcnfg.exe, and then click OK.
    3. Double-click Component Services > Computers > My Computer and click DCOM Config.
    4. Scroll down to the object named {AA76F3C3-B544-4E32-B5CC-38F0B09CB5F}, right-click the object and click Properties. You are now in the properties of the SSH COM object.
    View Full Size

    Figure 1 - Access the Properties of the SSH COM Object
    Figure 1 – Access the Properties of the SSH COM Object
    1. On the Security tab, in the Launch and Activation Permissions group, select Customize, and then click Edit.
    2. Click Add. Locate and add the required user(s) or group(s), and then click OK.
    3. In the “Group or user names field,” select the user or group
    4. In the Allow column, select the Local Activation check box, and verify that Local Launch is already selected. (Local Launch should be selected by default.)
    Figure 2 - Configure new user (Lilly) for Local Launch and Local Activation Permissions

    Figure 2 – Configure new user (Lilly) for Local Launch and Local Activation Permissions

    1. If you are configuring multiple users or groups, repeat steps 6 through 8 for all users and groups.
    2. Click OK > OK and close the Component Services dialog box.

    Step 5: Configure Windows Scheduled Tasks to Run the Batch Files

    Follow these steps to automate the file transfer using Scheduled Tasks.

    In Windows 7 or Windows Server 2008:

    1. From the Administrative Tools menu, select Task Scheduler.
    2. Click Action > Create Basic Task.
    3. When prompted, enter a name for the task, then click Next.
    4. Under Task Trigger, select “When do you want the task to start.” Click Next and fill in the details.
    5. Under Action, select “Start a program,” click Next, and then browse to and select the batch file you created in Step 2: Create a Batch File with Connection Commands. Click Open, and then click Next.
    6. Under Finish, select “Open the Properties dialog for this task when I click Finish.”
    7. On the General tab of the Properties dialog box, under Security options verify that the user name shown under “When running the task, use the following user account” is the Windows account used to setup the public key authentication. If not, modify this setting.
    8. Select “Run whether user is logged on or not,” and then click OK.

    Note: If the Windows account that is used to run the task is a member of the Administrative group, under the General tab, select the option “Run with highest privileges.”

    In Windows XP:

    1. From the Control Panel, select Scheduled Tasks.
    2. In the Scheduled Task Wizard, browse to and select the batch file you created in “Step 2: Create a Batch File with Connection Commands,” and then click Open.
    3. When prompted, enter a name for the task, then set the frequency, start time and start date.
    4. Configure the task to run under the Windows account used to setup the public key authentication.
    5. Select “Open advanced properties for this task when I click Finish,” and then click Finish.
    6. Make sure that “Run only if logged on” is not selected (the default) and click OK.

    At this point you should see your new task listed in the Task Scheduler (or Scheduled Tasks) window.

    Test the New Task

    While still logged in to Windows, right-click the new task and select Run. If the task successfully runs, the Last Result field in the Scheduled Tasks window should show 0x0. (On Windows 7 and Windows Server 2008, this “Last Run Result” field also includes the statement “The operation completed successfully.”) If you encounter problems, please refer to the following:

    • In Windows 7 and Windows Server 2008, in the Task Scheduler window, select the task, click the History tab, and see if there are any logged errors.
    • In Windows XP, in the Scheduled Tasks window, click Advanced > View Log, and see if there are any logged errors.

    Additional Troubleshooting help.

    Set the Final Schedule

    Once you have verified that the task can be successfully run, make any additional configuration tweaks to the task schedule, and you are done. The automated SSH, SFTP, or SCP task should now run automatically.

    Related:

    • No Related Posts