?
Solved

logon script not running

Posted on 2006-03-27
15
Medium Priority
?
1,288 Views
Last Modified: 2012-05-05
We currently have logon scripts running for users, which map drivers, and do other tasks. I tried to change a logon script to run a different file, but it seems that that file does not run
..

The script I am trying to run is a MS CRM 3.0 terminal services script, and instructions from the file are found here:

Step B: Prepare the terminal server

   1. Create a network share where all the domain users have read access.
   2. Copy the contents of the download to the share.
   3. Open the TermInstall.cmd file in a text editor.
   4. Edit the Terminstall.cmd file with values that are specific to your deployment.
         1. SOURCE - Location of the network share created in step 1.
         2. CRMPATH - Path where Microsoft CRM client for Outlook is installed (the default path is "%ProgramFiles%\Microsoft CRM").
         3. WEBAPPURL - URL of the server running Microsoft CRM Server.
   5. Link the Terminstall.cmd file to each Microsoft CRM user's Logon Script.
         1. Open Active Directory Users and Computers.
         2. Open each Microsoft CRM user's properties, and click the Profile tab.
         3. Under the Logon Script, type the path to the TermInstall.cmd file (for example "\\MyShare\CRM\TermInstall.cmd install").

Note   You can also do step 5 above by using the Group Policy object.

--

so basically I run that terminstall.cmd install command inside a batch file, because by putting in "\\MyShare\CRM\TermInstall.cmd install" nothing happens. If I run the command locally logged in, it runs fine, so its not running from the script. and I think it has something to do with the quotes


any ideas?
0
Comment
Question by:shankshank
  • 8
  • 5
  • 2
15 Comments
 
LVL 43

Expert Comment

by:Steve Knight
ID: 16306186
You don't need the quotes... if you already have a login script defined to map drives in then drop these files in a directory readable by all necessary people and with a share with suitable permissions then put

call \\server\share\terminstall.cmd install

into your current login script.

Should work fine.  Try putting PAUSE at the beginning of the script to see if it stops.

If you are not seeing the DOS type command window at all then turn on displaying of these legacy login scripts which are turned off being visible by default. I think it is under here with other logon script settings but can't check at the moment:

Computer Configuration
      Administrative Templates
            Windows Components
                  System
                        Logon
                              Run logon scripts synchronously = Enabled
                              Run startup scripts visible = Enabled
                              Run shutdown scripts visible = Enabled
                              Run legacy login scripts visible = Enabled

hth for starters

Steve
0
 
LVL 5

Author Comment

by:shankshank
ID: 16310659
It still doesn't seem to run


0
 
LVL 43

Expert Comment

by:Steve Knight
ID: 16310696
When you enter in the Start | Run box the same UNC path does it run the batch file OK?

Also BTW when you put in quotes you need those around the unc path and the install entry is the paramater which goes afterwrds, i.e.

"\\server\share\terminstall.cmd" install as the login script entry.

hth

Steve
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 5

Author Comment

by:shankshank
ID: 16310729
I tried putting a pause too, and cannot see the script running. See I am putting this in the AD user login script, hoping Citrix will run it. but this obviously is not happening.
0
 
LVL 16

Accepted Solution

by:
Redwulf__53 earned 1500 total points
ID: 16322657
In your current vbscript include the following:

set shell = createobject("wscript.shell")
shell.run "\\server\share\terminstall.cmd install"

Personally, I would add it directly in the Citrix server's Group Policy (with loopback) as a separate login script, so it only runs when the users log on to the citrix server, and not when they log on to a regular workstation.

0
 
LVL 5

Author Comment

by:shankshank
ID: 16322696
redwulf, Its just a batch file, and not a vbscript, does your code still apply?

And as far as group policies, should I create a new one with that login script and apply it to that machine directly?
0
 
LVL 5

Author Comment

by:shankshank
ID: 16322708
I just tried the local group policy to run that commmand, and it does run the command.

The sad thing is, it doesn't do what it is supposed to do... allow CRm/outlook over citrix
0
 
LVL 16

Expert Comment

by:Redwulf__53
ID: 16322795
No the syntax is only for vbscript...
You should not put any login scripts in the Local Policy always try to use AD Group Policy for this (on the OU where your citrix server(s) are located). Then in the Computer Settings of that same policy, enable "Group policy loopback processing", so the User Settings from the policy are applied to all users that log on to the server.

Does the CRM plugin work in Outlook for the user who installed the Client on the Citrix server (the Administrator)?
The CRM script writes a logfile %APPDATA%\TermInstall.log (= Documents and Settings\username\Application Data\Terminstall.log), that could clear up why it's not working.
0
 
