Sign in to follow this  
Followers 0
lyledg

Filewrite line syntax wrong?

11 posts in this topic

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?

CODE
FileWriteLine($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? :P

Share this post


Link to post
Share on other sites



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)


NEWHeader1.png

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Thanks Gary, Valuater!!

One last question, what is wrong here...I think I need to go home and sleep.... :P

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 by lyledg

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

 

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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!

Share this post


Link to post
Share on other sites

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.

 

Share this post


Link to post
Share on other sites

Thanks Mate, I managed to get the script working..

Cheers

:P

Share this post


Link to post
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
Sign in to follow this  
Followers 0