Script amendments requires....
Hi All,
I just tried to copy one file from Progra Files folder to %appdata%. I just tried below script. it is working with admin but it not working in test user..Iam new for scripting and packaging plz give me some assistance..
Option Explicit
On Error Resume Next
Const OVERWRITE_EXISTING = True
Dim strFrom,Strto,strprogramfiles,strappdata
Dim ObjFSo,objshell
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objshell = Createobject("wscript.shell")
strappdata = objshell.expandenvironmentstrings("%appdata%")
strprogramfiles = objshell.expandenvironmentstrings("%programfiles(x86)%")
StrFrom = strprogramfiles & "\Balaji Kosinipalli\Picture Taker\PICTAKER.exe"
Strto = strappdata & "\"
objFSO.CopyFile strFrom , Strto , OVERWRITE_EXISTING
Set objFSO = nothing
set objshell = nothing
[8|][8|]
I just tried to copy one file from Progra Files folder to %appdata%. I just tried below script. it is working with admin but it not working in test user..Iam new for scripting and packaging plz give me some assistance..
Option Explicit
On Error Resume Next
Const OVERWRITE_EXISTING = True
Dim strFrom,Strto,strprogramfiles,strappdata
Dim ObjFSo,objshell
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objshell = Createobject("wscript.shell")
strappdata = objshell.expandenvironmentstrings("%appdata%")
strprogramfiles = objshell.expandenvironmentstrings("%programfiles(x86)%")
StrFrom = strprogramfiles & "\Balaji Kosinipalli\Picture Taker\PICTAKER.exe"
Strto = strappdata & "\"
objFSO.CopyFile strFrom , Strto , OVERWRITE_EXISTING
Set objFSO = nothing
set objshell = nothing
[8|][8|]
0 Comments
[ + ] Show comments
Answers (3)
Please log in to answer
Posted by:
anonymous_9363
12 years ago
use a batch file instead.Yea! Score one for recommending 1970's technology! :)
@OP, you must specify the destination filename as well, not just the folder. As ever, use Google for syntax help and, for VBScript, there are few better sites than DevGuru.
Posted by:
admaai
12 years ago
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.