your question is very confusing...what do u mean by start a timer from the toolbox ????
whatever.....you can create a Timer in runtime........like this
1.declare a Timer variable like this......<br />
Private WithEvents myTimer As Timers.Timer<br />
2.write a function SetUpTimer() like......<br />
Public Sub SetUpTimer()<br />
myTimer = New Timers.Timer<br />
With myTimer<br />
.AutoReset = True<br />
.Interval = 1000<br />
End With<br />
Catch obEx As Exception<br />
Throw obEx<br />
End Try<br />
End Sub<br />
3.Wherever you want your timer to start working call SetUpTimer()
"A man can ride on your back only when it is bent....."
My company has been asked to have software follow the users. Software is typically deployed using a software deployment system, Tivoli. This only deploys software to the workstations via Tivoli endpoints (Clients) installed on the workstations. Being this is a Microsoft environment, we have also been asked to incorporate the use of AD to assign users to groups.
The process works as follows:
1. User is assigned to an application group in AD
2. User receives a shortcut on their desktop using group policy
3. User clicks on the shortcut which points to a VB script on a file server.
4. Script opens a VB message box that asks the user if they would like to install the software, YES/NO
5. User clicks NO script ends and the VB Message box closes
6. User clicks YES and the script sends a message to the Tivoli endpoint (client) on the workstation requesting the software package from Tivoli
7. The VB message box closes, and the user just has to wait for the software to be installed by Tivoli.
This works great but...... the user has no idea that the software is installing, or when the software installation is complete.
What I need help with is 2 things:
1. Getting a message box stating "Your software is being installed" to stay on the screen till the software is installed the software is being installed
2. Getting a message box stating "Your software has been installed, please click OK" when the software installation has completed.
1. When the MSI is installing the software package, it will ALWAYS leave a log file in the C:\windows\temp directory called xxxx.log where xxxx is the name of the software.
2. The log will always have a line at the end that looks like this:  ****** xxxxxx has successfully been installed.
3. I think that if I could add a section in my VB script that looked for the xxxx.log log file, and then after finding it kept reading it until it found the last line ****** xxxxxx has successfully been installed.
4. While it is looking for the last line, the message box stating "Your software is being installed" to stay on the screen till the software is installed
5. Once the last line is found, the message box stating "Your software has been installed, please click OK" would appear.
'Prompt User that software needs to be installed
sMBVB_Msg = ""
sMBVB_Msg = sMBVB_Msg & "This software is being used for the first time, and must be installed. " & vbCr
sMBVB_Msg = sMBVB_Msg & " Click Yes to install the software, or NO to exit."
sMBVB_Title = ""
sMBVB_Title = sMBVB_Title & "WinZip v9.0"
lMBVB_Type = vbYesNo
lMBVB_Type = lMBVB_Type + vbQuestion
lMBVB_Type = lMBVB_Type + vbDefaultButton3
lMBVB_Type = lMBVB_Type + vbMsgBoxSetForeground
iMBVB_ReturnCode = MsgBox(sMBVB_Msg, lMBVB_Type, sMBVB_Title)
'If answer is yes, then 'Install Software
If iMBVB_ReturnCode = vbYes Then
Set objShell = WScript.CreateObject("WScript.Shell")
objShell.Run "%comspec% /C C:\Progra~1\TIVOLI\TIVPOST\POSTEMSG.EXE -S tmrdev -r HARMLESS -m Winzip-v9_Defaultv1.0 hostname=%computername% Workstation_Build user",1,True
'If answer is no then exit install
If iMBVB_ReturnCode = vbNo Then
Any help getting the script to find and parse the file to the end, and then perform an action would be greatly appreciated.
This has "Awful Nightmare" written all over it. Although it is possible to do, there are far better software metering solutions. Your biggest problem is going to be licensing. For example, you can't just install Office (a HUGE install for Tivoli!) on any number of workstations you want. You'll have to uninstall the software before you can install it somewhere else. Another problem is bandwidth. Installing and uninstalling the same apps constantly can choke a network. Just imagine copying out the 500MB app to 10 workstations all at once. Not to mention the mandatory reboots that some software installs require.
Another problem you have is monitor the log file. Tivoli installs are totally background and it's not known for doing thing very quick. Tivoli is lazy, to say the least. What happens when the user logs off or reboots the workstation and doesn't log back on?? Your script won't be running to monitor the success or failure.
You are right, it could be a nightmare. However this will only be for Unique applications, and not core applications. In other words, Office will and other core packages will already have been installed by Tivoli. Licensing is a concern, but since the users don't move around, application creep should not be an issue, but will be a concern.
Last Visit: 31-Dec-99 19:00 Last Update: 29-Nov-23 19:32