LVL 5

Author Comment

by:shankshank
ID: 16322843
redwulf: thats for the fast response. If there are other computers in the OU where citrix is, then those logon scripts are going to run for the other servers right? What does loop back policy mean?

CRm outlook is acting weird. I created a desktop session thrugh citrix, ran the script, and then CRM seemed to work. close app, open up, and crm disappeared completely. It did this numerous times.
0
 
LVL 5

Author Comment

by:shankshank
ID: 16322874
So now i'll have my normal logon script through AD users and computers, and then specific computers can have policies applied with more logon scripts?
0
 
LVL 16

Expert Comment

by:Redwulf__53
ID: 16322898
1. yes, the setting will apply for all pc's in that OU. That's why it's sensible to have a separate OU for Citrix/Terminal servers as these are just a little bit different from "normal" servers and workstations... Here's a good explanation of loopback processing: http://support.microsoft.com/?id=231287

2. very strange.... did you find the log file, and can you post it here

---
3. exactly.
0
 
LVL 5

Author Comment

by:shankshank
ID: 16322936
So if I have one server, doesn't it become confusing with say one OU i have for my domain, and then I have citrix in a differet OU as it is, so then I'd have to make another OU inside that just for this citrix server?

log file is here, I wonder if I should open a new post since this login script is solved?


