tes5884 Posted August 30, 2012 Posted August 30, 2012 Hi guys, I'm trying to add a startup script using autoit. One of the steps is writing to the "C:\Windows\System32\GroupPolicy\Machine\Scripts\scripts.ini" file. Problem is even though I run the code it doesn't change the actual file, and it returns "1" meaning it was successful. $ini = "C:\Windows\System32\GroupPolicy\Machine\Scripts\scripts.ini" $val1 = IniWrite($ini, "Shutdown","0CmdLine", "C:\Scripts\USBReminder.exe") $val2 = IniWrite($ini, "Shutdown","0Parameters", "") MsgBox(0, "", $val1 & @CRLF & $val2) Thanks!! www.tspitz.com
water Posted August 30, 2012 Posted August 30, 2012 Depends on the operating system you use. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
Mechaflash Posted August 30, 2012 Posted August 30, 2012 If you're on a limited user account (either xp/vista/7), you shouldn't be able to write to any file under C:Windows. Spoiler “Hello, ladies, look at your man, now back to me, now back at your man, now back to me. Sadly, he isn’t me, but if he stopped using ladies scented body wash and switched to Old Spice, he could smell like he’s me. Look down, back up, where are you? You’re on a boat with the man your man could smell like. What’s in your hand, back at me. I have it, it’s an oyster with two tickets to that thing you love. Look again, the tickets are now diamonds. Anything is possible when your man smells like Old Spice and not a lady. I’m on a horse.”
tes5884 Posted August 30, 2012 Author Posted August 30, 2012 Windows 7 Professional, Full domain admin rights (I'm on an AD domain) www.tspitz.com
Mechaflash Posted August 30, 2012 Posted August 30, 2012 Just to make sure we aren't overlooking the obvious, scrutinize the path you've set in $ini to make sure it is correct. If that isn't the case, attempt to manually write to that file yourself and see what happens. Spoiler “Hello, ladies, look at your man, now back to me, now back at your man, now back to me. Sadly, he isn’t me, but if he stopped using ladies scented body wash and switched to Old Spice, he could smell like he’s me. Look down, back up, where are you? You’re on a boat with the man your man could smell like. What’s in your hand, back at me. I have it, it’s an oyster with two tickets to that thing you love. Look again, the tickets are now diamonds. Anything is possible when your man smells like Old Spice and not a lady. I’m on a horse.”
tes5884 Posted August 30, 2012 Author Posted August 30, 2012 If I open the file in notepad I can write to it. If I try creating a file using command prompt it shows that it exists, but it isn't in the folder. Same if I try to echo>> into a file in that folder, also doesn't show, but it doesn't throw an error either. This is strange www.tspitz.com
AdmiralAlkex Posted August 30, 2012 Posted August 30, 2012 Please run the example for _DebugBugReportEnv(), copy the text and paste it here so we can see what you are running. .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface
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