Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2899
  • Last Modified:

Start Program Automatically after Windows XP boot

I'm setting up a couple of PC's that will access software on a server via Terminal Services.   I would like to completely automate this process, i.e., Push the Start button on the case, boot up, automatically use a predetermined remote desktop connection (with credentials to logon to the server) and reach the login screen for the software that I want to access - without end user intervention.  When the end user has finished working and logs out of the software, I would like for the client pc to shut down automatically.
0
baleman2
Asked:
baleman2
  • 5
  • 5
1 Solution
 
Heathcliff74Commented:
Open the remote desktop client. Fill in the destination and credentials if you wish. Then click "Save as" and save the rdp-file to an accessible location (for example: C:\Auto.rdp)

Create a batch file and copy these commands In it:

%systemroot%\system32\mstsc.exe "C:\Auto.rdp"
%systemroot%\System32\Shutdown -s -t 00

Make sure the path to the rdp-file in the batch-file is the same as the location where you saved the rdp-file.

Copy the new batch file to your startup folder of the current user:
%APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup\

OR to the startup-folder for all users:
%ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs\Startup\

That should do it.
0
 
baleman2Author Commented:
One question.  In order to do maintenance on the client at such time as I may need to do so - how will I be able to reach the Windows desktop INSTEAD of immediately logging on to the server?
0
 
Heathcliff74Commented:
Download the "Windows Server 2003 Resource Kit Tools" here:
http://www.microsoft.com/downloads/details.aspx?FamilyID=9D467A69-57FF-4AE7-96EE-B18C4790CFFD&displaylang=en
Install it. Then add this at the beginning of your batch-file:

@echo "Starting remote desktop in 5 secs. Press CTRL-C to cancel!"
@C:\Program Files\Windows Resource Kits\Tools\Sleep.exe 5

Make sure the path to Sleep.exe matches the path where you installed the tools. If you press CTRL-C you will be asked to terminate the batch-job. If you confirm with "Y" the remote desktop will not start.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
baleman2Author Commented:
Will attempt today and report ASAP.
0
 
baleman2Author Commented:
Sorry to be so late reporting results.  Am very satisfied because the pc does "boot" and move straight to the login screen of the server. . . and shuts down upon exit.  However, after the batch file begins to run the command:

@echo "Starting remote desktop in 5 secs. Press CTRL-C to cancel!" , this appears directly beneath:
CANNOT FIND THE FILE SPECIFIED.

So, I'm currently "locked" into booting straight to the server - can't stop the process.

Also, can the "command prompt" window (where the batch file commands appear) run in full-screen?

The Windows desktop appears behind it now.  This is going to lend itself to the "end user" trying to click on icons before the login to the server completes.
0
 
Heathcliff74Commented:
To break the cycle, I think there are 2 possibilities.
1. After the reboot, hit F8 and run safe mode. The batch-file will not run. You can remove or edit the batch-file from safe-mode and then boot normally again.
2. Minimize the remote-desktop screen, by hovering your mouse to the top-middle of the screen and wait for the yellow bar to appear and click minimize (not close, because then the batch-file will continue to shut-down). Then close the command-prompt window. This will break the batch-file. Then you can close the remote-desktop without the shutdown.

The "cannot find the file specified" probably means that the "sleep.exe" is not in the location you specified in the batch file. Verify the path and any type-errors in the batch-file.

I think you can only modify the size of the command-prompt by moving the batch-file to another location. Then put a shortcut to the batch-file in the Startup-folder. Then open the properties of the shortcut. Then under the layout-tab you can enter the window-size in characters. You have to try, which size is best for you. Alternatively, you could remove all icons from the desktop, since these are never meant to be used anyway.
0
 
baleman2Author Commented:
HeathCliff74 - This is what I call SUPPORT!!!!!   Every step was clear, concise, and absolutely accurate.  You COMPLETELY solved my problems.  Thanks so much!
0
 
Heathcliff74Commented:
Glad I could help. Good luck!
0
 
baleman2Author Commented:
One addendum if I may:
I have two of these pc's "autologging" in the same office.  The two are in their own small workgroup so as not to interfere with a larger LAN in the same building.  Only one of these two pc's has a printer (HP p2015 laserjet) connected to it via USB cable. . . and it is shared.  The 2nd PC has it installed as a "network" printer.  Would the "autologging" process have anything to do with the 2nd PC "not" being able to print to the shared printer on the 1st pc?
0
 
Heathcliff74Commented:
The autologon should not interfere. When you cancel the logon to the remote desktop, can you use the network printer from the local desktop?

If so then you should probably edit the rdp-file you saved for the autologon. Open the remote desktop client, expand the "options", click open and select the rdp-file. Go to the local-resources-tab and check the option "Printers". Go back to the general-tab and click save. That should bring the network-printer to your remote-desktop. Alternatively you could try to add the printer as a network-printer within the remote desktop.

If you are not able to use the printer from your local desktop, then that would be a different problem and most probably not related to the autologon or remote desktop.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 5
  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now