blejd Posted November 17, 2014 Posted November 17, 2014 (edited) Howdy, i have "small" problem. Thing Happens Only on windows 2008R2, on 2012R2 it works without problem I have mapped network drive "x" on which i have some files. I want to copy them, so i'm using "FileCopy" function. My problem starts here, it's a part of the bigger script, which require Admin privileges. When i invoke admin privileges at start, function FileCopy doesn't work, if i won't invoke admin privileges - it copies without problem. I need admin privileges so i'm stuck now. This is weird indeed, i tried to use only FileCopy to test it, and it works like it, has anyone here found such a problem? Edited November 17, 2014 by blejd
BrewManNH Posted November 17, 2014 Posted November 17, 2014 Instead of using mapped drive letters, use the actual server name and path to the location instead. When you run the script under different credentials, the mapped drives don't exist for that user so you can't use them. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator
jdelaney Posted November 17, 2014 Posted November 17, 2014 (edited) Running as admin has different drive mappings. Re-map the drive, or validate your drive is mapped before copying. Edited November 17, 2014 by jdelaney IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
blejd Posted November 18, 2014 Author Posted November 18, 2014 Oh guys, i totally forgot about this! Thanks for advices!
blejd Posted November 18, 2014 Author Posted November 18, 2014 (edited) Well, i tried to map my NetworkDrive without success. Func Creds() Local $sUserName Local $sPassword Local $Domain = "ad" $sUserName = InputBox("Username", "Provide username: e.g UserName", "", "") $sPassword = InputBox("Password:", "Provide Password:", "", "*") DriveMapDel("X:") DriveMapAdd ("X:", "PATH CHECKED- WORKED WHEN I DID IT MANUALLY",0,$domain&"\"&$sUserName,$sPassword) MsgBox("","",@error);Display error endfunc Creds() It returns "1" I didn't worked even if i used my creds w/o vars. DriveMapDel("X:") - it didn't worked w/o it also. And i got access to my share when i manually logged to Admin Account Edited November 18, 2014 by blejd
Luigi Posted November 18, 2014 Posted November 18, 2014 (edited) A doubt: you tray share file/folders from windows is 7 home basic to windows 7 home basic? If yes, I thinking it have not resources necessary to share files. I forget wich version's of seven is necessary to share it. I share with you a file automation example's (copy files and create structure), when I have lan house, it was many many years ago... may help... expandcollapse popup;I was use this script in formated machine $Versao = 1.04 DriveMapAdd("X:", "\\aw-001\clientebaselan$"); path to server ;creating structure foldes in the client ;changing the folder's icon $folder = "C:\Documents and Settings" $ico = "%SystemRoot%\system32\SHELL32.dll" IniWriteSection($folder & "\Desktop.ini", ".ShellClassInfo", _ "IconFile=" & $ico & @LF & _ "IconIndex=110") FileSetAttrib($folder & "\" & "Desktop.ini", "+H") FileSetAttrib($folder, "+R") $folder = "C:\ViteSoft" $ico = "C:\ViteSoft\Client\VSCyberClient.exe" IniWriteSection($folder & "\Desktop.ini", ".ShellClassInfo", _ "IconFile=" & $ico & @LF & _ "IconIndex=0") FileSetAttrib($folder & "\" & "Desktop.ini", "+H") FileSetAttrib($folder, "+R") ;FileCopy("\\aw-001\eee$\lan\_wer\*.*","C:\_wer",9) $folder = "C:\_wer" DirCreate($folder) $ico = "%SystemRoot%\system32\SHELL32.dll" IniWriteSection($folder & "\Desktop.ini", ".ShellClassInfo", _ "IconFile=" & $ico & @LF & _ "IconIndex=27") FileSetAttrib($folder & "\" & "Desktop.ini", "+H") FileSetAttrib($folder, "+R+H") $folder = "D:\_backup" DirCreate($folder) $ico = "%SystemRoot%\system32\SHELL32.dll" IniWriteSection($folder & "\Desktop.ini", ".ShellClassInfo", _ "IconFile=" & $ico & @LF & _ "IconIndex=27") FileSetAttrib($folder & "\" & "Desktop.ini", "+H") FileSetAttrib($folder, "+R+H") FileCopy("\\aw-001\eee$\lan\odin\*","D:\Odin",9) $folder = "D:\Odin" DirCreate($folder) $ico = "%SystemRoot%\system32\cmd.exe" IniWriteSection($folder & "\Desktop.ini", ".ShellClassInfo", _ "IconFile=" & $ico & @LF & _ "IconIndex=0") FileSetAttrib($folder & "\" & "Desktop.ini", "+H") FileSetAttrib($folder, "+R+H") $folder = "D:\Base" DirCreate($folder) $ico = "%SystemRoot%\system32\SHELL32.dll" IniWriteSection($folder & "\Desktop.ini", ".ShellClassInfo", _ "IconFile=" & $ico & @LF & _ "IconIndex=137") FileSetAttrib($folder & "\" & "Desktop.ini", "+H") FileSetAttrib($folder, "+R") $folder = "D:\Drivers" DirCreate($folder) $ico = "%SystemRoot%\system32\SHELL32.dll" IniWriteSection($folder & "\Desktop.ini", ".ShellClassInfo", _ "IconFile=" & $ico & @LF & _ "IconIndex=194") FileSetAttrib($folder & "\" & "Desktop.ini", "+H") FileSetAttrib($folder, "+R") $folder = "D:\ISO" DirCreate($folder) $ico = "%SystemRoot%\system32\SHELL32.dll" IniWriteSection($folder & "\Desktop.ini", ".ShellClassInfo", _ "IconFile=" & $ico & @LF & _ "IconIndex=188") FileSetAttrib($folder & "\" & "Desktop.ini", "+H") FileSetAttrib($folder, "+R") $folder = "D:\Jogos" DirCreate($folder) $ico = "%SystemRoot%\system32\SHELL32.dll" IniWriteSection($folder & "\Desktop.ini", ".ShellClassInfo", _ "IconFile=" & $ico & @LF & _ "IconIndex=137") FileSetAttrib($folder & "\" & "Desktop.ini", "+H") FileSetAttrib($folder, "+R") DirCopy("C:\Documents and Settings\Master\Menu Iniciar","C:\_wer\Documents and Settings\Master\Menu Iniciar",1) DirCopy("C:\Documents and Settings\All Users\Menu Iniciar","C:\_wer\Documents and Settings\All Users\Menu Iniciar",1) DirCopy("C:\Documents and Settings\Master\Desktop\*.*","C:\_wer\Documents and Settings\Master\Desktop",1) FileMove("C:\Documents and Settings\All Users\Desktop\*.lnk*","C:\_wer\Documents and Settings\All Users\Desktop\",9) FileMove("C:\Documents and Settings\Master\Desktop\*.lnk","C:\_wer\Documents and Settings\Master\Desktop\",9) FileDelete("C:\Documents and Settings\All Users\Menu Iniciar\Abrir documento do Office.lnk") FileDelete("C:\Documents and Settings\All Users\Menu Iniciar\Catálogo do Windows.lnk") RunWait(@ComSpec & " /c " & "del c:\docume~1\alluse~1\menuin~1\defini~1.lnk",@WindowsDir,@SW_DISABLE) FileDelete("C:\Documents and Settings\All Users\Menu Iniciar\Novo documento do Office.lnk") FileDelete("C:\Documents and Settings\All Users\Menu Iniciar\Windows Update.lnk") DirRemove("C:\Documents and Settings\All Users\Menu Iniciar\Programas\Alcohol 52%",1) DirRemove("C:\Documents and Settings\Master\Menuin~1\Programas\KeyTweak",1) DirRemove("C:\Documents and Settings\All Users\Menu Iniciar\Programas\Avira",1) DirRemove("C:\Documents and Settings\All Users\Menu Iniciar\Programas\DaemonScript",1) DirRemove("C:\Documents and Settings\All Users\Menu Iniciar\Programas\Microsoft Bootvis",1) DirRemove("C:\Documents and Settings\Master\Menu Iniciar\Programas\Microsoft Bootvis",1) DirRemove("C:\Documents and Settings\All Users\Menu Iniciar\Programas\Powertoys for Windows XP",1) DirRemove("C:\Documents and Settings\All Users\Menu Iniciar\Programas\PS Tray Factory",1) DirRemove("C:\Documents and Settings\All Users\Menu Iniciar\Programas\QuickTime Alternative",1) DirRemove("C:\Documents and Settings\All Users\Menu Iniciar\Programas\RealVNC",1) DirRemove("C:\Documents and Settings\All Users\Menu Iniciar\Programas\SpeedBit Video Accelerator",1) DirRemove("C:\Documents and Settings\All Users\Menu Iniciar\Programas\ViteSoft",1) DirRemove("C:\Documents and Settings\All Users\Menu Iniciar\Programas\Backup Magic",1) DirRemove("C:\Documents and Settings\Master\Menu Iniciar\Programas\Purrint",1) DirRemove("C:\Documents and Settings\Master\Menu Iniciar\Programas\Firebird Client 2.0",1) FileDelete("C:\Documents and Settings\Master\Menu Iniciar\Programas\Acessórios\Assistente de compatibilidade de programa.lnk") FileDelete("C:\Documents and Settings\Master\Menu Iniciar\Programas\Acessórios\Prompt de comando.lnk") FileDelete("C:\Documents and Settings\Master\Menu Iniciar\Programas\Acessórios\Tour do Windows XP.lnk") FileDelete("C:\Documents and Settings\Master\Menu Iniciar\Programas\Acessórios\Sincronizar.lnk") FileDelete("C:\Documents and Settings\All Users\Menu Iniciar\Programas\MSN Explorer.lnk") FileDelete("C:\Documents and Settings\All Users\Menu Iniciar\Programas\MSN Explorer.lnk") FileDelete("C:\Documents and Settings\All Users\Menu Iniciar\Programas\Acessórios\Ferramentas do sistema\Backup.lnk") ;FileDelete("C:\Documents and Settings\All Users\Menu Iniciar\Programas\Acessórios\Ferramentas do sistema\Informações do sistema.lnk") FileSetAttrib("C:\Documents and Settings\All Users\Menu Iniciar\Programas\Acessórios\Ferramentas do sistema\INFORM~1.lnk","-A-R-S-H",1) FileDelete("C:\Documents and Settings\All Users\Menu Iniciar\Programas\Acessórios\Ferramentas do sistema\INFORM~1.lnk") FileDelete("C:\Documents and Settings\All Users\Menu Iniciar\Programas\Windows Messenger.lnk") FileCopy("C:\Documents and Settings\All Users\Menu Iniciar\Programas\Windows Live\Windows Live Messenger .lnk","C:\Documents and Settings\All Users\Menu Iniciar\Programas",1) FileMove("C:\Documents and Settings\All Users\Menu Iniciar\Programas\Winamp\Winamp.lnk","C:\Documents and Settings\All Users\Menu Iniciar\Programas",1) DirRemove("C:\Documents and Settings\All Users\Menu Iniciar\Programas\Winamp",1) FileMove("C:\Documents and Settings\All Users\Menu Iniciar\Programas\Skype\Skype.lnk","C:\Documents and Settings\All Users\Menu Iniciar\Programas",1) DirRemove("C:\Documents and Settings\All Users\Menu Iniciar\Programas\Skype",1) FileMove("C:\Documents and Settings\All Users\Menu Iniciar\Programas\Picasa 3\Picasa 3.lnk","C:\Documents and Settings\All Users\Menu Iniciar\Programas",1) DirRemove("C:\Documents and Settings\All Users\Menu Iniciar\Programas\Picasa 3",1) ;PhotoFiltre DirCopy("C:\Documents and Settings\Master\Menu Iniciar\Programas\PhotoFiltre Studio X","C:\_wer\Documents and Settings\Master\Menu Iniciar\Programas\PhotoFiltre Studio X",1) FileCreateShortcut("C:\Arquivos de programas\PhotoFiltre Studio X\pfstudiox.exe","C:\Documents and Settings\All Users\Menu Iniciar\Programas\PhotoFiltre Studio X.lnk","C:\Arquivos de programas\PhotoFiltre Studio X","", "","C:\Arquivos de programas\PhotoFiltre Studio X\pfstudiox.exe", "", "0","") DirRemove("C:\Documents and Settings\Master\Menu Iniciar\Programas\PhotoFiltre Studio X", 1) ;Google SketchUp DirCopy("C:\Documents and Settings\All Users\Menu Iniciar\Programas\Google SketchUp 7","C:\_wer\Documents and Settings\All Users\Menu Iniciar\Programas\Google SketchUp 7",1) FileCreateShortcut("C:\Arquivos de programas\Google\Google SketchUp 7\SketchUp.exe","C:\Documents and Settings\All Users\Menu Iniciar\Programas\Google Sketchup.lnk","C:\Arquivos de programas\Google\Google SketchUp 7","", "","C:\Arquivos de programas\Google\Google SketchUp 7\SketchUp.exe", "", "0","") DirRemove("C:\Documents and Settings\All Users\Menu Iniciar\Programas\Google SketchUp 7", 1) FileMOve("C:\Documents and Settings\All Users\Menu Iniciar\Programas\Mozilla Firefox\Mozilla Firefox.lnk","C:\Documents and Settings\All Users\Menu Iniciar\Programas",1) DirRemove("C:\Documents and Settings\All Users\Menu Iniciar\Programas\Mozilla Firefox",1) DirRemove("C:\Documents and Settings\All Users\Menu Iniciar\Programas\Teclado da Microsoft",1) FileMove("C:\Documents and Settings\All Users\Menu Iniciar\Programas\Free Video Converter\Free Video Converter.lnk","C:\Documents and Settings\All Users\Menu Iniciar\Programas",1) DirRemove("C:\Documents and Settings\All Users\Menu Iniciar\Programas\Free Video Converter",1) FileMove("C:\Documents and Settings\All Users\Menu Iniciar\Programas\Foxit Reader\Foxit Reader.lnk","C:\Documents and Settings\All Users\Menu Iniciar\Programas",1) DirRemove("C:\Documents and Settings\All Users\Menu Iniciar\Programas\Foxit Reader",1) FileMove("C:\Documents and Settings\All Users\Menu Iniciar\Programas\FLV Player\FLV Player.lnk","C:\Documents and Settings\All Users\Menu Iniciar\Programas",1) DirRemove("C:\Documents and Settings\All Users\Menu Iniciar\Programas\FLV Player",1) DirRemove("C:\Documents and Settings\All Users\Menu Iniciar\Programas\Acessórios\Comunicações",1) FileDelete("C:\Documents and Settings\All Users\Menu Iniciar\Programas\Acessórios\Ferramentas do sistema\Assistente para transferência de arquivos e configurações.lnk") FileDelete("C:\Documents and Settings\All Users\Menu Iniciar\Programas\Acessórios\Ferramentas do sistema\Desfragmentador de disco.lnk") FileDelete("C:\Documents and Settings\All Users\Menu Iniciar\Programas\Acessórios\Ferramentas do sistema\Informações do sistema.lnk") FileDelete("C:\Documents and Settings\All Users\Menu Iniciar\Programas\Acessórios\Ferramentas do sistema\Limpeza de disco.lnk") FileDelete("C:\Documents and Settings\All Users\Menu Iniciar\Programas\Acessórios\Ferramentas do sistema\Restauração do sistema.lnk") FileDelete("C:\Documents and Settings\All Users\Menu Iniciar\Programas\Acessórios\Ferramentas do sistema\Tarefas agendadas.lnk") FileDelete("C:\Documents and Settings\Master\Menu Iniciar\Programas\Assistência remota.lnk") FileDelete("C:\Documents and Settings\Master\Menu Iniciar\Programas\Outlook Express.lnk") FileDelete("C:\Documents and Settings\All Users\Menu Iniciar\Programas\Acessórios\Conexão de Área de Trabalho Remota.lnk") DirCreate("C:\Documents and Settings\All Users\Menu Iniciar\Programas\Jogos com Conta") DirCreate("C:\Documents and Settings\All Users\Menu Iniciar\Programas\Jogos de Combate") DirCreate("C:\Documents and Settings\All Users\Menu Iniciar\Programas\Jogos de Corrida") DirCreate("C:\Documents and Settings\All Users\Menu Iniciar\Programas\Jogos de Estratégia") DirCreate("C:\Documents and Settings\All Users\Menu Iniciar\Programas\Jogos de Futebol") DirCreate("C:\Documents and Settings\All Users\Menu Iniciar\Programas\Jogos de Simulação") DirCopy("X:\_wer\Icones","C:\_wer\Icones",1) DirCopy("X:\Arquivos de programas","C:\Arquivos de programas",1) DirCopy("X:\Jogos","C:\Jogos",1) DirCopy("X:\Documents and Settings","C:\Documents and Settings",1) ;PhotoScape DirCopy("C:\Documents and Settings\All Users\Menu Iniciar\Programas\PhotoScape","C:\_wer\Documents and Settings\All Users\Menu Iniciar\Programas\PhotoScape",1) FileCreateShortcut("C:\Arquivos de programas\PhotoScape\PhotoScape.exe","C:\Documents and Settings\All Users\Menu Iniciar\Programas\PhotoScape.lnk","C:\Arquivos de programas\PhotoScape","", "","C:\Arquivos de programas\PhotoScape\PhotoScape.exe", "", "0","") DirRemove("C:\Documents and Settings\All Users\Menu Iniciar\Programas\PhotoScape",1) ;Mozila ;RunWait("C:\Arquivos de programas\Mozilla Firefox\firefox.exe") ;RunWait(@ComSpec & " /c " & "dir /b C:\Docume~1\Master\Dadosd~1\Mozilla\Firefox\Profiles >C:\Windows\Temp\Mozila.ini",@WindowsDir,@SW_DISABLE) ;$file = FileOpen("C:\Windows\Temp\Mozila.ini", 0) ;$M = FileReadLine($file) ;FileClose($file) ;$D = "C:\Documents and Settings\Master\Dados de aplicativos\Mozilla\Firefox\Profiles\" & $M & "\extensions" ;DirCopy("X:\Profiles.Mozila",$D,1) ;exit ;Cabal DirCopy("X:\_wer\Cabal","C:\_wer\Cabal",1) DriveMapDel("X:") ;Azteca ;FileMove("C:\Documents and Settings\All Users\Menu Iniciar\Programas\GameTop.com\Azteca\Azteca.lnk","C:\Documents and Settings\All Users\Menu Iniciar\Programas\Jogos de estratégia",9) ;DirRemove("C:\Documents and Settings\All Users\Menu Iniciar\Programas\GameTop.com", 1) ;FileDelete("C:\Arquivos de programas\GameTop.com\Azteca\website?.url") ;KKND 2 DirCopy("C:\Documents and Settings\All Users\Menu Iniciar\Melbourne House","C:\_wer\Documents and Settings\All Users\Menu Iniciar\Melbourne House",1) DirRemove("C:\Documents and Settings\All Users\Menu Iniciar\Programas\Melbourne House", 1) DirCopy("x:\_wer\kknd","C:\_wer\kknd",1) FileMove("C:\_wer\kknd\kknd.lnk","C:\Documents and Settings\All Users\Menu Iniciar\Programas\Jogos de estratégia\KKND Krossfire.lnk",9) ;Mudinho DirCopy("C:\Documents and Settings\All Users\Menu Iniciar\Programas\Mudinho","C:\_wer\Documents and Settings\All Users\Menu Iniciar\Programas\Mudinho",1) FileMove("C:\Documents and Settings\All Users\Menu Iniciar\Programas\Mudinho\Mudinho.lnk","C:\Documents and Settings\All Users\Menu Iniciar\Programas\Jogos com conta",9) DirRemove("C:\Documents and Settings\All Users\Menu Iniciar\Programas\Mudinho", 1) ;MuHeaven DirCopy("C:\Documents and Settings\All Users\Menu Iniciar\Programas\MuAwaY","C:\_wer\Documents and Settings\All Users\Menu Iniciar\Programas\MuAwaY",1) FileCreateShortcut("C:\Arquivos de programas\MuAwaY\muaway.exe","C:\Documents and Settings\All Users\Menu Iniciar\Programas\Jogos com conta\MuAway.lnk","C:\Arquivos de programas\MuAwaY","", "","C:\Arquivos de programas\MuAwaY\muaway.exe", "", "0","") DirRemove("C:\Documents and Settings\All Users\Menu Iniciar\Programas\MuAwaY", 1) ;MU Trix DirCopy("C:\Documents and Settings\Master\Menu Iniciar\Programas\MuTrix OnLine","C:\_wer\Documents and Settings\Master\Menu Iniciar\Programas\MuTrix OnLine",1) FileMove("C:\Documents and Settings\Master\Menu Iniciar\Programas\MuTrix OnLine\Jogar MuTrix.lnk","C:\Documents and Settings\All Users\Menu Iniciar\Programas\Jogos com conta",9) DirRemove("C:\Documents and Settings\Master\Menu Iniciar\Programas\MuTrix OnLine", 1) ;Cabal DirCopy("C:\Documents and Settings\Master\Menu Iniciar\Programas\Cabal Online Alma&Siena","C:\_wer\Documents and Settings\Master\Menu Iniciar\Programas\Cabal Online Alma&Siena",1) FileMove("C:\Documents and Settings\Master\Menu Iniciar\Programas\Cabal Online Alma&Siena\Cabal Online.lnk","C:\Documents and Settings\All Users\Menu Iniciar\Programas\Jogos com conta",9) DirRemove("C:\Documents and Settings\Master\Menu Iniciar\Programas\Cabal Online Alma&Siena", 1) DirRemove("C:\Documents and Settings\Master\Menu Iniciar\Programas\Update Cabal Online Reloaded", 1) DirRemove("C:\Documents and Settings\Master\Menu Iniciar\Programas\Update Cabal Online Castelo da Ilusão",1) ;FLyForFun DirCopy("C:\Documents and Settings\Master\Menu Iniciar\Programas\Gpotato\BR_Flyff","C:\_wer\Documents and Settings\Master\Menu Iniciar\Programas\Gpotato\BR_Flyff",1) FileMove("C:\Documents and Settings\Master\Menu Iniciar\Programas\Gpotato\BR_Flyff\Flyff.lnk","C:\Documents and Settings\All Users\Menu Iniciar\Programas\Jogos com conta",9) DirRemove("C:\Documents and Settings\Master\Menu Iniciar\Programas\Gpotato\BR_Flyff", 1) ;Fifa 2008 DirCopy("C:\Documents and Settings\All Users\Menu Iniciar\Programas\EA Sports\FIFA 08","C:\_wer\Documents and Settings\All Users\Menu Iniciar\Programas\EA Sports\FIFA 08",1) FileCreateShortcut("C:\_wer\Fifa.DaemonScript","C:\Documents and Settings\All Users\Menu Iniciar\Programas\Jogos de futebol\FIFA 08.lnk","C:\_wer","", "","C:\Arquivos de programas\EA Sports\FIFA 08\FIFA08.exe", "", "0", @SW_MINIMIZE) DirRemove("C:\Documents and Settings\All Users\Menu Iniciar\Programas\EA Sports\FIFA 08", 1) ;The Duel DirCopy("C:\Documents and Settings\All Users\Menu Iniciar\Programas\Level Up!\TheDuel","C:\_wer\Documents and Settings\All Users\Menu Iniciar\Programas\Level Up!\TheDuel",1) FileCreateShortcut("C:\_wer\TheDuel.DaemonScript","C:\Documents and Settings\All Users\Menu Iniciar\Programas\Jogos com conta\TheDuel.lnk","C:\_wer","", "","C:\Level Up! Games\TheDuel\theduel.exe", "", "0","") DirRemove("C:\Documents and Settings\All Users\Menu Iniciar\Programas\Level Up!\TheDuel", 1) ;Spore DirCopy("C:\Documents and Settings\All Users\Menu Iniciar\Programas\Electronic Arts\SPORE™","C:\_wer\Documents and Settings\All Users\Menu Iniciar\Programas\Electronic Arts\SPORE™",1) FileCreateShortcut("C:\Arquivos de programas\Electronic Arts\SPORE\Sporebin\SporeApp.exe","C:\Documents and Settings\All Users\Menu Iniciar\Programas\Jogos de simulação\Spore.lnk","C:\Arquivos de programas\Electronic Arts\SPORE\Sporebin","-locale:pt-br", "","C:\Arquivos de programas\Electronic Arts\SPORE\Sporebin\SporeApp.exe", "", "0","") DirRemove("C:\Documents and Settings\All Users\Menu Iniciar\Programas\Electronic Arts", 1) ;GrandChase2 DirCopy("C:\Documents and Settings\All Users\Menu Iniciar\Programas\LevelUpGames GrandChase","C:\_wer\Documents and Settings\All Users\Menu Iniciar\Programas\LevelUpGames GrandChase",1) FileCreateShortcut("C:\Level Up! Games\Grand Chase Season 3\grandchase.exe","C:\Documents and Settings\All Users\Menu Iniciar\Programas\Jogos com conta\GrandChase 3.lnk","C:\Level Up! Games\Grand Chase Season 3","", "","C:\Level Up! Games\Grand Chase Season 3\grandchase.exe", "", "0","") DirRemove("C:\Documents and Settings\All Users\Menu Iniciar\Programas\LevelUpGames GrandChase", 1) ;Need for Speed™ Most Wanted PC Demo ;DirCopy("C:\Documents and Settings\All Users\Menu Iniciar\Programas\EA GAMES\Need for Speed™ Most Wanted PC Demo","C:\_wer\Documents and Settings\All Users\Menu Iniciar\Programas\EA GAMES\Need for Speed™ Most Wanted PC Demo",1) ;FileCreateShortcut("C:\Arquivos de programas\EA GAMES\Need for Speed Most Wanted PC Demo\speedDemo.exe","C:\Documents and Settings\All Users\Menu Iniciar\Programas\Jogos de corrida\Need for Speed Most Wanted.lnk","C:\Arquivos de programas\EA GAMES\Need for Speed Most Wanted PC Demo","", "","C:\Arquivos de programas\EA GAMES\Need for Speed Most Wanted PC Demo\speedDemo.exe", "", "0","") ;DirRemove("C:\Documents and Settings\All Users\Menu Iniciar\Programas\EA GAMES\Need for Speed™ Most Wanted PC Demo", 1) ;Unreal Tournament 2004 Demo DirCopy("C:\Documents and Settings\All Users\Menu Iniciar\Programas\Unreal Tournament 2004 Demo","C:\_wer\Documents and Settings\All Users\Menu Iniciar\Programas\Unreal Tournament 2004 Demo",1) FileCreateShortcut("C:\UT2004Demo\System\UT2004.exe","C:\Documents and Settings\All Users\Menu Iniciar\Programas\Jogos de combate\Unreal Tournament.lnk","C:\UT2004Demo\System","", "","C:\UT2004Demo\System\ut2004.exe", "", "0","") DirRemove("C:\Documents and Settings\All Users\Menu Iniciar\Programas\Unreal Tournament 2004 Demo", 1) ;Hidden and Dangerous Deluxe ;DirCopy("C:\Documents and Settings\Master\Menu Iniciar\Programas\Take2\Hidden and Dangerous Deluxe","C:\_wer\Documents and Settings\Master\Menu Iniciar\Programas\Take2\Hidden and Dangerous Deluxe",1) ;FileCreateShortcut("C:\Arquivos de programas\Take2\Hidden and Dangerous Deluxe\bin\hde.exe","C:\Documents and Settings\All Users\Menu Iniciar\Programas\Jogos de combate\Hidden and Dangerous Deluxe.lnk","C:\Arquivos de programas\Take2\Hidden and Dangerous Deluxe\bin","", "","C:\Arquivos de programas\Take2\Hidden and Dangerous Deluxe\bin\hde.exe", "", "0","") ;DirRemove("C:\Documents and Settings\Master\Menu Iniciar\Programas\Take2\Hidden and Dangerous Deluxe", 1) ;Xpand Rally Xtreeme DirCopy("C:\Documents and Settings\All Users\Menu Iniciar\Programas\Techland","C:\_wer\Documents and Settings\All Users\Menu Iniciar\Programas\Techland",1) FileCreateShortcut("C:\Arquivos de programas\Techland\Xpand Rally Xtreme\XRX.exe","C:\Documents and Settings\All Users\Menu Iniciar\Programas\Jogos de corrida\Xpand Rally Xtreme.lnk","C:\Arquivos de programas\Techland\Xpand Rally Xtreme Demo\","", "","C:\Arquivos de programas\Techland\Xpand Rally Xtreme\XRX.exe", "", "0","") DirRemove("C:\Documents and Settings\All Users\Menu Iniciar\Programas\Techland", 1) ;Aliens vx Predador DirCopy("C:\Documents and Settings\All Users\Menu Iniciar\Programas\Fox Interactive","C:\_wer\Documents and Settings\All Users\Menu Iniciar\Programas\Fox Interactive",1) FileCreateShortcut("C:\_wer\AVP2.DaemonScript","C:\Documents and Settings\All Users\Menu Iniciar\Programas\Jogos de combate\Aliens vs Predador 2.lnk","C:\_wer\","", "","C:\Arquivos de programas\Fox\Aliens vs. Predator 2\AVP2.exe", "", "0","") DirRemove("C:\Documents and Settings\All Users\Menu Iniciar\Programas\Fox Interactive", 1) ;TrackMania Nations ESWC DirCopy("C:\Documents and Settings\All Users\Menu Iniciar\Programas\TrackMania Nations ESWC","C:\_wer\Documents and Settings\All Users\Menu Iniciar\Programas\TrackMania Nations ESWC",1) FileCreateShortcut("C:\Arquivos de programas\TrackMania Nations ESWC\TmNationsESWCLauncher.exe","C:\Documents and Settings\All Users\Menu Iniciar\Programas\Jogos de corrida\TrackMania Nations ESWC.lnk","C:\Arquivos de programas\TrackMania Nations ESWC\","", "","C:\Arquivos de programas\TrackMania Nations ESWC\TmNationsESWCLauncher.exe", "", "0","") DirRemove("C:\Documents and Settings\All Users\Menu Iniciar\Programas\TrackMania Nations ESWC", 1) ;TrackMania Forever DirCopy("C:\Documents and Settings\All Users\Menu Iniciar\Programas\TmNationsForever","C:\_wer\Documents and Settings\All Users\Menu Iniciar\Programas\TmNationsForever",1) FileCreateShortcut("C:\Arquivos de programas\TmNationsForever\TmForeverLauncher.exe","C:\Documents and Settings\All Users\Menu Iniciar\Programas\Jogos de corrida\TrackMania Forever.lnk","C:\Arquivos de programas\TmNationsForever\","", "","C:\Arquivos de programas\TmNationsForever\TmForeverLauncher.exe", "", "0","") DirRemove("C:\Documents and Settings\All Users\Menu Iniciar\Programas\TmNationsForever", 1) ;Xenon 2000 ;DirCopy("C:\Documents and Settings\All Users\Menu Iniciar\Programas\The Bitmap Brothers\Xenon 2000 - Project PCF","C:\_wer\Documents and Settings\All Users\Menu Iniciar\Programas\The Bitmap Brothers\Xenon 2000 - Project PCF",1) ;FileCreateShortcut("C:\Arquivos de programas\The Bitmap Brothers\Xenon 2000 - Project PCF\bin\bccrelease\xenon.exe","C:\Documents and Settings\All Users\Menu Iniciar\Programas\Jogos de estratégia\Xenon 2000.lnk","C:\Arquivos de programas\The Bitmap Brothers\Xenon 2000 - Project PCF\bin\bccrelease\","", "","C:\WINDOWS\system32\winmine.exe", "", "0","") ;DirRemove("C:\Documents and Settings\All Users\Menu Iniciar\Programas\The Bitmap Brothers", 1) ;Call of Duty 2 DirCopy("C:\Documents and Settings\All Users\Menu Iniciar\Programas\Activision","C:\_wer\Documents and Settings\All Users\Menu Iniciar\Programas\Activision",1) FileCreateShortcut("C:\Arquivos de programas\Activision\Call of Duty 2\cod2sp_s.exe","C:\Documents and Settings\All Users\Menu Iniciar\Programas\Jogos de combate\Call of Duty 2 (Single Player).lnk","C:\Arquivos de programas\Activision\Call of Duty 2\","", "","%ProgramFiles%\Activision\Call of Duty 2\cod2sp_s.exe", "", "0","") FileCreateShortcut("C:\Arquivos de programas\Activision\Call of Duty 2\cod2mp_s.exe","C:\Documents and Settings\All Users\Menu Iniciar\Programas\Jogos de combate\Call of Duty 2 (Multi Player).lnk","C:\Arquivos de programas\Activision\Call of Duty 2\","", "","%ProgramFiles%\Activision\Call of Duty 2\cod2sp_s.exe", "", "0","") DirRemove("C:\Documents and Settings\All Users\Menu Iniciar\Programas\Activision",1) ;AutoIt DirCopy("C:\Documents and Settings\All Users\Menu Iniciar\Programas\AutoIt v3","C:\_wer\Documents and Settings\All Users\Menu Iniciar\Programas\AutoIt v3",1) DirCopy("C:\Documents and Settings\All Users\Menu Iniciar\Programas\AutoIt v3","C:\_wer\AutoIt",1) DirRemove("C:\Documents and Settings\All Users\Menu Iniciar\Programas\AutoIt v3",1) ;Warcraft III ;DirCopy("C:\Documents and Settings\Master\Menu Iniciar\Programas\Warcraft III","C:\_wer\Documents and Settings\Master\Menu Iniciar\Programas\Warcraft III",1) ;DirCopy("C:\Documents and Settings\Master\Menu Iniciar\Programas\GameVicio","C:\_wer\Documents and Settings\Master\Menu Iniciar\Programas\GameVicio",1) ;FileCreateShortcut("c:\_wer\WarCraft.DaemonScript","C:\Documents and Settings\All Users\Menu Iniciar\Programas\Jogos de estratégia\Warcraft III.lnk","C:\_wer","", "","C:\Arquivos de programas\Warcraft III\Warcraft III.exe", "", "0",@SW_MINIMIZE) ;DirRemove("C:\Documents and Settings\Master\Menu Iniciar\Programas\Warcraft III",1) ;FileDelete("C:\Arquivos de programas\Warcraft III\Movies\TutorialIn.mpq") ;DirRemove("C:\Documents and Settings\Master\Menu Iniciar\Programas\Warcraft III",1) ;GhostRecon Modern Warfighter DirCopy("C:\Documents and Settings\All Users\Menu Iniciar\Programas\Ubisoft\Ghost Recon Advanced Warfighter","C:\_wer\Documents and Settings\All Users\Menu Iniciar\Programas\Ubisoft\Ghost Recon Advanced Warfighter",1) FileCreateShortcut("C:\Arquivos de programas\Ubisoft\Ghost Recon Advanced Warfighter\GRAW.EXE","C:\Documents and Settings\All Users\Menu Iniciar\Programas\Jogos de combate\GhostRecon.lnk","C:\Arquivos de programas\Ubisoft\Ghost Recon Advanced Warfighter","", "","C:\Arquivos de programas\Ubisoft\Ghost Recon Advanced Warfighter\GRAW.EXE", "", "0","") DirRemove("C:\Documents and Settings\All Users\Menu Iniciar\Programas\Ubisoft",1) ;ATI DirCopy("C:\Documents and Settings\All Users\Menu Iniciar\Programas\Catalyst Control Center","C:\_wer\Documents and Settings\All Users\Menu Iniciar\Programas\Catalyst Control Center",1) DirRemove("C:\Documents and Settings\All Users\Menu Iniciar\Programas\Catalyst Control Center",1) ;Final DirRemove("C:\Documents and Settings\All Users\Menu Iniciar\Programas\EA Sports",1) DirRemove("C:\Documents and Settings\All Users\Menu Iniciar\Programas\EA GAMES",1) DirRemove("C:\Documents and Settings\All Users\Menu Iniciar\Programas\EA GAMES,1") DirRemove("C:\Documents and Settings\Master\Menu Iniciar\Programas\Gpotato",1) DirRemove("C:\Documents and Settings\Master\Menu Iniciar\Programas\Take2", 1) DirCopy("C:\Documents and Settings\Master\Menu Iniciar\Programas\GameVicio","C:\_wer\Documents and Settings\Master\Menu Iniciar\Programas\GameVicio",1) DirRemove("C:\Documents and Settings\Master\Menu Iniciar\Programas\GameVicio",1) DirCopy("C:\Documents and Settings\All Users\Menu Iniciar\Programas\NVIDIA Corporation","C:\_wer\Documents and Settings\All Users\Menu Iniciar\Programas\NVIDIA Corporation",1) DirRemove("C:\Documents and Settings\All Users\Menu Iniciar\Programas\NVIDIA Corporation",1) DriveMapDel("X:") Edited November 18, 2014 by Detefon Visit my repository
blejd Posted November 18, 2014 Author Posted November 18, 2014 I'm trying to copy Things from Network Drive to windows 2008R2 - I can't map drive using DRIVEMAPADD. When i manually add mapping - it works flawlessy.
Luigi Posted November 18, 2014 Posted November 18, 2014 windows 2008R2 understand Visit my repository
BrewManNH Posted November 18, 2014 Posted November 18, 2014 Did you try it using the UNC instead of mapping the drive? If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator
blejd Posted November 19, 2014 Author Posted November 19, 2014 (edited) Did you try it using the UNC instead of mapping the drive? Yea, it didn't helped at all, but i managed to map drive and somehow it works. Edited November 19, 2014 by blejd
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now