Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copy file wont work.. 1

Status
Not open for further replies.

slint

Technical User
Joined
Jul 2, 2006
Messages
48
Location
SE
I cant get it to work.

The script extrakt the correkt path and when it should copy it just blinks and script finish

Code:
Dim value1, ws, strAstart, WSHshell
Set ws = WScript.CreateObject("WScript.Shell")

value1 = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders\"

strAstart = ws.RegRead (value1 & "Common Startup")

Call ws.Run("cmd.exe /c copy c:\join.vbs " & strAstart &"\ /Y")
 
You may try this:
Call ws.Run("cmd.exe /c copy c:\join.vbs " & [!]Chr(34) & [/!]strAstart & [!]Chr(34) & [/!]"\ /Y")

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Super!

Thnx PHV

A star for U!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top