chiners_68 Posted July 4, 2006 Share Posted July 4, 2006 Hi All, I have setup a file copy for an autoIT exe file to the startup after a reboot. Ive tested with the original script file bot now need to copy the compiled EXE file.. i have the line below but its not working... any onwe help here.. FileCopy("\\server\it$\Software\Other\Microsoft\Visual Studio\disk1\Visual Studio 6.0 Install P2.exe", @StartupDir)i have check & double checked the UNC path & file name (rename & Copy text to make sure) but it dosent work now with the exe file copy. Link to comment Share on other sites More sharing options...
Briegel Posted July 4, 2006 Share Posted July 4, 2006 You have spaces in your path. Try this: FileCopy('"\\server\it$\Software\Other\Microsoft\Visual Studio\disk1\Visual Studio 6.0 Install P2.exe"', @StartupDir) Link to comment Share on other sites More sharing options...
chiners_68 Posted July 4, 2006 Author Share Posted July 4, 2006 Ive tried that it dosent seem to work FileCopy('"\\ebc-img-01\it$\Software\Other\Microsoft\Visual Studio\disk1\Visual Studio 6.0 Install P2.exe"', @StartupDir) Link to comment Share on other sites More sharing options...
MHz Posted July 4, 2006 Share Posted July 4, 2006 Yeah, but you may have overlooked reading the examples in the helpfile. It would tell you that it can recognize @StartupDir as a file rather then a folder so try using a backslash after @StartupDir and see if that solves your problem. If this is a reboot and continue install, then I would recommend using HKCU\...\RunOnce as the method to restart your automation. I would assume that Visual Studio 6.0 would also start from that key and the entry would not require removal as it is done automatically. I have a reboot script that does this and works fine to complete the 2nd half of install with another program I have. Link to comment Share on other sites More sharing options...
chiners_68 Posted July 4, 2006 Author Share Posted July 4, 2006 ill have a go with the backslash.. I tried originally using runonce but it runs & waits when i need it to go into windows fully for a MSDN window to apear & then run. startup folder was working a treat till i compiled the script. i have changed UNC path so im now thinking it dosent like the space in the UNC path. it seems ok with spaces in the filename but possibly not the UNC path. Link to comment Share on other sites More sharing options...
MHz Posted July 4, 2006 Share Posted July 4, 2006 Be sure to use HKCU and not HKLM as HKLM does wait while HKCU executes after desktop loads and does not wait. Link to comment Share on other sites More sharing options...
chiners_68 Posted July 4, 2006 Author Share Posted July 4, 2006 Problem solved... Mcafee sudenly decided to deny access to the startup folder.. disabled the Network Associates Mcshield Service temp. & it worked fine. Link to comment Share on other sites More sharing options...
chiners_68 Posted July 4, 2006 Author Share Posted July 4, 2006 Due to the Problem with Mcafee now I need to use the registry. can somone help with the correct script to add the correct key for this exe to run in the runonce. ive knocked somethig up but dont think its right. SET KEY=HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce REG ADD %KEY%\001 /V /D "\"\\ebc-img-01\it$\Software\Other\Microsoft\Visual Studio\disk1\Visual Studio 6 Install P2.exe\" Link to comment Share on other sites More sharing options...
MHz Posted July 4, 2006 Share Posted July 4, 2006 ; Call function when needed. _RunOnce() Func _RunOnce() ; Add 2nd part to installation. Local $key = 'HKCU\Software\Microsoft\Windows\CurrentVersion\RunOnce' If @Compiled Then RegWrite($key, '_VisualStudio', 'Reg_sz', '"' & @ScriptFullPath & '" /postrun') Else RegWrite($key, '_VisualStudio', 'Reg_sz', '"' & @AutoItExe & '" "' & @ScriptFullPath & '" /postrun') EndIf EndFunc Link to comment Share on other sites More sharing options...
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