here is the CRm30forOutlookinstall.log


 9:20:56|    Info| ====================CrmForOutlookInstaller starting==================
 9:20:56|    Info| InstallOptions Parsed
 9:20:56|    Info| InstallAbp=1
 9:20:56|    Info| InstallPst=1
 9:20:56|    Info| UninstallAbp=0
 9:20:56|    Info| UninstallPst=0
 9:20:56|    Info| LogFile=C:\Documents and Settings\tester1\Application Data\Crm30ForOutlookInstaller.log
 9:20:56|    Info| TargetPath=C:\Documents and Settings\tester1\Application Data\MSCRM.PST
 9:20:56|    Info| PstName=Microsoft CRM
 9:20:56|    Info| PstComment=Microsoft CRM Message Store
 9:20:56|    Info| PstServiceName=MSPST MS
 9:20:56|    Info| Progress event not found
 9:20:56|    Info| DoInstallPst called with installPst = 1
 9:20:56|    Info| Entering CreatePst
 9:20:56|    Info| Entering GetMapiSession
 9:20:56|    Info| MAPILogonEx failed
 9:20:56|    Info| Exiting GetMapiSession
 9:20:56|    Info| GetMapiSession failed
 9:20:56|    Info| Exiting CreatePst
 9:20:56|    Info| CreatePst failed
 9:20:56|    Info| DoInstallPst failed with hr = 80040111.
 9:20:56|    Info| ====================CrmForOutlookInstaller finished==================
 9:20:56|    Info| ====================CrmForOutlookInstaller starting==================
 9:20:56|    Info| InstallOptions Parsed
 9:20:56|    Info| InstallAbp=0
 9:20:56|    Info| InstallPst=0
 9:20:56|    Info| UninstallAbp=0
 9:20:56|    Info| UninstallPst=1
 9:20:56|    Info| LogFile=C:\Documents and Settings\tester1\Application Data\Crm30ForOutlookInstaller.log
 9:20:56|    Info| TargetPath=
 9:20:56|    Info| PstName=Microsoft CRM
 9:20:56|    Info| PstComment=
 9:20:56|    Info| PstServiceName=MSPST MS
 9:20:56|    Info| Progress event not found
 9:20:56|    Info| DoInstallPst called with installPst = 0
 9:20:56|    Info| Entering DeletePst
 9:20:56|    Info| Entering GetMapiSession
 9:20:56|    Info| MAPILogonEx failed
 9:20:56|    Info| Exiting GetMapiSession
 9:20:56|    Info| GetMapiSession failed
 9:20:56|    Info| Exiting DeletePst
 9:20:56|    Info| DeletePst failed
 9:20:56|    Info| DoInstallPst failed with hr = 80040111.
 9:20:56|    Info| ====================CrmForOutlookInstaller finished==================
 9:21:25|    Info| ====================CrmForOutlookInstaller starting==================
 9:21:25|    Info| InstallOptions Parsed
 9:21:25|    Info| InstallAbp=1
 9:21:25|    Info| InstallPst=1
 9:21:25|    Info| UninstallAbp=0
 9:21:25|    Info| UninstallPst=0
 9:21:25|    Info| LogFile=C:\Documents and Settings\tester1\Application Data\Crm30ForOutlookInstaller.log
 9:21:25|    Info| TargetPath=C:\Documents and Settings\tester1\Application Data\MSCRM.PST
 9:21:25|    Info| PstName=Microsoft CRM
 9:21:25|    Info| PstComment=Microsoft CRM Message Store
 9:21:25|    Info| PstServiceName=MSPST MS
 9:21:25|    Info| Progress event not found
 9:21:25|    Info| DoInstallPst called with installPst = 1
 9:21:25|    Info| Entering CreatePst
 9:21:25|    Info| Entering GetMapiSession
 9:21:25|    Info| Exiting GetMapiSession
 9:21:25|    Info| Entering GetServiceMuid
 9:21:25|    Info| Msg Service not found
 9:21:25|    Info| Exiting GetServiceMuid
 9:21:25|    Info| Entering GetServiceMuid
 9:21:25|    Info| Trying to search for the PST servcie
 9:21:25|    Info| Found the created PST with index 0
 9:21:25|    Info| Exiting GetServiceMuid
 9:21:25|    Info| Entering ConfigurePstService
 9:21:25|    Info| Exiting ConfigurePstService
 9:21:25|    Info| Entering SaveEid
 9:21:25|    Info| Entering WriteEid
 9:21:26|    Info| Exiting WriteEid
 9:21:26|    Info| Entering WriteEid
 9:21:26|    Info| Exiting WriteEid
 9:21:26|    Info| Exiting SaveEid
 9:21:26|    Info| Exiting CreatePst
 9:21:26|    Info| DoInstallAbp called with installAbp=1
 9:21:26|    Info| Entering CreateAbp
 9:21:26|    Info| Entering GetMapiSession
 9:21:27|    Info| Exiting GetMapiSession
 9:21:27|    Info| Entering RegisterProvider
 9:21:27|    Info| Entering GetServiceMuid
 9:21:27|    Info| Msg Service not found
 9:21:27|    Info| Exiting GetServiceMuid
 9:21:27|    Info| Entering GetServiceMuid
 9:21:27|    Info| Exiting GetServiceMuid
 9:21:27|    Info| Exiting RegisterProvider
 9:21:27|    Info| Entering ModifySearchPath
 9:21:27|    Info| Entering FindGALIndex
 9:21:27|    Info| Exiting FindGALIndex
 9:21:27|    Info| Entering AddNewRow
 9:21:27|    Info| Exiting AddNewRow
 9:21:27|    Info| Entering AddNewRow
 9:21:27|    Info| Exiting AddNewRow
 9:21:27|    Info| Entering AddNewRow
 9:21:27|    Info| Exiting AddNewRow
 9:21:27|    Info| Entering AddNewRow
 9:21:27|    Info| Exiting AddNewRow
 9:21:27|    Info| Entering AddNewRow
 9:21:27|    Info| Exiting AddNewRow
 9:21:27|    Info| Entering AddNewRow
 9:21:27|    Info| Exiting AddNewRow
 9:21:27|    Info| Entering AddNewRow
 9:21:27|    Info| Exiting AddNewRow
 9:21:27|    Info| Entering AddNewRow
 9:21:27|    Info| Exiting AddNewRow
 9:21:27|    Info| Exiting ModifySearchPath
 9:21:27|    Info| Exiting CreateAbp
 9:21:27|    Info| ====================CrmForOutlookInstaller finished==================
 9:34:57|    Info| ====================CrmForOutlookInstaller starting==================
 9:34:57|    Info| InstallOptions Parsed
 9:34:57|    Info| InstallAbp=0
 9:34:57|    Info| InstallPst=0
 9:34:57|    Info| UninstallAbp=0
 9:34:57|    Info| UninstallPst=1
 9:34:57|    Info| LogFile=C:\Documents and Settings\tester1\Application Data\Crm30ForOutlookInstaller.log
 9:34:57|    Info| TargetPath=
 9:34:57|    Info| PstName=Microsoft CRM
 9:34:57|    Info| PstComment=
 9:34:57|    Info| PstServiceName=MSPST MS
 9:34:57|    Info| Progress event not found
 9:34:58|    Info| DoInstallPst called with installPst = 0
 9:34:58|    Info| Entering DeletePst
 9:34:58|    Info| Entering GetMapiSession
 9:35: 0|    Info| Exiting GetMapiSession
 9:35: 0|    Info| Entering GetServiceMuid
 9:35: 0|    Info| Msg Service not found
 9:35: 0|    Info| Exiting GetServiceMuid
 9:35: 1|    Info| Exiting DeletePst
 9:35: 1|    Info| DeletePst failed
 9:35: 1|    Info| DoInstallPst failed with hr = 80004005.
 9:35: 1|    Info| ====================CrmForOutlookInstaller finished==================
 9:35:56|    Info| ====================CrmForOutlookInstaller starting==================
 9:35:56|    Info| InstallOptions Parsed
 9:35:56|    Info| InstallAbp=1
 9:35:56|    Info| InstallPst=1
 9:35:56|    Info| UninstallAbp=0
 9:35:56|    Info| UninstallPst=0
 9:35:56|    Info| LogFile=C:\Documents and Settings\tester1\Application Data\Crm30ForOutlookInstaller.log
 9:35:56|    Info| TargetPath=C:\Documents and Settings\tester1\Application Data\MSCRM.PST
 9:35:56|    Info| PstName=Microsoft CRM
 9:35:56|    Info| PstComment=Microsoft CRM Message Store
 9:35:56|    Info| PstServiceName=MSPST MS
 9:35:56|    Info| Progress event not found
 9:35:57|    Info| DoInstallPst called with installPst = 1
 9:35:57|    Info| Entering CreatePst
 9:35:57|    Info| Entering GetMapiSession
 9:35:57|    Info| Exiting GetMapiSession
 9:35:57|    Info| Entering GetServiceMuid
 9:35:57|    Info| Msg Service not found
 9:35:57|    Info| Exiting GetServiceMuid
 9:35:57|    Info| Entering GetServiceMuid
 9:35:57|    Info| Trying to search for the PST servcie
 9:35:57|    Info| Found the created PST with index 0
 9:35:57|    Info| Exiting GetServiceMuid
 9:35:57|    Info| Entering ConfigurePstService
 9:35:57|    Info| Exiting ConfigurePstService
 9:35:57|    Info| Entering SaveEid
 9:35:57|    Info| Entering WriteEid
 9:35:57|    Info| Exiting WriteEid
 9:35:57|    Info| Entering WriteEid
 9:35:57|    Info| Exiting WriteEid
 9:35:57|    Info| Exiting SaveEid
 9:35:57|    Info| Exiting CreatePst
 9:35:57|    Info| DoInstallAbp called with installAbp=1
 9:35:57|    Info| Entering CreateAbp
 9:35:57|    Info| Entering GetMapiSession
 9:35:57|    Info| Exiting GetMapiSession
 9:35:57|    Info| Entering RegisterProvider
 9:35:57|    Info| Entering GetServiceMuid
 9:35:57|    Info| Msg Service not found
 9:35:57|    Info| Exiting GetServiceMuid
 9:35:57|    Info| Entering GetServiceMuid
 9:35:57|    Info| Exiting GetServiceMuid
 9:35:57|    Info| Exiting RegisterProvider
 9:35:57|    Info| Entering ModifySearchPath
 9:35:57|    Info| Entering FindGALIndex
 9:35:57|    Info| Exiting FindGALIndex
 9:35:57|    Info| Entering AddNewRow
 9:35:57|    Info| Exiting AddNewRow
 9:35:57|    Info| Entering AddNewRow
 9:35:57|    Info| Exiting AddNewRow
 9:35:57|    Info| Entering AddNewRow
 9:35:57|    Info| Exiting AddNewRow
 9:35:57|    Info| Entering AddNewRow
 9:35:57|    Info| Exiting AddNewRow
 9:35:57|    Info| Entering AddNewRow
 9:35:57|    Info| Exiting AddNewRow
 9:35:57|    Info| Entering AddNewRow
 9:35:57|    Info| Exiting AddNewRow
 9:35:57|    Info| Entering AddNewRow
 9:35:57|    Info| Exiting AddNewRow
 9:35:57|    Info| Entering AddNewRow
 9:35:57|    Info| Exiting AddNewRow
 9:35:57|    Info| Exiting ModifySearchPath
 9:35:57|    Info| Exiting CreateAbp
 9:35:57|    Info| ====================CrmForOutlookInstaller finished==================
