[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.8

Copy a file from one location to another and overwrite if it exists using Vbscript

Asked by Barnardos_2LS in Miscellaneous Software, VB Script, Citrix

Tags: copy, file, one, vbscript, from

Good Afternoon,

I am new to vbscipting, could any one help with the following issue.

I am trying to create a vbscript that copies a file from one location to another, for some reason this does not happen I do not get any errors return back. As well as this I would like overwrite the relevant file if it exists (if you could provide this in the script)

The 'script' is as follows

'Developed by M Mustafa
'11/09/2007 11:53

On Error Resume Next

'Get the username of the currently logged on user
strUserName = GetUserName()
'If the user cannot be determined then display a warning
If (strUserName = "") Then
      Msgbox ("Unable to determine the logged on user - Please contact the Helpdesk")
End If

Set fso = CreateObject("Scripting.FileSystemObject")

fso.CopyFile "C:\Program files\Citrix\ICA Client\appsrv.ini", "C:\Documents and Settings\" & strUserName & "\Application Data\ICAClient"


'Function to get the username of the currently logged on user
Function GetUserName
Set objNetwork = Wscript.CreateObject("WScript.Network")
'Get username
RC = objNetwork.UserName
'Set username variable
If RC <> "" Then
      GetUserName = RC
'If username is not known then set variable to blank
Else
      GetUserName = ""
End If
End Function



Thanks,

Mus.
[+][-]09/12/07 06:10 AM, ID: 19875876Assisted Solution

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 30-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]09/12/07 06:11 AM, ID: 19875878Assisted Solution

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 30-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]09/12/07 06:19 AM, ID: 19875954Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zones: Miscellaneous Software, VB Script, Citrix
Tags: copy, file, one, vbscript, from
Sign Up Now!
Solution Provided By: S_Mani
Participating Experts: 3
Solution Grade: A
 
 
Loading Advertisement...
20091111-EE-VQP-89 / EE_QW_1_20070628