How To Run A Program From Notepad

Posted on  by  admin
  1. How To Run Code From Notepad
  2. How To Run A Java Program Using Notepad

We would like to let our users to run different specific application programs when they log in, e.g. User A will run Program A when log in, and User B will Run Program B when log in, etc.I tried to follow Microsoft write-up in the following link to accomplish our objectives stated above:to the above write-up for Window 2008 R2, it is possible to do the following: 'Specify the program that opens whenever the user connects to an RD Session Host server. The program specified is the only program that can be used by the user in theRemote Desktop Services session. When the user closes the program, the connection to the RD Session Host server closes.' I tried to test this function. I tried to start the Notepad.exe by specifying C:WindowsSystem32Notepad.exe in the User Account Environment Tab. Unfortunately, I can not make it happen.

I am not sure what I did wrong.It was suggested to me in another Microsoft forum to post this question in the RDP forum. In addition to what I tried above, I also tried to use GPO to accomplish my objectives, but was not successful.

Below is what I did:1. I created an OU, called 'My Users', as follows: ADDS=ACtive Dreictory Users and Computers = Mydomain.com =' My Users'.2.

I created a gpo in the OU, 'My Users', called 'User Group-1'.3. I created an OU, called 'Users', as follows: ADDS=ACtive Dreictory Users and Computers = Mydomain.com = 'Users'.4. In the OU, 'Users', I created a user account, called 'First User'.5. For Properties of 'First User', I made the following settings.Tab = Member of: 'Domain Users', 'Remote Desktop Users', GPO = 'User Group-1', and and OU = 'Users'Tab = Environment: Start the following Program at longon, 'c:windowssystem32notepad.exe'6. Please make sure the Remote Desktop Session Host Role Service is installed on the server.2.

In RD Session Host Configuration (tsconfig.msc), double-click on RDP-Tcp. On the Environment tab, please make sure that Run initial program specified by user profile and Remote Desktop Connection or client is selected.3.

Please test one method only at a time. I suggest you start with using the Environment tab in the Properties of the user account. For example, test with Notepad first by enteringc:windowssystem32notepad.exe in the Program file name box.4. After making the above changes, please log on to the server using Remote Desktop with the test user account.

Notepad should open automatically. Close Notepad and the session should log off automatically.Please reply back here with your results, whether positive or negative.Thanks.-TP.

Hi David,You are running Server 2008 (non-R2). I mistakenly thought you were running 2008 R2 because you mentioned the write-up. In your version the Role is named Terminal Services (Remote Desktop Services in R2) and the Role Service is named TerminalServer (Remote Desktop Session Host in R2).It is preferred to have Terminal Server and Active Directory on separate servers, however, it is not uncommon in small environments/special cases to have them run on a the same server.

It is fine to have the TS Licensing Role Service installedon a DC regardless.-TP. Please make sure the Remote Desktop Session Host Role Service is installed on the server.2. In RD Session Host Configuration (tsconfig.msc), double-click on RDP-Tcp. On the Environment tab, please make sure that Run initial program specified by user profile and Remote Desktop Connection or client is selected.3.

Please test one method only at a time. I suggest you start with using the Environment tab in the Properties of the user account. For example, test with Notepad first by enteringc:windowssystem32notepad.exe in the Program file name box.4. After making the above changes, please log on to the server using Remote Desktop with the test user account.

From

Notepad should open automatically. Close Notepad and the session should log off automatically.Please reply back here with your results, whether positive or negative.Thanks.-TP.

Thanks for your suggestion.I tried to install Remote Desktop Session Host Role Service; however, I can not find this service. There is a Terminal Seiivce Role = Terminal Server role. I am not sure whether 'Remote Desktop Session Host Role Service' is the same as 'Terminal ServiceRole'.Also when I tried to install Terminal Server role, I got a warning sign stating that it is not recommended to install this role. With that method, you can only run one program at a time, I think it's better that you try a 3rd party program that simulates to Publish application as Citrix. There are some very good paid programs. However I have a freeware program Remote Application Center,that program allows to publish application on Terminal Server and assigned run permission for users. When connecting from the client side, it will use the standard MS Remote Desktop Connection but it will pass the Application Name to the server, so the serverside will know which application that we want to run, it then launches that only application, and not the whole desktop.

With the standard RemoteApp, user still can access to the whole desktop of TS, that's not a good way to do.I have just released a new version 5.0 of Remote Application Center today, it's more compatible with both 32-bit and 64-bit Windows than all previous versions, and it uses the standard MSTSC.EXE to connect to the server. You could try it out tosee if it works for you. You can download it on my website at: Tran. Hi David,You are running Server 2008 (non-R2). I mistakenly thought you were running 2008 R2 because you mentioned the write-up. In your version the Role is named Terminal Services (Remote Desktop Services in R2) and the Role Service is named TerminalServer (Remote Desktop Session Host in R2).It is preferred to have Terminal Server and Active Directory on separate servers, however, it is not uncommon in small environments/special cases to have them run on a the same server.

It is fine to have the TS Licensing Role Service installedon a DC regardless.-TP. Apologize for taking so long to come back to you all. Well, I finally succeeded in running an application program when a user logs in and when the program closes the user logs out automatically.I followed TP's instructions. What I did is described below:1.

I found out that my Terminal Services Role was not installed, so I installed it. Server Manager = Click on Roles = Click on Add Roles = Select Terminal Services and Click Next.2. I did not install TS Licensing, as I am using a VPS account and it allows two RDP's. I will install TS Licensing when I would like to have more RDP's.3. The key thing to make this work is to open Terminal Services Configuration (tsconfig.msc), and double click on RDP-TCP. On the Environment tab, select 'Run initial program specified by user profile and Remote Desktop Connection or client'.

How To Run Code From Notepad

It doesseem like a strange place to make this selection.4. Everything worked find. By mistake, I did not select 'Run initial program specified by user profile and Remote Desktop Connection or client' on the Environment tab, instead I selected the first choice. As a result, I was locked out as an administratorand could not do anything further. I had to reinstall the Window 2008 server.Many, many thanks to TP. I have read many postings on the web and received many suggestions, and I could not make it work.

How To Run A Java Program Using Notepad

TP's suggestions were very specific and correct.Unfortunately, not all my problems in running my Window XP applications with Window 2008 Standard edition were solved. I will post a new question, titled ' Running Window XP application program with Window 2008 Standard Edition'.

Coments are closed