| View previous topic :: View next topic |
| Author |
Message |
peter Just popping in
Joined: 22 Aug 2008 Posts: 1 Location: Rockhampton, QLD AUS
|
| Posted: Mon Sep 01, 2008 3:39 am Post subject: Only run sign.exe when a valid profile exists |
|
|
If you are running emailSignature in a domain, you will commonly find it reporting an error when you login as a user who has not setup a profile on the local computer, for example the domain administrator account.
This causes a lengthy delay in executing the logon script as sign.exe is fighting to setup a signature in a non-existant profile.
To fix this, i implemented some vbscript to check for a profile before running sign.exe to ensure that signatures were only installed once a valid profile has been setup
Here is the code
on error resume next
Set WSHShell = CreateObject("WScript.Shell")
dim strProfile
strProfile = ""
RegKey = "HKCU\Software\Microsoft\Windows NT\CurrentVersion \Windows Messaging Subsystem\Profiles\"
strProfile = WSHShell.RegRead (regkey & "DefaultProfile")
if strProfile <> "" then
WSHShell.Run "<sign.exe parameters>"
end if
just change the part in bold to your location of sign.exe and its database parameter
(eg. \\adserver\netlogon\sign.exe Provider=sqloledb;Data Source=sqlserver\db;Initial Catalog=emailSignatures;User ID=emailsig;Password=emailsig;)
and you should be good to go. |
|
| Back to top |
|
 |
Jesper Frier Certified Professional


Joined: 09 Sep 2006 Posts: 1925 Location: Stoevring, Denmark
|
|
| Back to top |
|
 |
robert doku Just can't stay away
Joined: 14 Feb 2008 Posts: 26 Location: robert doku
|
| Posted: Wed Oct 01, 2008 9:55 am Post subject: |
|
|
I will like to thank Peter too as it also ends our seach a vbscript for the batch process. (It deserves a place in the official documentation!) I assume it supports both our currently supported Windows flavours (2000 and XP).
If you have more than one logon servers in your domain, I will suggest using the line | Quote: | | start /W /B %LOGONSERVER%\netlogon\sign.exe | rather than a specific server name to ensure efficiency. _________________ RobD |
|
| Back to top |
|
 |
|