This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: CreateDir in Server 2008
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 11, 2008
04:37 PM
CreateDir in Server 2008
I am having issues with Windows Server 2008. Through installscript I am trying to crate an internet shortcut (which is pretty much just an ini file) to show up under start\All programs\FolderName\, but it won't let me create this FolderName using CreateDir. I have rights, b/c I am logged in as Administrator to this server (it's a test Server). I can manually create this folder through explorer so I have sufficient rights. Any ideas why I can't create a folder? The actual path to this directory I am using is: C:\ProgramData\Microsoft\Windows\Start Menu\Programs\. My command in installscript is:
szPath2 = "C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\Hello";
LongPathToQuote ( szPath2, TRUE );
Return = CreateDir(szPath2);
Help?!?
szPath2 = "C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\Hello";
LongPathToQuote ( szPath2, TRUE );
Return = CreateDir(szPath2);
Help?!?
(4) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 11, 2008
05:05 PM
Perhaps pass the return value through FormatMessage to see what the specific problem is?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 11, 2008
05:08 PM
I have done this. The message only gave me a reason code of -1.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 11, 2008
05:16 PM
I don't have a Windows Server 2008 system at hand, but does it work if you use FOLDER_PROGRAMS instead of the hard-coded path? This is a pure InstallScript project and not an MSI with an InstallScript custom action?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 14, 2008
09:45 AM
I did try the FOLDER_PROGRAM and it gives me the same results. I verified and the path they use is the exact same as when I hard-code it.
![](/skins/images/A5EADE085F77DE82FB3B14D6B307AE6A/responsive_peak/images/icon_anonymous_message.png)