Jump to content

Filewrite line syntax wrong?


lyledg
 Share

Recommended Posts

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

Link to comment
Share on other sites

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
Link to comment
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

Link to comment
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.

 

Link to comment
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.

 

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
 Share

  • Recently Browsing   0 members

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