0
 
LVL 16

Expert Comment

by:Redwulf__53
ID: 16323006
Wrong log, it has to be TermInstall.log (from the same folder, if it's not there, the install has not run at all).
Sorry, but I have to leave now. I'm able to finish helping you tomorrow if its still necessery then.
0
 
LVL 5

Author Comment

by:shankshank
ID: 16323023
Here is terminstall. I appreciate the help so far.


============== Starting CRM For Outlook TS Configurator Wed 03/29/2006  09:20 AM ==================
*********************************
Creating the MSCRMClient reg hive
**************************************************************************
Copying PST file to the folder "<Documents and Settings>\<user>\Application Data\"
**************************************************************************
Executing Install PST Service And CRM ABP
PST\ABP Install failed. It is likely that Outlook is not installed or not initialized.
Deleting the PST file that was copied.
Unregistering the ABP\PST services.
deleting the MSCRMClient reg hive.
============== Ending CRM For Outlook TS Configurator Wed 03/29/2006  09:20 AM ==================
============== Starting CRM For Outlook TS Configurator Wed 03/29/2006  09:21 AM ==================
*********************************
Creating the MSCRMClient reg hive
**************************************************************************
Copying PST file to the folder "<Documents and Settings>\<user>\Application Data\"
**************************************************************************
Executing Install PST Service And CRM ABP
**************************************************************************
Copying CRM registry keys to "<HKCU>\Software\Microsoft\MSCRM Client"
Copying CRM classed reg keys to "<HKCU>\Software\Classes"
**************************************************************************
Copying Word Merge files to the folder "<Documents and Settings>\<user>\Application Data\Microsoft\Templates\Mail Merge"
============== Starting CRM For Outlook TS Configurator Wed 03/29/2006  09:24 AM ==================
Microsoft CRM 3.0 Client for Outlook is already installed
============== Ending CRM For Outlook TS Configurator Wed 03/29/2006  09:24 AM ==================
============== Starting CRM For Outlook TS Configurator Wed 03/29/2006  09:24 AM ==================
Microsoft CRM 3.0 Client for Outlook is already installed
============== Ending CRM For Outlook TS Configurator Wed 03/29/2006  09:24 AM ==================
============== Starting CRM For Outlook TS Configurator Wed 03/29/2006  09:24 AM ==================
Microsoft CRM 3.0 Client for Outlook is already installed
============== Ending CRM For Outlook TS Configurator Wed 03/29/2006  09:24 AM ==================
============== Starting CRM For Outlook TS Configurator Wed 03/29/2006  09:25 AM ==================
Microsoft CRM 3.0 Client for Outlook is already installed
============== Ending CRM For Outlook TS Configurator Wed 03/29/2006  09:25 AM ==================
============== Starting CRM For Outlook TS Configurator Wed 03/29/2006  09:25 AM ==================
Microsoft CRM 3.0 Client for Outlook is already installed
============== Ending CRM For Outlook TS Configurator Wed 03/29/2006  09:25 AM ==================
============== Starting CRM For Outlook TS Configurator Wed 03/29/2006  09:34 AM ==================
***********************************
Deleting the CRM Addin registration
******************
Launching Outlook  
***********************************************************
Executing Uninstall PST\ABP Services and removing shortcuts
****************************
Deleting the MSCRMClient hive
Deleting the MSCRM Classes reg keys
******************************************
============== Ending CRM For Outlook TS Configurator Wed 03/29/2006  09:35 AM ==================
============== Starting CRM For Outlook TS Configurator Wed 03/29/2006  09:35 AM ==================
*********************************
Creating the MSCRMClient reg hive
**************************************************************************
Copying PST file to the folder "<Documents and Settings>\<user>\Application Data\"
Pst File Already Existing. Skipping Copy.
**************************************************************************
Executing Install PST Service And CRM ABP
**************************************************************************
Copying CRM registry keys to "<HKCU>\Software\Microsoft\MSCRM Client"
Copying CRM classed reg keys to "<HKCU>\Software\Classes"
**************************************************************************
Copying Word Merge files to the folder "<Documents and Settings>\<user>\Application Data\Microsoft\Templates\Mail Merge"
**************************************************************************
Registering CRM Add-in "<HKCU>\Software\Microsoft\Office\Outlook\Addins"
Enabling the addin in case it was disabled by outlook
============== Ending CRM For Outlook TS Configurator Wed 03/29/2006  09:36 AM ==================
0
 
LVL 16

Expert Comment

by:Redwulf__53
ID: 16323029
"So if I have one server, doesn't it become confusing with say one OU i have for my domain, and then I have citrix in a differet OU as it is, so then I'd have to make another OU inside that just for this citrix server?"
Correct. That way all the policies that are applied now, will still be applied (inherited).
That way, when the Citrix server crashes and needs to be reinstalled, or you get a 2nd citrix server, all you need to do is place it in the same OU and all the settings will be exaclty the same.

0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
Last month Marc Laliberte, WatchGuard’s Senior Threat Analyst, contributed reviewed the three major email authentication anti-phishing technology standards: SPF, DKIM, and DMARC. Learn more in part 2 of the series originally posted in Cyber Defense …
Loops Section Overview
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question