lyledg Posted December 14, 2006 Share Posted December 14, 2006 About to pull my last two strands of hair out!! I can't for the life of me see what is wrong with this syntax? CODEFileWriteLine($Scriptfile, 'Global $IEProg = '"C:\Program files\Internet Explorer\IEXPLORE.EXE" '') Keeps on saying I have the wrong amount of arguments. Basically I want the IE path to br written into the registry, and need quotation marks around the line? Help......please? Link to comment Share on other sites More sharing options...
GaryFrost Posted December 14, 2006 Share Posted December 14, 2006 To many single quotes maybe FileWriteLine($Scriptfile, 'Global $IEProg = "C:\Program files\Internet Explorer\IEXPLORE.EXE" ') SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
Valuater Posted December 14, 2006 Share Posted December 14, 2006 i use a message box to check how it "really" looks MsgBox(0, $Scriptfile, 'Global $IEProg = '"C:\Program files\Internet Explorer\IEXPLORE.EXE" '') this can help you with other stuff in the future 8) Link to comment Share on other sites More sharing options...
lyledg Posted December 14, 2006 Author Share Posted December 14, 2006 (edited) Thanks Gary, Valuater!! One last question, what is wrong here...I think I need to go home and sleep.... FileWriteLine($Scriptfile, 'Global $IEProg = "C:\Program files\Internet Explorer\IEXPLORE.EXE" ') FileWriteLine($Scriptfile, 'Regwrite("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\Currentversion\Runonce", "RunMOTD", "REG_SZ", '$IEProg & $MOTD ')') I seem to be having issues with the quotes when I write the path (C:\Program files\Internet Explorer\IEXPLORE.EXE) into the registry. I need to enclose this path with quotes Edited December 14, 2006 by lyledg Link to comment Share on other sites More sharing options...
GaryFrost Posted December 14, 2006 Share Posted December 14, 2006 What are you trying to do, write to a file only? Is it suppose to write to the registry? SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
lyledg Posted December 14, 2006 Author Share Posted December 14, 2006 Hi Gary Yes, I am trying to write to the registry to launch IE from the runonce key....But when I write the path into the regsitry using your method mentioned earlier of the usage of quotes, it does not enclose it Basically, I want to add "C:\Program files\Internet Explorer\IEXPLORE.EXE" into the registry, but I think when it writes to the GUIrunonce key, it strips the quotes off Link to comment Share on other sites More sharing options...
GaryFrost Posted December 14, 2006 Share Posted December 14, 2006 not sure what you have the Filewrite in there for Regwrite("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\Currentversion\Runonce", "RunMOTD", "REG_SZ", $IEProg & ' ' & $MOTD) SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
lyledg Posted December 14, 2006 Author Share Posted December 14, 2006 Sorry, that needs some explaining.. This prog is a designer, which writes out another *.au3 file, and compiles that into a *.exe. That is what the filewriteline is used for.... Link to comment Share on other sites More sharing options...
lyledg Posted December 14, 2006 Author Share Posted December 14, 2006 Using the line below, still get an error FileWriteLine($Scriptfile, 'Regwrite("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\Currentversion\Runonce", "RunMOTD", "REG_SZ", $IEProg & ' ' & $MOTD)') Any ideas?? Thanks Mate! Link to comment Share on other sites More sharing options...
GaryFrost Posted December 15, 2006 Share Posted December 15, 2006 FileWriteLine($Scriptfile, 'Regwrite("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\Currentversion\Runonce", "RunMOTD", "REG_SZ", "' & $IEProg & " " & $MOTD & '")') SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
lyledg Posted December 15, 2006 Author Share Posted December 15, 2006 Thanks Mate, I managed to get the script working.. Cheers 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