/build/static/layout/Breadcrumb_cap_w.png

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|]

0 Comments   [ + ] Show comments

Answers (3)

Posted by: SandeepPanat 12 years ago
Orange Senior Belt
0
Balaji Kosinipalli,

Make it simple, use a batch file instead.
Posted by: anonymous_9363 12 years ago
Red Belt
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.
Posted by: admaai 12 years ago
Orange Senior Belt
0
it is working with admin but it not working in test user

Tried doing it manually while logged in as test user?
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