Solved

Workshare script

Posted on 2013-02-04
4
465 Views
Last Modified: 2013-02-13
How do I create a login script which will run ONLY once for users on Citrix which will run "Workshare.Professional.UserInit.exe"?
0
Comment
Question by:Blakie32
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 25

Expert Comment

by:Coralon
ID: 38857797
That's pretty easy to do.  You will create a script that checks to see if a registry key exists in HKCU, and if it does exit.  If it does not, then you run the application, and create the key on success.  

The only real question is your language.  :-)  I've done it before in vbscript, can theoreticallyb e done in batch, can absolutely be done in powershell.. what's your fancy?

You run the script from usrlogn1.cmd (I have an article here on how to use this if you aren't familiar with it).

How usrlogon processing works

Coralon
0
 

Author Comment

by:Blakie32
ID: 38861970
I forgot to mention that I am new to all of this so maybe it can be done in a batch file?

I have read your documentation and it is totally over my head.  As stated above:  I am new to all of this.  :)

I will re-read again (and again) and try to create this and will let you know if it worked or not.  Thanks for getting back to me.

Jackie
0
 
LVL 25

Accepted Solution

by:
Coralon earned 500 total points
ID: 38862350
You bet..

Here's a sample vbscript (partly made generic):
(this is actually a production script that I have used in the past)

Option Explicit

'============================== Objects ===========================================================
Dim fso
Set fso							= CreateObject ("Scripting.FileSystemObject")

Dim wshShell
Set wshShell					= CreateObject ("WScript.Shell")

'============================== Script variables ==================================================
Dim sBaseKey					'The base key for the script
sBaseKey						= "HKCU\Software\MyCompany\Scripts\MyScriptName"
Dim bHasBeenRUn
bHasBeenRun						= "no"

'============================== Main Body =========================================================
On Error Resume Next
	Dim sCheck
	sCheck						= lcase(wshShell.RegRead (sBaseKey + "\HasBeenRun"))
	If sCheck					= "yes" then
		bHasBeenRun				= "yes"
	End If
On Error GoTo 0

If lcase(bHasBeenRun)			= "yes" then
	Quit()
End If

'now run the app
'the path to the exe is the actual path, the 1 means a normal window, vbFalse says don't wait for it to return
shell.Run "<path to exe>\ Workshare.Professional.UserInit.exe", 1, vbFalse



Function Quit()
	Set wshShell				= Nothing
	Set fso						= Nothing
	WScript.Quit
End Function

Open in new window


Coralon
0
 

Author Comment

by:Blakie32
ID: 38887898
Ok thank you so much for this!  I will definitely give it a try.
0

Featured Post

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!

Question has a verified solution.

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

Suggested Solutions

Storage devices are generally used to save the data or sometime transfer the data from one computer system to another system. However, sometimes user accidentally erased their important data from the Storage devices. Users have to know how data reco…
This article was originally published on Monitis Blog, you can check it  here . If you have responsibility for software in production, I bet you’d like to know more about it. I don’t mean that you’d like an extra peek into the bowels of the sour…
This video demonstrates how to use each tool, their shortcuts, where and when to use them, and how to use the keyboard to improve workflow.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

696 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