Managing email signatures?
Click download Free Trial
Manage Email Signatures Centrally - For All Users
extend your brand and promote your products, services, special events and news
 
Your eMailSignaturer resource    Receive answers in my inbox    Add URL in your RSS reader    Join us on Facebook     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
LiveZilla Live Help

VB Login Scripts

 
Post new topic   Reply to topic    email signatureManage Email Signatures Centrally - For All Users Forum Index -> English Support
View previous topic :: View next topic  
Author Message
elfidge
Just popping in


Joined: 13 Oct 2007
Posts: 3

Posted: Sat Oct 13, 2007 1:06 pm    Post subject: VB Login Scripts Reply with quote

I'm looking to move my login script from a batch file to a VB script. After spending shed loads of time googling, I came up with the following, but it still doesn't appear to work. Any ideas??




Option Explicit
Dim objNetwork, objUser, CurrentUser
Dim strGroup
Dim wshShell
Dim ObjShell

' ** eMailSignature **

Set objShell = WScript.CreateObject("WScript.Shell")
ObjShell.run("\\srvdc01\netlogon\sign.exe" & "Provider=sqloledb;Data Source=SRVAPP03;Initial Catalog=eMailSignature;Integrated Security=SSPI")
Set ObjShell=Nothing
Back to top
View user's profile Send private message
Bjarne Mess
Certified Professional
Certified Professional


Joined: 01 May 2007
Posts: 735
Location: Copenhagen

Posted: Sat Oct 13, 2007 5:36 pm    Post subject: VB Login Scripts Reply with quote

Have you tried this:

Set objShell = WScript.CreateObject("WScript.Shell")
ObjShell.run("\\srvdc01\netlogon\sign.exe Provider=sqloledb;Data Source=SRVAPP03;Initial Catalog=eMailSignature;Integrated Security=SSPI")
Set ObjShell=Nothing
Back to top
View user's profile Send private message Visit poster's website
Jesper Frier
Certified Professional
Certified Professional


Joined: 09 Sep 2006
Posts: 1940
Location: Stoevring, Denmark

Posted: Sun Oct 14, 2007 6:59 am    Post subject: Include space after Sign.exe Reply with quote

elfidge wrote:
"\\srvdc01\netlogon\sign.exe" & "Provider=sqloledb;Data Source=SRVAPP03;Initial Catalog=eMailSignature;Integrated Security=SSPI"


becomes ...

Quote:
"\\srvdc01\netlogon\sign.exeProvider=sqloledb;Data Source=SRVAPP03;Initial Catalog=eMailSignature;Integrated Security=SSPI"


So you need to add a space after Sign.exe like in reply from Bjarne.
Back to top
View user's profile Send private message Visit poster's website
elfidge
Just popping in


Joined: 13 Oct 2007
Posts: 3

Posted: Mon Oct 15, 2007 8:10 am    Post subject: VB Login Scripts Reply with quote

Tried both this morning - both throw the same error I've been getting using this method:

Script: \\SRVDC01\NETLOGON\logon.vbs
Line: 16
Char: 1
Error: The system cannot find the file specified
Code: 80070002
Source: (null)

Script is as below:

Option Explicit
Dim objNetwork, objUser, CurrentUser
Dim strGroup
Dim wshShell
Dim ObjShell

' ** eMailSignature **

Set objShell = WScript.CreateObject("WScript.Shell")
ObjShell.run("\\srvdc01\netlogon\sign.exeProvider=sqloledb;Data Source=SRVAPP03;Initial Catalog=eMailSignature;Integrated Security=SSPI")
Set ObjShell=Nothing


Any further ideas? I can get sign.exe to run on it's own, I just can't get all the switches after it to function properly...
Back to top
View user's profile Send private message
Jesper Frier
Certified Professional
Certified Professional


Joined: 09 Sep 2006
Posts: 1940
Location: Stoevring, Denmark

Posted: Tue Oct 16, 2007 6:49 am    Post subject: Add space Reply with quote

This is wrong - you need to add space after Sign.exe
elfidge wrote:
ObjShell.run("\\srvdc01\netlogon\sign.exeProvider=sqloledb;Data Source=SRVAPP03;Initial Catalog=eMailSignature;Integrated Security=SSPI")


This is correct:
Bjarne Mess wrote:
ObjShell.run("\\srvdc01\netlogon\sign.exe Provider=sqloledb;Data Source=SRVAPP03;Initial Catalog=eMailSignature;Integrated Security=SSPI")
Back to top
View user's profile Send private message Visit poster's website
elfidge
Just popping in


Joined: 13 Oct 2007
Posts: 3

Posted: Tue Oct 16, 2007 11:13 am    Post subject: VB Login Scripts Reply with quote

Thanks Jesper - appears to be working, good stuff.

:D
Back to top
View user's profile Send private message
Bjarne Mess
Certified Professional
Certified Professional


Joined: 01 May 2007
Posts: 735
Location: Copenhagen

Posted: Wed Oct 17, 2007 12:25 pm    Post subject: Reply with quote

Great Cool
Back to top
View user's profile Send private message Visit poster's website
kevinweiland
Quite a regular


Joined: 08 Nov 2007
Posts: 15
Location: Spring, TX

Posted: Mon Mar 10, 2008 7:29 pm    Post subject: Reply with quote

Can you use a Microsoft access database with the VB script?
Back to top
View user's profile Send private message
Bjarne Mess
Certified Professional
Certified Professional


Joined: 01 May 2007
Posts: 735
Location: Copenhagen

Posted: Mon Mar 10, 2008 7:46 pm    Post subject: VB Login Scripts Reply with quote

Yes
Back to top
View user's profile Send private message Visit poster's website
kevinweiland
Quite a regular


Joined: 08 Nov 2007
Posts: 15
Location: Spring, TX

Posted: Mon Mar 10, 2008 8:37 pm    Post subject: Reply with quote

not a moment after i posted that i got it working...nifty!
Back to top
View user's profile Send private message
Bjarne Mess
Certified Professional
Certified Professional


Joined: 01 May 2007
Posts: 735
Location: Copenhagen

Posted: Mon Mar 10, 2008 11:36 pm    Post subject: Acces DB Reply with quote

Well, that's the most important thing.

Cheers,
Bjarne
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Manage Email Signatures Centrally - For All Users Forum Index -> English Support All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Add URL in your RSS reader | About Us | Terms and conditions | © 2012 eMailSignature North America, Inc. and eMailSignature Aps.