Jump to content

copy file to dir in Appdata


Recommended Posts

Hi, I'm trying to copy this file exception.sites to \appdata\localLow\Sun\Java\Deployment\security\. But can't figure out how to do that.

I ttied {Start} and then the vbs script and {Filecopy} with the file, but it's not working .

this is the vbs script that works.

Set objFSO = CreateObject("Scripting.FileSystemObject")

set objWShell = wScript.createObject("WScript.Shell")

usrName = objWShell.expandEnvironmentStrings("%USERNAME%")

objFSO.CopyFile "exception.sites" , "C:\Users\" & usrName & "\appdata\localLow\Sun\Java\Deployment\security\", True

Anyone has a solution please?

Link to comment
Share on other sites


Try this

cmds[pn]=['{FILECOPY} "%wpipath%\\Install\\exception.sites" "%APPDATA%\\localLow\\Sun\\Java\\Deployment\\security"'];

or

 

cmds[pn]=['{XCOPY} "%wpipath%\\Install\\exception.sites" "%APPDATA%\\localLow\\Sun\\Java\\Deployment\\security"'];
Edited by condor
Link to comment
Share on other sites

cmd1 ** Fout ** (terug gedraaide code 999): "C:\brol4\WPI_ICT4.1\Install\exception.sites" "C:\Users\ghostie\AppData\Roaming\localLow\Sun\Java\Deployment\security"

 

 

config

prog[pn]=['Voegt java security toe voor http://www.fisme.science.uu.nl];
uid[pn]=['VOEGTJAVASECURITYTOE'];
dflt[pn]=['yes'];
forc[pn]=['no'];
bit64[pn]=['no'];
cat[pn]=['Ict-werkbalk 4.1'];
pfro[pn]=['no'];
cmds[pn]=['{XCOPY} "%wpipath%\\Install\\exception.sites" "%APPDATA%\\localLow\\Sun\\Java\\Deployment\\security"'];
desc[pn]=['Voegt java security toe'];
pn++;

Link to comment
Share on other sites

cmds[pn]=['{XCOPY} "%wpipath%\\Install\\exception.sites" "%USERPROFILE%\\AppData\\LocalLow\\Sun\\Java\\Deployment\\security"'];

You can verify other variables from WPI-->Information-->Variables

Edited by condor
Link to comment
Share on other sites

thanks,

did not work but works with {FILECOPY} and \\ at the end

cmds[pn]=['{FILECOPY} "%wpipath%\\Install\\exception.sites" "%USERPROFILE%\\AppData\\localLow\\Sun\\Java\\Deployment\\security\\"'];

Link to comment
Share on other sites

I think XCOPY is for folders. I forget ms-dos commands :D

 

Also work with this

 

cmds[pn]=['{FILECOPY} "%wpipath%\\Install\\exception.sites" "%USERPROFILE%\\AppData\\LocalLow\\Sun\\Java\\Deployment\\security"'];

 

without \\ at the end

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...