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|]
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

0
Balaji Kosinipalli,

Make it simple, use a batch file instead.
Answered 12/30/2011 by: SandeepPanat
Orange Senior Belt

Please log in to comment
0
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.
Answered 12/30/2011 by: VBScab
Red Belt

Please log in to comment
0
it is working with admin but it not working in test user

Tried doing it manually while logged in as test user?
Answered 12/30/2011 by: admaai
Orange Senior Belt

Please log in to comment
Answer this question or Comment on this question for clarity